:root{--bg:#f5f7fb;--panel:#fff;--text:#1f2937;--muted:#6b7280;--line:#e5e7eb;--blue:#2563eb;--blue-soft:#eff6ff;--green:#047857;--green-soft:#ecfdf5;--red:#b91c1c;--red-soft:#fef2f2;--amber:#92400e;--amber-soft:#fef3c7;--gray-soft:#f3f4f6}
.line-binding-request{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,1fr) auto;align-items:center;gap:14px;padding:16px 0;border-top:1px solid #e0e6e1}.line-binding-request p{margin:6px 0;font-size:13px}.line-binding-request small{color:#69766f}.line-binding-request label{display:grid;gap:6px;font-size:13px}.line-binding-request select{padding:10px;border:1px solid #ccd8cf;border-radius:8px;min-height:42px;background:#fff}@media(max-width:700px){.line-binding-request{grid-template-columns:1fr}.line-binding-request .toolbar>button{flex:1}}
*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI","Noto Sans TC",sans-serif;color:var(--text);background:var(--bg)}button,input,select{font:inherit}.app-shell{min-height:100vh;display:grid;grid-template-columns:240px 1fr}.sidebar{background:#111827;color:#fff;padding:24px 16px}.brand{font-size:20px;font-weight:800}.brand-sub{font-size:12px;color:#9ca3af;margin:5px 0 24px}.nav-item{display:block;width:100%;border:0;background:transparent;color:#d1d5db;text-align:left;padding:11px 12px;border-radius:9px;margin:3px 0;cursor:pointer}.nav-item:hover,.nav-item.active{background:#1f2937;color:#fff}.main{padding:24px;overflow:hidden}.topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:18px}.topbar h1{margin:0;font-size:25px}.muted{color:var(--muted);font-size:12px}.page{display:none}.page.active{display:block}.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:17px;box-shadow:0 1px 3px rgba(0,0,0,.03);margin-bottom:16px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-label{color:var(--muted);font-size:12px}.stat-value{font-weight:800;font-size:30px;margin:5px 0}.small-value{font-size:19px}.pill{padding:7px 10px;background:var(--blue-soft);color:#1d4ed8;border-radius:999px;font-size:12px;font-weight:700}.section-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.section-head h2,.section-head h3{margin:0}.btn{border:1px solid var(--line);background:#fff;padding:8px 11px;border-radius:8px;cursor:pointer;font-weight:700}.btn:hover{background:#f9fafb}.btn.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.hidden{display:none!important}.flow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.flow span{padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:12px;font-weight:700}.flow b{color:#9ca3af}.rule-list{margin:0;padding-left:20px;line-height:1.9}.form-card{padding:0;overflow:hidden}.form-card>.section-head{padding:16px 18px;margin:0;border-bottom:1px solid var(--line)}.form-section{padding:16px 18px;border-bottom:1px solid var(--line)}.form-section-title{font-size:13px;font-weight:800;margin-bottom:12px}.form-grid{display:grid;gap:12px}.cols-4{grid-template-columns:repeat(4,1fr)}.cols-3{grid-template-columns:repeat(3,1fr)}.cols-2{grid-template-columns:repeat(2,1fr)}.field>span{display:block;font-size:12px;color:#4b5563;font-weight:700;margin-bottom:6px}.field input,.field select{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:8px 9px;background:#fff}.check-box,.skill-grid{border:1px solid var(--line);background:#f9fafb;border-radius:9px;padding:9px 10px}.check-box{display:flex;gap:18px;min-height:39px;align-items:center}.skill-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.range-scale{display:flex;justify-content:space-between;font-size:10px;color:#9ca3af}.form-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}th{background:#f9fafb;color:#4b5563}.tag{display:inline-block;padding:3px 7px;border-radius:999px;background:#eef2ff;color:#4338ca;font-weight:700}.tag.full{background:var(--green-soft);color:var(--green)}.row-actions{display:flex;gap:5px}.action{border:1px solid var(--line);border-radius:7px;background:#fff;padding:5px 8px;cursor:pointer;font-size:11px;font-weight:700}.action.edit{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.action.del{background:#fef2f2;color:#b91c1c;border-color:#fecaca}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.requirement-table input{width:64px;padding:6px;border:1px solid #d1d5db;border-radius:7px}.note{padding:12px 14px;border:1px dashed #cbd5e1;background:#f8fafc;border-radius:10px;color:#475569;font-size:12px}.toolbar{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.toolbar input{padding:8px;border:1px solid #d1d5db;border-radius:8px}.status-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.schedule-card{padding:14px}.schedule-help{font-size:12px;color:var(--muted);margin-bottom:10px}.schedule-matrix-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px;max-height:65vh}.schedule-matrix{border-collapse:separate;border-spacing:0;width:max-content}.schedule-matrix th,.schedule-matrix td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px;text-align:center;min-width:54px;height:33px;font-size:11px}.schedule-matrix th{position:sticky;top:0;z-index:4;background:#f8fafc}.schedule-matrix .sticky-name{position:sticky;left:0;z-index:3;width:68px;min-width:68px;max-width:68px;white-space:normal;overflow-wrap:anywhere;text-align:center;vertical-align:middle;background:#fff;font-weight:800}.schedule-matrix .sticky-shift{position:sticky;left:68px;z-index:3;width:46px;min-width:46px;max-width:46px;background:#fff;font-weight:700}.schedule-matrix th.sticky-name,.schedule-matrix th.sticky-shift{z-index:6;background:#f8fafc}.schedule-matrix .weekend{background:#fff7ed}.schedule-matrix .closed{background:var(--gray-soft);color:#9ca3af}.schedule-matrix .o{background:var(--green-soft);color:var(--green);font-weight:800}.schedule-matrix .x{background:var(--red-soft);color:var(--red);font-weight:800}.schedule-matrix .rest{background:#b91c1c;color:#fff;font-weight:800}.schedule-matrix td.editable{cursor:pointer}.schedule-matrix td.editable:hover{outline:2px solid #93c5fd;outline-offset:-2px}.legend{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.lg{padding:4px 7px;border-radius:7px;font-size:11px}.lg.o{background:var(--green-soft);color:var(--green)}.lg.x{background:var(--red-soft);color:var(--red)}.lg.rest{background:#b91c1c;color:#fff}.lg.job{background:var(--blue-soft);color:#1d4ed8}.lg.closed{background:var(--gray-soft);color:#6b7280}.cell-menu{position:fixed;z-index:50;width:180px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 30px rgba(0,0,0,.18);padding:6px;max-height:320px;overflow:auto}.cell-menu button{display:block;width:100%;border:0;background:#fff;text-align:left;padding:8px;border-radius:7px;cursor:pointer}.cell-menu button:hover{background:#f3f4f6}.version-list{display:grid;gap:8px}.version-item{padding:10px;border:1px solid var(--line);border-radius:9px;font-size:12px;display:flex;justify-content:space-between;gap:12px}.gap-bad{color:#b91c1c;font-weight:800}
@media(max-width:1050px){.app-shell{grid-template-columns:1fr}.sidebar{position:static}.stats-grid{grid-template-columns:1fr 1fr}.cols-4,.cols-3,.cols-2,.two-col{grid-template-columns:1fr}.skill-grid{grid-template-columns:repeat(2,1fr)}}

.custom-special-panel{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fafcff}.custom-requirements{margin-top:12px}.special-day{position:relative}.special-mark{display:inline-block;margin-left:3px;color:#7c3aed;font-size:14px;line-height:1}.schedule-matrix th.special-day{box-shadow:inset 0 3px 0 #c4b5fd}


.modal-overlay{position:fixed;inset:0;z-index:100;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:20px}.modal-card{width:min(520px,96vw);background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.25);padding:18px}.modal-card .field{display:block;margin:12px 0}.modal-card select,.modal-card textarea{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:9px;background:#fff}.change-list{display:grid;gap:8px}.change-item{border:1px solid var(--line);border-radius:9px;padding:10px 12px;font-size:12px}.change-item>div:first-child{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.change-arrow{font-weight:700;color:#1d4ed8}.change-reason{margin:5px 0;color:#475569}
.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#eff6ff,#f8fafc 55%,#ecfdf5)}.login-card{width:min(390px,100%);background:#fff;border:1px solid var(--line);border-radius:18px;padding:28px;box-shadow:0 24px 60px rgba(15,23,42,.12)}.login-brand{font-size:24px;font-weight:900;margin-bottom:5px}.login-card .field{display:block;margin:24px 0 12px}.login-submit{width:100%}.login-error{margin:0 0 12px;color:var(--red);font-size:13px;font-weight:700}.top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.storage-error{background:var(--red-soft);color:var(--red)}
.business-calendar-card{padding:16px}.calendar-weekdays,.business-calendar{display:grid;grid-template-columns:repeat(7,minmax(118px,1fr));gap:8px}.calendar-weekdays{margin-bottom:8px;text-align:center;color:#64748b;font-size:12px;font-weight:800}.calendar-weekdays span:nth-child(6),.calendar-weekdays span:nth-child(7){color:#9a3412}.calendar-day{min-height:112px;border:1px solid #dfe3e8;border-radius:11px;padding:10px;background:#fff;transition:border-color .15s,box-shadow .15s}.calendar-day.holiday{background:#fffaf1;border-color:#ead5ad}.calendar-day.closed{background:#eceeeb;border-color:#cfd3cf;color:#7b8184;filter:grayscale(1) saturate(0);opacity:.78}.calendar-day.today{box-shadow:0 0 0 2px #4f8f7b;border-color:#4f8f7b}.calendar-day-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.calendar-day-head b{font-size:20px}.calendar-day-head span{font-size:11px;font-weight:800}.calendar-rule-row{display:grid;grid-template-columns:1fr 1fr;gap:5px}.calendar-day button{width:100%;min-height:25px;border:1px solid #dfe3e8;border-radius:9px;background:#fff;color:#4b5563;font-size:11px;cursor:pointer}.calendar-day button:hover{border-color:#94a3b8}.calendar-day button.selected{font-weight:800}.calendar-rule-row button:first-child.selected{background:#e7f1ed;border-color:#abcbbf;color:#245f4f}.calendar-rule-row button:last-child.selected{background:#f7ead3;border-color:#dfbd80;color:#8a5715}.calendar-day .calendar-closed{margin-top:5px}.calendar-day .calendar-closed.selected{background:#dedfdb;border-color:#c4c6c1;color:#51575a;font-weight:800}.calendar-empty{min-height:1px}.calendar-head{align-items:flex-end}
@media(max-width:1200px){.calendar-weekdays{display:none}.business-calendar{grid-template-columns:repeat(4,minmax(150px,1fr))}.calendar-empty{display:none}}
@media(max-width:760px){.business-calendar{grid-template-columns:repeat(2,minmax(130px,1fr))}.calendar-head{align-items:flex-start;flex-direction:column}}
@media(max-width:480px){.business-calendar{grid-template-columns:1fr}}

/* 全站共用「營業月曆」視覺：柔和綠、暖米色、細框與輕量卡片 */
:root{
  --bg:#f6f7f3;
  --panel:#ffffff;
  --text:#19251f;
  --muted:#6d7771;
  --line:#dde2dd;
  --blue:#3f7f6e;
  --blue-soft:#e7f1ed;
  --green:#2f6f5f;
  --green-soft:#e7f1ed;
  --amber:#8a5715;
  --amber-soft:#f7ead3;
  --gray-soft:#f0f1ee;
}
body{background:var(--bg);color:var(--text)}
.app-shell{grid-template-columns:224px minmax(0,1fr)}
.sidebar{
  background:#f2f4f0;
  color:var(--text);
  border-right:1px solid #d9ded9;
  padding:24px 14px;
}
.brand{color:#203d34;letter-spacing:.01em}
.brand-sub{color:#77817b}
.nav-item{
  color:#56625c;
  border:1px solid transparent;
  padding:10px 12px;
  border-radius:10px;
  transition:background .15s,border-color .15s,color .15s;
}
.nav-item:hover{background:#f9faf7;color:#2f5f51;border-color:#dce4df}
.nav-item.active{
  background:#e6f0eb;
  color:#245f4f;
  border-color:#b8cec4;
  box-shadow:inset 3px 0 0 #4f8f7b;
}
.main{padding:24px 28px}
.topbar{
  background:#fff;
  border:1px solid var(--line);
  border-radius:13px;
  padding:13px 16px;
  margin-bottom:16px;
}
.topbar h1{color:#20342d;font-size:23px}
.card{
  border-color:var(--line);
  border-radius:12px;
  box-shadow:none;
  margin-bottom:14px;
}
.stats-grid{gap:10px}
.stats-grid>.card{position:relative;overflow:hidden}
.stats-grid>.card::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:#b7cec4}
.stat-label{color:#707a74;font-weight:700}
.stat-value{color:#285d4f}
.pill{background:#e7f1ed;color:#245f4f;border:1px solid #c7dcd3}
.btn{
  color:#46534d;
  border-color:#d8ded9;
  border-radius:9px;
  background:#fff;
  transition:background .15s,border-color .15s,color .15s;
}
.btn:hover{background:#f4f7f4;border-color:#b9cbc2;color:#285d4f}
.btn.primary{background:#4f8f7b;color:#fff;border-color:#4f8f7b}
.btn.primary:hover{background:#3f7968;border-color:#3f7968}
.btn:focus-visible,.nav-item:focus-visible,.action:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid #4f8f7b;
  outline-offset:2px;
}
.flow span{background:#fafbf8;border-color:#dfe4df;color:#405048;border-radius:9px}
.flow b{color:#78a091}
.form-card>.section-head{background:#f7f8f5}
.form-section-title,.field>span{color:#44534c}
.field input,.field select,.toolbar input,.requirement-table input,.modal-card select,.modal-card textarea{
  border-color:#d6ddd8;
  color:var(--text);
}
.field input:focus,.field select:focus,.toolbar input:focus,.requirement-table input:focus,.modal-card select:focus,.modal-card textarea:focus{
  border-color:#82aa9b;
  box-shadow:0 0 0 3px rgba(79,143,123,.12);
}
.check-box,.skill-grid{background:#f8f9f6}
th{background:#f4f6f3;color:#4f5d56}
.tag{background:#e7f1ed;color:#285d4f}
.action{border-color:#d8ded9;color:#4b5852}
.action.edit{background:#e7f1ed;color:#245f4f;border-color:#c2d8ce}
.note{background:#fafaf7;border-color:#cbd5ce;color:#526159}
.schedule-matrix-wrap{border-radius:11px}
.schedule-matrix th,.schedule-matrix th.sticky-name,.schedule-matrix th.sticky-shift{background:#f4f6f3}
.schedule-matrix td.editable:hover{outline-color:#82aa9b}

.cell-menu{border-color:#d7ddd8;box-shadow:0 14px 35px rgba(36,62,51,.14)}
.cell-menu button:hover{background:#eef4f0}
.version-item,.change-item{background:#fff;border-color:#dce1dc}
.change-arrow{color:#3f7968}
.custom-special-panel{background:#fafbf8}
.modal-overlay{background:rgba(27,43,36,.42)}
.modal-card{border:1px solid var(--line);border-radius:13px;box-shadow:0 24px 70px rgba(26,48,38,.2)}
.login-screen{background:linear-gradient(135deg,#edf3ef,#faf9f4 55%,#f7ead3)}
.login-card{border-color:#dbe2dc;box-shadow:0 24px 60px rgba(37,64,52,.12)}
.business-calendar-card{border-color:#dfe2de}
.calendar-weekdays{color:#69756f}
.calendar-day{border-color:#dfe3e0}
.calendar-day button{border-color:#dfe3e0;color:#4c5852}

@media(max-width:1050px){
  .sidebar{padding:14px 16px;border-right:0;border-bottom:1px solid #d9ded9}
  .brand-sub{margin:3px 0 12px}
  .sidebar nav{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}
  .nav-item{width:auto;flex:0 0 auto;margin:0}
  .nav-item.active{box-shadow:inset 0 -3px 0 #4f8f7b}
  .main{padding:16px}
}
@media(max-width:650px){
  .stats-grid{grid-template-columns:1fr}
  .topbar{align-items:flex-start;flex-direction:column}
}

/* Closed dates remain editable, with a neutral appearance for every control. */
.calendar-day.closed{
  background:#eeeeee;
  border-color:#cccccc;
  color:#666666;
  filter:grayscale(1);
  opacity:1;
}
.calendar-day.closed.today{
  border-color:#999999;
  box-shadow:0 0 0 2px #999999;
}
.calendar-day.closed .calendar-day-head,
.calendar-day.closed .calendar-day-head b,
.calendar-day.closed .calendar-day-head span{
  color:#666666;
}
.calendar-day.closed button{
  background:#f7f7f7;
  border-color:#cccccc;
  color:#666666;
}
.calendar-day.closed .calendar-closed.selected{
  background:#d9d9d9;
  border-color:#aaaaaa;
  color:#444444;
}
.calendar-day.closed button:hover{
  background:#e3e3e3;
  border-color:#999999;
}

/* Freeze the date and weekday rows as one header, preserving left columns. */
.schedule-matrix thead{
  position:sticky;
  top:0;
  z-index:6;
}
.schedule-matrix thead th{
  top:auto;
}

/* 極簡班表：文字為主，只在選定職務時加上單一強調色。 */
.schedule-matrix{--row-bg:#fff;color:#37413c}
.schedule-matrix th,.schedule-matrix td{border-right-color:#f0f1ef;border-bottom-color:#f0f1ef}
.schedule-matrix td{background:var(--row-bg);padding:5px 4px}
.schedule-matrix tr.employee-alt{--row-bg:#fafbf9}
.schedule-matrix td.sticky-name,.schedule-matrix td.sticky-shift{background:var(--row-bg)}
.schedule-matrix .sticky-shift{color:#68716b;border-right-color:#d5dad5;font-weight:500}
.schedule-matrix tbody tr:nth-child(2n) td,.schedule-matrix td.sticky-name{border-bottom-color:#d9ded9}
.schedule-matrix th.weekend{background:#efefeb;color:#565e57}
.schedule-matrix th.special-day{box-shadow:none}
.schedule-matrix .special-mark{color:#d14343}
.schedule-matrix .job{color:#37413c;font-weight:500}
.schedule-matrix .o{background:transparent;color:#6a9678;font-weight:600}
.schedule-matrix .x{background:transparent;color:#bd7d79;font-weight:600}
.schedule-matrix .rest{background:#faf0ee;color:#945c55;font-weight:500}
.schedule-matrix .closed{background:#f0f1ee;color:#787e78;font-weight:400}
.schedule-matrix .job-highlight{background:#e3efe8;color:#245c43;font-weight:700;box-shadow:inset 0 -2px 0 #80a68e}
.schedule-matrix tbody tr:hover td:not(.job-highlight):not(.o):not(.x){box-shadow:inset 0 0 0 999px rgba(55,75,64,.035)}
.schedule-matrix td.editable:hover{outline:2px solid #8ca294;outline-offset:-2px}
.schedule-card .legend{gap:14px;color:#68716b}
.schedule-card .lg{padding:2px 4px;border-radius:3px;background:transparent}
.schedule-card .lg.o{background:transparent;color:#6a9678}
.schedule-card .lg.x{background:transparent;color:#bd7d79}
.schedule-card .lg.rest{background:#faf0ee;color:#945c55}
.schedule-card .lg.closed{background:#f0f1ee;color:#787e78}
.schedule-highlight-controls{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:0 0 10px;font-size:12px}
.highlight-label{color:#68716b;margin-right:5px}
.schedule-highlight-controls button{border:1px solid transparent;border-radius:5px;background:transparent;color:#59635c;padding:5px 8px;cursor:pointer}
.schedule-highlight-controls button:hover{background:#f1f3ef}
.schedule-highlight-controls button[aria-pressed="true"]{background:#e7eee8;border-color:#c4d4c7;color:#315d42;font-weight:700}
.schedule-highlight-controls button:focus-visible{outline:2px solid #8ca294;outline-offset:2px}

.schedule-month-tabs{display:flex;gap:6px;overflow-x:auto;margin-bottom:12px;padding-bottom:4px}
.schedule-month-tabs button{flex:0 0 auto;border:1px solid #dce2dc;border-radius:8px;padding:8px 12px;background:#fff;color:#59635c;cursor:pointer}
.schedule-month-tabs button[aria-selected="true"]{background:#e7eee8;border-color:#9eb8a5;color:#254d35;font-weight:700}
.schedule-month-tabs small{display:block;margin-top:3px;font-weight:400;color:#68716b}
.schedule-month-tabs button:focus-visible{outline:2px solid #4f8f7b;outline-offset:2px}
.employee-link-input{width:100%;padding:10px;border:1px solid #cbd5ce;border-radius:6px}

.schedule-progress{align-items:center;justify-content:space-between}
.schedule-progress ol{display:flex;flex-wrap:wrap;gap:16px;list-style:none;margin:0;padding:0;color:#899189;font-size:12px}
.schedule-progress .current{color:#315f45;font-weight:700}
.schedule-next-step{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px;margin-bottom:16px;border:1px solid #dce2dc;border-radius:12px;background:#fff}
.schedule-next-step h3{margin:0 0 6px;font-size:16px}
.schedule-next-step p{margin:0 0 7px;color:#637167;line-height:1.6;font-size:13px;max-width:670px}
.schedule-next-step .muted+.muted{margin-left:14px}
.deadline-state{display:block;margin-top:7px;color:#66756a;font-size:12px}
.deadline-state.warning{color:#9a6a24;font-weight:700}
.deadline-state.overdue{color:#a34242;font-weight:700}
.schedule-step-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0}
.schedule-step-actions details{position:relative;font-size:12px;color:#68776c}
.schedule-step-actions summary{cursor:pointer;padding:9px}
.schedule-step-actions details[open] .schedule-other-menu{position:absolute;right:0;top:36px;z-index:12;white-space:nowrap;box-shadow:0 5px 18px #0001;background:white;padding:8px;border:1px solid #dce2dc;border-radius:8px;display:grid;gap:8px}
@media(max-width:1100px){.schedule-next-step{align-items:flex-start;flex-direction:column}.schedule-step-actions{flex-shrink:1}.schedule-progress{gap:12px}.schedule-progress ol{gap:10px}}

/* 假日用淡鵝黃區分；排休保留淺紅底，O／X 沿用日期底色。 */
.schedule-matrix th.weekend,.schedule-matrix td.weekend:not(.rest){background:#fffbe8}
.schedule-matrix td.weekend.job-highlight{background:#e3efe8}
.history-link{display:block;margin:12px 0;padding:4px 0;border:0;background:none;color:#486757;font:inherit;font-size:13px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.history-link:focus-visible{outline:2px solid #486757;outline-offset:4px}
.history-dialog{width:min(680px,calc(100vw - 32px));max-height:80vh;padding:20px;border:1px solid #dce2dc;border-radius:12px;box-sizing:border-box;box-shadow:0 24px 70px #1a302633}
.history-dialog::backdrop{background:rgba(27,43,36,.42)}
/* 營業月曆 change impact, shown before saving (owner, 2026-11-19) */.calendar-impact-dialog h3{margin:0 0 6px}.calendar-impact-lead{margin:0 0 10px;color:#4d6358}.calendar-impact-dialog h4{margin:12px 0 4px;font-size:14px;color:#245c46}.calendar-impact-dialog ul{margin:0;padding-left:20px}.calendar-impact-dialog li{margin:4px 0;line-height:1.55}.calendar-impact-dialog .form-actions{margin-top:16px}
.history-dialog .section-head{margin-bottom:12px}
.history-scroll{max-height:60vh;overflow:auto;overscroll-behavior:contain}
.calendar-custom{width:100%;margin-top:5px;padding:5px;border:1px solid #dce2dc;border-radius:5px;background:white;color:#526358;cursor:pointer}
.calendar-custom.selected{background:#edf2ee;border-color:#6f8c79;font-weight:700}
.calendar-custom-name{font-size:11px;margin-top:5px;color:#526358;overflow-wrap:anywhere}
.custom-day-dialog .field+.field{display:block;margin-top:5px}
.custom-day-requirements{max-height:36vh;overflow:auto;margin:12px 0}

/* AI assistant */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
button:disabled,textarea:disabled{cursor:not-allowed;opacity:.58}

.settings-card{max-width:1050px}.catalog-add{display:flex;gap:10px;max-width:480px;margin-top:22px}.catalog-add input,.catalog-row input{min-width:0;width:100%;border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:#fff;font:inherit}.catalog-list{display:grid;gap:10px}.catalog-row{display:grid;grid-template-columns:28px minmax(120px,1fr) repeat(4,auto);align-items:center;gap:8px;padding:14px;background:#f8faf8;border:1px solid var(--line);border-radius:10px}.catalog-position{color:#738177;font-size:13px}.catalog-usage{grid-column:2/-1;color:#68756d;line-height:1.6}.catalog-message{color:#a13a32;min-height:1.5em}.catalog-add .btn{white-space:nowrap}@media(max-width:560px){.catalog-row{grid-template-columns:24px repeat(4,1fr)}.catalog-row input{grid-column:2/-1}.catalog-row button:nth-of-type(1){grid-column:2}.catalog-usage{grid-column:1/-1}.catalog-row .btn{padding:8px}.catalog-add{flex-wrap:wrap}}

.cell-menu{width:208px;max-height:min(380px,calc(100vh - 16px));padding:0;overflow:hidden;display:flex;flex-direction:column}.cell-menu-options{padding:6px;overflow-y:auto;min-height:0}.cell-menu-label{padding:9px 8px 4px;color:#748078;font-size:11px;font-weight:700;letter-spacing:.06em}.cell-menu-actions{flex-shrink:0;padding:6px;border-top:1px solid #dce3de;background:#f6f8f6}.cell-menu .cell-menu-clear{display:flex;gap:10px;align-items:center;background:transparent;color:#655047}.cell-menu-clear>span:first-child{font-size:23px}.cell-menu-clear strong{display:block;font-size:13px;font-weight:600}.cell-menu-clear small{display:block;margin-top:3px;color:#7b807c;font-size:11px}.cell-menu .cell-menu-clear:hover{background:#ede7e2}.cell-menu button:focus-visible{outline:2px solid #568375;outline-offset:-2px}

.special-job-badge{display:inline-block;margin-left:8px;padding:2px 6px;border-radius:4px;background:#f4edda;color:#7b6228;font-size:10px;font-weight:600;vertical-align:middle}.catalog-usage .special-job-badge{margin-left:0}.catalog-row input[readonly]{background:#f1f3f0;color:#536159}

.cell-menu button[data-value="排休"],.catalog-row input.rest-option[readonly]{color:#b91c1c;font-weight:700}
.schedule-convenience{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}
.schedule-convenience[hidden]{display:none}
.schedule-tool-dialog{width:min(1050px,94vw);max-height:88vh;border:1px solid #dce2dc;border-radius:12px;padding:20px;color:#263c30;background:white;box-sizing:border-box}
.schedule-tool-dialog::backdrop{background:#1b2b246b}
.schedule-tool-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}
.schedule-tool-dialog h3{margin:0}
.tool-dialog-body{margin-top:14px}
.schedule-tool-dialog .field{display:flex;flex-direction:column;gap:5px;margin:12px 0}
.batch-date-range{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.tool-table{border-collapse:collapse;width:100%;font-size:13px}
.tool-table th,.tool-table td{border:1px solid #dce2dc;padding:8px;text-align:left}
.snapshot-table{white-space:nowrap}
.tool-dialog-body .table-wrap{overflow:auto;max-height:62vh}
.version-item{align-items:center;flex-wrap:wrap}
.daily-view-tabs,.daily-date-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}
.daily-view-tabs [aria-pressed="true"]{background:#e7eee8;border-color:#9eb8a5;color:#254d35}
#dailyStaffing[hidden],#scheduleMatrix[hidden],#scheduleHighlightControls[hidden]{display:none}
.daily-date-controls input{padding:7px;border:1px solid #dce2dc;border-radius:6px;font:inherit}
.daily-shifts{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.daily-shift{min-width:0;border:1px solid #dce2dc;border-radius:10px;padding:12px}
.daily-shift h4{margin:0 0 10px;font-size:17px}
.daily-job{padding:10px 0;border-bottom:1px solid #e5e9e4}
.daily-job-title{border:0;background:none;color:#315d42;text-decoration:underline;text-underline-offset:3px;font-weight:700;cursor:pointer;padding:4px 8px 4px 0}
.daily-job>span{font-size:12px}
.daily-person{margin:5px 5px 0 0;padding:7px 10px;border:1px solid #dce2dc;border-radius:7px;background:white;cursor:pointer;color:#37413c}
.daily-rest{margin:12px 0;padding:10px;background:#faf0ee;border-radius:8px;color:#945c55;font-size:13px}
.daily-shift details{margin-top:12px;font-size:13px}.daily-shift summary{cursor:pointer}
.daily-closed{padding:18px;background:#f0f1ee;border-radius:8px;color:#787e78}
.daily-date-link{background:none;border:0;padding:0;color:inherit;font:inherit;cursor:pointer;width:100%;text-decoration:underline;text-underline-offset:3px}
@media(max-width:760px){.daily-shifts{grid-template-columns:1fr}.daily-date-controls label{flex-basis:100%}}

/* Compact staffing review: lists scroll inside the panel instead of extending the page. */
#gapPanel{margin-bottom:16px}
#gapPanel summary{cursor:pointer;font-weight:700;padding:4px}
.staffing-columns{display:grid;grid-template-columns:minmax(200px,1fr) minmax(240px,1.4fr);gap:16px}
.staffing-gap-list,.staffing-candidates{max-height:320px;overflow:auto;overscroll-behavior:contain;padding:4px}
.staffing-gap{display:block;width:100%;text-align:left;border:1px solid #dce2dc;background:white;border-radius:7px;padding:10px;margin-bottom:6px;cursor:pointer;color:#37413c}
.staffing-gap span{display:block;font-size:12px;margin-top:4px;color:#68716b}
.staffing-gap[aria-pressed="true"]{border-color:#4f8f7b;background:#edf5ef}
.staffing-overages{margin:0 0 16px;padding:12px;border:1px solid #ddc99d;border-radius:9px;background:#fffbf1}.staffing-overages h3{margin:0 0 8px;font-size:14px;color:#805717}.staffing-overages>.muted{font-size:12px;line-height:1.6}.staffing-overage-list{max-height:300px;overflow:auto;overscroll-behavior:contain;display:grid;gap:8px}.staffing-overage{padding:10px;border:1px solid #eadcc1;background:white;border-radius:7px;overflow-wrap:anywhere}.overage-locate{border:0;background:transparent;color:#754e17;text-align:left;font:inherit;font-weight:600;padding:2px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.staffing-overage-count{color:#805717;font-size:13px}.staffing-overage-count strong{font-weight:700}.staffing-overage-people{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px}.staffing-overage-people .daily-person{margin:0}.staffing-overage p{margin:7px 0}
.staffing-candidates h3{font-size:14px;margin:0 0 8px}
.staffing-person{background:white;border:1px solid #dce2dc;border-radius:8px;padding:10px;margin:8px 0}
.staffing-person p{line-height:1.6;margin:6px 0;font-size:12px}
.schedule-matrix td.gap-focus{outline:2px solid #4f8f7b;outline-offset:-2px}
.assignment-warnings{max-height:240px;overflow:auto;color:#9b3939;line-height:1.7}
.schedule-tool-dialog textarea{width:100%;font:inherit;border:1px solid #cbd5ce;border-radius:6px;padding:8px}
@media(max-width:700px){.staffing-columns{grid-template-columns:1fr}.staffing-gap-list{max-height:180px}.staffing-candidates{max-height:280px}}
.monthly-statistics{margin:12px 0;border:1px solid #dce3df;border-radius:10px;padding:12px;background:#fff}
.monthly-statistics>summary{cursor:pointer;font-weight:600;color:#355e52}
.monthly-statistics-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}.monthly-statistics-filter select{min-height:40px;max-width:100%;padding:7px 10px;border:1px solid #dce3df;border-radius:8px;background:#fff;color:inherit}.monthly-statistics-filter .muted{white-space:normal}
.monthly-statistics-scroll{overflow:auto;max-height:440px}
.monthly-statistics table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;white-space:nowrap}
.monthly-statistics caption{text-align:left;padding:8px 0;white-space:normal}
.monthly-statistics th,.monthly-statistics td{padding:9px 12px;text-align:center;border-bottom:1px solid #e5e7eb;background:#fff}
.monthly-statistics thead th{position:sticky;top:0;z-index:2;background:#f3f5f3}
.monthly-statistics tbody th{position:sticky;left:0;z-index:1;text-align:left}
.monthly-statistics small{display:block;font-weight:normal;color:#66736e;margin-top:4px}
.statistics-name{border:0;background:none;color:#355e52;text-decoration:underline;cursor:pointer;font:inherit;padding:3px 0}
.statistics-name[aria-pressed=true]{font-weight:700;text-decoration-thickness:2px}
.statistics-help{font-size:12px;line-height:1.7;margin-bottom:0}
.employee-focus-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;margin:10px 0;background:#f0f6f3;border:1px solid #b6cfc3;border-radius:8px;flex-wrap:wrap}
#monthlyStatistics[hidden],#employeeFocusBar[hidden],.schedule-matrix tbody tr[hidden]{display:none!important}
.schedule-matrix tr.employee-focused .sticky-name{box-shadow:inset 3px 0 #508b78}
.publication-review{width:min(800px,94vw)}
.review-section{border:1px solid #dce3df;border-radius:8px;margin:12px 0;padding:10px}
.review-section>summary{cursor:pointer;font-weight:600}
.review-list{max-height:230px;overflow:auto;overscroll-behavior:contain}
.review-list p{margin:8px 0;line-height:1.6}
.review-list article{border-bottom:1px solid #e5e7eb;padding:8px 0}
.review-locate{font:inherit;background:none;border:0;color:#355e52;text-decoration:underline;text-align:left;cursor:pointer;padding:3px}
.review-note{white-space:pre-wrap;font-size:12px;color:#68716b}
.review-ack{display:block;line-height:1.7;margin-top:12px}
.publication-review [data-error]{color:#a33d3d}
.publication-audit{font-size:12px;flex-basis:100%;line-height:1.6}
.publication-audit summary{cursor:pointer}
.absence-panel{margin:12px 0;border:1px solid #dce3df;border-radius:10px;padding:12px}
.absence-panel>summary{cursor:pointer;font-weight:600}
.absence-records{max-height:300px;overflow:auto}
.absence-records article{padding:10px 0;border-bottom:1px solid #e5e7eb}
.absence-records p{margin:6px 0;white-space:pre-wrap}
.absence-dialog .note{white-space:pre-wrap}
.absence-dialog [data-error]{color:#a33d3d}
#absencePanel[hidden]{display:none!important}
.dashboard-tasks{margin:16px 0}
.todo-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}
.todo-counts>span{padding:12px;border:1px solid #e0e6e2;border-radius:8px;font-size:13px;color:#5f6c65}
.todo-counts strong{display:block;margin-top:7px;color:#304c40;font-size:20px}
.todo-list{max-height:460px;overflow:auto;overscroll-behavior:contain}
.todo-list article{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 2px;border-bottom:1px solid #e5e7eb}
.todo-list h3{font-size:15px;margin:5px 0}
.todo-list p{font-size:13px;color:#637168;line-height:1.6;margin:0;overflow-wrap:anywhere}
.todo-list .btn{flex-shrink:0}
.todo-kind{font-size:12px;color:#4f806d}
.todo-empty{padding:16px;text-align:center;color:#607268}
@media(max-width:700px){.todo-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.todo-list article{align-items:flex-start;flex-direction:column}}

.workload-context{white-space:pre-line;font-size:13px;line-height:1.7;color:#475569;background:#f8fafc;padding:10px;border-radius:6px}.workload-context:empty{display:none}.fairness-summary{padding:8px 12px;border-bottom:1px solid #e5e7eb}.fairness-summary p{line-height:1.7}

/* Readable admin workspace: primary workflow first, secondary tools on demand. */
:root{--bg:#f5f6f3;--panel:#fff;--text:#263c34;--muted:#69766f;--line:#e0e6e1;--blue:#356b58;--blue-soft:#edf4ef}
body{line-height:1.5}.app-shell{grid-template-columns:208px minmax(0,1fr)}.sidebar{background:#203d32;padding:28px 16px}.brand{font-size:19px;letter-spacing:.04em}.brand-sub{color:#b5c9bd;letter-spacing:.13em;font-size:11px;margin:8px 0 28px}.nav-item{padding:12px 14px;color:#dce7df;font-size:14px;border-radius:10px;margin:5px 0}.nav-item.active{background:#f0f5ef;color:#264d3d;font-weight:750}.nav-item:hover:not(.active){background:#315345}.main{min-width:0;padding:24px 28px}.topbar{padding-bottom:20px;border-bottom:1px solid var(--line);gap:16px}.topbar h1{font-size:23px;letter-spacing:.03em}.top-actions{gap:8px;flex-wrap:wrap}.top-actions .pill{background:transparent;padding:4px;color:#62746a;font-size:12px}#clock{font-variant-numeric:tabular-nums;font-weight:400}.top-actions .btn{font-size:12px;min-height:36px}.card{border-radius:14px;border-color:var(--line);box-shadow:0 2px 8px #213c3205}.btn{min-height:40px;font-size:13px;font-weight:600;border-color:#d8e1da;padding:9px 14px;border-radius:9px;transition:background .15s,border-color .15s}.btn:hover{background:#f1f5ef;border-color:#adc5b6}.btn.primary{background:#356b58;border-color:#356b58;color:white}.btn.primary:hover{background:#285642;border-color:#285642}.btn:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #87ad9a;outline-offset:3px}.field input,.field select,.field textarea{min-height:42px;border-radius:8px}.form-section{padding:20px}.form-grid{gap:16px}.section-head h2{font-size:19px}.section-head h3{font-size:16px}
.schedule-head{margin:22px 0 14px}.schedule-head h2{margin:0 0 4px}.month-tabs{gap:8px}.month-tabs button{border-radius:10px;min-height:46px}.schedule-progress{margin:16px 0 0;padding:12px 18px;background:#fff;border:1px solid var(--line);border-radius:14px 14px 0 0;gap:14px}.schedule-progress #monthState{background:#edf4ef;color:#355b47;font-size:12px}.schedule-progress ol{gap:8px;flex-wrap:wrap}.schedule-progress li{font-size:12px;color:#718075;border-radius:6px;padding:5px 10px}.schedule-progress li.current{background:#eaf2ec;color:#285642;font-weight:700}.schedule-next-step{margin-top:0;margin-bottom:14px;padding:18px;background:#fff;border:1px solid var(--line);border-top:0;border-radius:0 0 14px 14px;box-shadow:0 4px 12px #213c3204}.schedule-next-step h3{font-size:20px;margin:0 0 6px}.schedule-next-step p{font-size:13px;color:#68776d;max-width:650px;margin:0 0 10px}.schedule-next-step #fillWindow,.schedule-next-step #publishState{display:inline-block;margin-right:12px}.schedule-step-actions{align-items:center;gap:8px}.schedule-step-actions .primary{min-width:128px;min-height:44px}.deadline-state{font-size:12px}#scheduleOtherActions>summary{font-size:13px;min-height:40px;padding:9px 12px;border-radius:9px}.schedule-other-menu{z-index:20;padding:12px;box-shadow:0 8px 28px #243b3220}.schedule-other-menu #btnRemoveMonth{color:#9d4845}
#gapPanel{padding:0;background:transparent;border:0;margin:0 0 18px}#gapPanel>details{background:white;border:1px solid var(--line);border-radius:10px;margin-top:8px}#gapPanel>details>summary{padding:10px 14px;font-size:12px;color:#63746b;cursor:pointer}.schedule-attention{padding:14px 16px;background:#edf2ed;border:1px solid #dfe7df;border-radius:12px}.attention-heading{display:flex;align-items:center;gap:12px;margin-bottom:10px}.attention-heading strong{font-size:13px}.attention-heading span{font-size:12px;color:#6e7c71}.attention-actions{display:flex;gap:10px}.attention-actions>button{flex:1;text-align:left;border:1px solid #dde5dd;background:#fff;border-radius:9px;padding:12px 14px;color:#314b3d;cursor:pointer;display:grid;gap:3px;min-width:0}.attention-actions>button:hover{border-color:#8caf99;background:#fcfefb}.attention-actions span{font-size:11px;color:#738073}.attention-actions strong{font-size:15px;font-weight:650}.attention-actions small{font-size:11px;color:#617b6b}.staffing-body{padding:14px}
.schedule-card{padding:16px;overflow:visible}.schedule-help{font-size:12px;color:#7a847d;margin-bottom:12px}.schedule-convenience{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0 14px}.schedule-extra-tools{margin-left:auto}.schedule-extra-tools>summary{cursor:pointer;padding:9px 14px;border:1px solid #d8e1da;border-radius:9px;font-size:13px;min-height:40px;background:#fff}.schedule-extra-tools[open]{flex-basis:100%;margin-left:0}.schedule-extra-tools[open]>summary{width:max-content}.schedule-extra-content{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#f7f9f6;border:1px solid #e3e9e1;border-radius:9px;padding:12px;margin-top:8px}.schedule-extra-content .muted{font-size:12px;margin-right:8px}.daily-view-tabs{border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:12px}.daily-view-tabs .btn[aria-pressed=true]{background:#eaf2ec;color:#2d5e46;border-color:#b2cbb9}.monthly-statistics{margin:8px 0;border:1px solid #e2e7df;border-radius:9px}.monthly-statistics>summary{font-size:12px;padding:10px 12px;color:#607264}.schedule-highlight-controls{display:block!important;padding:0!important;border:0!important;background:transparent!important;margin:8px 0 12px}.schedule-highlight-controls>summary{cursor:pointer;font-size:12px;color:#607264;padding:8px 0}.highlight-options{display:flex;flex-wrap:wrap;gap:6px;padding:6px 0}.schedule-highlight-controls button{min-height:34px}.schedule-history>summary{cursor:pointer;font-size:14px;font-weight:650;color:#53695a}.schedule-history[open]>summary{margin-bottom:16px}.legend{font-size:11px;gap:10px;padding-top:12px}.history-link{font-size:12px}.stats-grid .stat{padding:20px}.stat-label{font-size:12px}.stat-value{color:#355c47}.todo-counts>span{background:#f8faf7}.schedule-tool-dialog{border:1px solid #d7e1d8;border-radius:16px;box-shadow:0 20px 70px #17352730}.schedule-tool-dialog::backdrop{background:#1f382b66;backdrop-filter:blur(2px)}
@media(max-width:1000px){.app-shell{grid-template-columns:170px minmax(0,1fr)}.sidebar{padding:22px 10px}.brand{font-size:16px}.main{padding:18px}.topbar{align-items:flex-start}.top-actions #clock{display:none}.schedule-next-step{flex-wrap:wrap}.schedule-step-actions{flex-wrap:wrap}.attention-heading{align-items:flex-start;flex-direction:column;gap:3px}}
@media(max-width:700px){.app-shell{display:block}.sidebar{padding:14px 12px}.brand{font-size:17px}.brand-sub{display:none}#nav{display:flex;gap:5px;overflow-x:auto;margin-top:10px;padding-bottom:4px;scrollbar-width:thin}.nav-item{width:auto;white-space:nowrap;margin:0;padding:10px 12px;min-height:44px;font-size:13px}.main{padding:14px 10px}.topbar{flex-wrap:wrap;gap:10px;margin-bottom:14px;padding-bottom:12px}.topbar h1{font-size:21px}.top-actions{width:100%;justify-content:flex-end}.top-actions #storageState{margin-right:auto}.schedule-head{margin-top:16px}.schedule-head h2{font-size:18px}.schedule-progress{padding:10px}.schedule-progress ol{padding:0;margin:4px 0;gap:4px}.schedule-progress li{padding:5px 6px;font-size:11px}.schedule-next-step{padding:14px 12px;gap:14px}.schedule-next-step h3{font-size:18px}.schedule-step-actions{width:100%}.schedule-step-actions .primary{flex:1}.attention-actions{flex-direction:column;gap:7px}.attention-actions>button{grid-template-columns:1fr auto;align-items:center;padding:10px 12px;min-height:64px}.attention-actions strong{grid-row:1 / 3;grid-column:2;font-size:14px}.attention-actions small{grid-column:1}.schedule-attention{padding:12px}.schedule-card{padding:12px 8px}.schedule-convenience .btn,.schedule-extra-tools>summary{min-height:44px}.schedule-extra-content{align-items:stretch}.schedule-extra-content .btn{flex:1 1 130px}.schedule-extra-content .muted{flex-basis:100%}.form-grid.cols-4,.form-grid.cols-3,.form-grid.cols-2{grid-template-columns:1fr}.section-head{flex-wrap:wrap;gap:10px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-value.small-value{font-size:17px}}
@media(prefers-reduced-motion:reduce){.btn{transition:none}html{scroll-behavior:auto}}

.sidebar .brand{color:#f0f5ef}.schedule-highlight-controls[hidden]{display:none!important}
@media(min-width:1001px){.topbar{padding:14px 18px;margin-bottom:14px}.schedule-head{margin:14px 0 10px}.schedule-progress{padding:9px 16px}.schedule-next-step{padding:14px 16px}.schedule-attention{padding:10px 14px}.attention-actions>button{padding:9px 12px}.attention-heading{margin-bottom:7px}}

.schedule-extra-content .history-link{margin:0;min-height:40px;padding:9px 14px;border:1px solid #d8e1da;border-radius:9px;background:white;text-decoration:none;color:#53695a}
@media(max-width:700px){#nav{scrollbar-width:none}#nav::-webkit-scrollbar{display:none}}

.employment-badge{font-size:12px;background:#edf2ed;border-radius:5px;padding:4px 7px;white-space:nowrap}.employment-upcoming{display:block;color:#866b3e;font-size:11px;margin-top:5px}.employment-dialog{width:min(720px,94vw)}.employment-dialog .field{display:block;margin-bottom:14px}.employment-dialog textarea{width:100%}.employment-impact{max-height:220px;overflow:auto}.employment-impact p{margin:5px 0;font-size:12px}.employment-history{margin-top:20px}.employment-dialog [data-error]{color:#a33d3d}.employment-dialog [data-preview]{padding:14px;background:#f5f8f3;border-radius:10px}.schedule-matrix td.inactive-cell{background:#f0f1ef!important;color:#8b928c;font-size:11px;cursor:default}

.employment-dialog [hidden]{display:none!important}
/* Scheduling relationship groups */
.relation-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;margin-top:12px}
.relation-card{border:1px solid #dde3e6;border-radius:12px;padding:18px;background:#fff;min-width:0}
.relation-card header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.relation-card h3{margin:0;font-size:17px}.relation-card p{line-height:1.7}
.relation-mode{font-size:12px;padding:4px 9px;border-radius:20px;background:#f1f4f5;color:#475569}
.relation-card .form-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.relation-card details summary{cursor:pointer;min-height:36px;padding-top:8px}
.relation-members{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:6px}
.relation-members label{display:flex;gap:8px;align-items:center;min-height:44px;padding:4px 8px;cursor:pointer}
.relation-dialog .field{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.relation-dialog fieldset{margin:12px 0 20px;border:1px solid #dde3e6;border-radius:8px}
.relation-dialog .relation-options{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.relation-dialog [data-roles]{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.relation-dialog [data-error]{color:#a63030}.relation-dialog [hidden]{display:none!important}
@media(max-width:560px){.relation-card{padding:14px}.relation-card .form-actions .btn{flex:1;min-height:44px}.relation-dialog .relation-options{grid-template-columns:1fr}}
.schedule-matrix tr.job-filter-hidden{display:none!important}

/* Distinguish key duties without changing day or leave backgrounds. */
.schedule-matrix td[data-job="帶位"]{color:#8b2635;font-weight:700}
.schedule-matrix td[data-job="櫃臺"]{color:#234b78;font-weight:700}

.department-catalogs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.department-catalogs section{min-width:0}
.department-catalogs .catalog-row{grid-template-columns:24px minmax(70px,1fr) repeat(4,auto);gap:4px}
@media(max-width:900px){.department-catalogs{grid-template-columns:1fr}}
@media(max-width:560px){.department-catalogs .catalog-row{grid-template-columns:24px repeat(4,1fr)}}

.kitchen-attendance{color:#15803d;font-size:12px;font-weight:700}

.employee-order-dialog{width:min(640px,94vw);max-height:90vh;border:1px solid #dce2dd;border-radius:14px;padding:22px;color:#29332f}.employee-order-dialog::backdrop{background:#0006}.employee-order-dialog h2{margin-top:0}.order-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.order-controls label{display:grid;gap:5px;flex:1;min-width:160px}.order-controls select{padding:9px;border:1px solid #cbd5e1;border-radius:7px;width:100%}.employee-order-list{padding:0;list-style:none;max-height:48vh;overflow:auto;border:1px solid #dce2dd;border-radius:8px}.employee-order-list li{display:flex;align-items:center;gap:12px;padding:8px;border-bottom:1px solid #edf0ed;background:white}.employee-order-list strong{flex:1}.employee-order-list small{color:#65706b}.order-handle{cursor:grab;border:0;border-radius:6px;background:#eef3ef;font-size:20px;padding:6px 10px;color:#496552}.order-handle:active{cursor:grabbing}.order-number,.employee-order-number{color:#65706b;min-width:22px;font-variant-numeric:tabular-nums}.employee-order-list .order-drop{box-shadow:inset 0 3px #15803d;background:#effaf1}.employee-order-dialog .form-actions{position:sticky;bottom:0;background:white;padding-top:10px}

.signup-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;max-height:60vh;overflow:auto;margin:14px 0}.signup-card{padding:14px;border:1px solid #dce2dd;border-radius:9px;background:#fff;white-space:normal}.signup-card small{display:block;margin-top:7px;color:#65706b}.signup-card p{margin:8px 0}.signup-link{display:inline-block;padding:8px 14px;border-radius:7px;background:#166534;color:white;text-decoration:none}#draftGaps,#shiftSignupAdmin{margin:16px 0;padding:14px;border:1px solid #dce2dd;border-radius:9px;background:#f8faf7}#draftGaps button{padding:8px 12px;border:1px solid #cbd5e1;border-radius:7px;background:white}#signupPanel button:disabled{opacity:.55;cursor:default}

#attendanceConfigForm .form-actions{align-items:center}#attendanceLocationStatus{max-width:420px}.attendance-status-complete{color:#166534;font-weight:700}.attendance-status-pending{color:#9a6700;font-weight:700}.attendance-policy-fields{margin-top:14px}.attendance-on-time{color:#166534;font-weight:700}.attendance-late{color:#b42318;font-weight:700}
.shift-definition-table-wrap{margin-top:14px}.shift-definition-table{width:100%;min-width:940px;border-collapse:collapse}.shift-definition-table th,.shift-definition-table td{padding:12px 10px;border:1px solid var(--line);vertical-align:middle;text-align:center}.shift-definition-table th{background:#f8faf8;color:#425247;font-size:13px}.shift-definition-table td:first-child,.shift-definition-table td:nth-child(2){min-width:118px}.shift-definition-table input{max-width:100%;margin:0}.shift-definition-table [data-shift-code]{width:82px;text-align:center;text-transform:uppercase}.shift-definition-table [data-shift-name]{width:135px;text-align:center}.shift-definition-table .shift-color-input{width:38px;height:30px;padding:2px;border:0;background:transparent;vertical-align:middle;cursor:pointer}.shift-definition-table .shift-time-range{display:flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}.shift-definition-table .shift-time-range input{width:112px}.shift-definition-table .shift-break{display:flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}.shift-definition-table .shift-break input{width:74px;text-align:right}.shift-work-hours{font-weight:700;color:#334b3d;white-space:nowrap}.shift-enabled{appearance:none;width:40px;height:22px;border:0;border-radius:999px;background:#aeb9b1;vertical-align:middle;cursor:pointer;position:relative;transition:background .18s}.shift-enabled::after{content:'';position:absolute;width:18px;height:18px;top:2px;left:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .18s}.shift-enabled:checked{background:#3694eb}.shift-enabled:checked::after{transform:translateX(18px)}.shift-definition-row.is-disabled{opacity:.62;background:#f6f7f6}.shift-definition-row.is-disabled .shift-work-hours{color:#76827a}@media(max-width:720px){.shift-definition-table{min-width:850px}.shift-definition-table th,.shift-definition-table td{padding:9px 7px}}

.settings-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px;border-bottom:1px solid var(--line);padding-bottom:12px}.settings-tabs [role="tab"]{min-height:44px;padding:10px 18px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#59635c;font:inherit;cursor:pointer}.settings-tabs [aria-selected="true"]{background:#e7eee8;border-color:#9eb8a5;color:#254d35;font-weight:700}.settings-tabs [role="tab"]:focus-visible,.settings-panel:focus-visible{outline:2px solid #4f8f7b;outline-offset:3px}.settings-panel[hidden]{display:none}

.shift-editor-dialog{width:min(620px,94vw);max-height:90vh;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:24px;color:var(--text)}.shift-editor-dialog::backdrop{background:#0006}.shift-editor-dialog h2{margin-top:0}.shift-editor-guide{margin:-4px 0 16px;padding:10px 12px;border:1px solid #c9ddce;border-radius:8px;background:#f3f8f4;color:#315440;font-size:13px}.shift-editor-dialog .field small{display:block;margin-top:4px;color:#66756d;font-size:11px}.shift-editor-dialog .form-actions{margin-top:18px}.shift-color-swatch{display:inline-block;width:28px;height:28px;vertical-align:middle}.shift-row-actions{display:flex;gap:6px;justify-content:center;white-space:nowrap}#shiftEditorError{min-height:1.5em;margin:10px 0 0;color:#b42318;font-weight:700}
/* 每人每天一格：在格內堆疊班別與職務，點選後一次調整整天。 */
.schedule-slot-time-label{appearance:none;border:0;border-radius:5px;background:transparent;padding:2px 3px;color:#426055;font:inherit;cursor:pointer}.day-editor-controls>label{display:grid;gap:3px;min-width:0}.day-editor-controls>label>small{margin-left:0;text-align:left;color:#65756c;font-size:10px}
.schedule-slot.leave{background:#faf0ee}.schedule-slot.leave .schedule-slot-value{color:#945c55}.day-editor-controls{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:6px;min-width:0}@media(max-width:700px){.day-editor-shift{grid-template-columns:1fr}.day-editor-controls{grid-template-columns:minmax(0,1fr) 108px}}
.schedule-day-matrix .sticky-name{width:84px;min-width:84px;max-width:84px}.schedule-day-matrix th,.schedule-day-matrix td{min-width:49px}.schedule-day-matrix td.schedule-day-cell{height:auto;padding:0;vertical-align:top;cursor:pointer}.schedule-day-cell .schedule-slot{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px 20px;align-items:center;gap:0;min-height:40px;padding:0 2px;border-bottom:1px solid #edf0ed;font-size:11px;text-align:center}.schedule-day-cell .schedule-slot:last-child{border-bottom:0}.schedule-slot-shift{display:flex;gap:4px;align-items:center;min-width:0;color:#607069;white-space:nowrap}.schedule-slot-shift b{font-size:10px;letter-spacing:.02em}.schedule-slot-shift i,.day-editor-shift i{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--shift-color);flex:0 0 auto}.schedule-slot-value{min-width:0;text-align:right;overflow:hidden;text-overflow:ellipsis;color:#33453d;font-weight:700;white-space:nowrap}.schedule-slot.o .schedule-slot-value{color:#6a9678}.schedule-slot.x .schedule-slot-value{color:#bd7d79}.schedule-slot.rest{background:#faf0ee}.schedule-slot.rest .schedule-slot-value{color:#945c55}.schedule-slot.rest .schedule-slot-value,.schedule-slot.leave .schedule-slot-value{font-weight:500}.schedule-slot.job-highlight{background:#e3efe8;color:#245c43;box-shadow:inset 0 -2px 0 #80a68e}.schedule-slot.gap-focus{outline:2px solid #4f8f7b;outline-offset:-2px}.schedule-day-matrix td.schedule-day-cell.inactive-cell,.schedule-day-matrix td.schedule-day-cell.closed{text-align:center;vertical-align:middle}.cell-menu:has(.day-editor-fields){width:min(430px,calc(100vw - 16px));max-height:min(580px,calc(100vh - 16px));overflow:auto}.day-editor-head{padding:13px 14px 8px;border-bottom:1px solid #dce3de;background:#f7f9f7}.day-editor-head strong,.day-editor-head small{display:block}.day-editor-head small{margin-top:4px;color:#718078;font-size:11px}.day-editor-presets{display:flex;gap:6px;padding:8px 10px;border-bottom:1px solid #e5eae6;background:#fbfcfa}.day-editor-presets button,.day-leave{border:1px solid #d6e0da;border-radius:7px;background:#fff;color:#466357;padding:6px 8px;font-size:11px;font-weight:700;cursor:pointer}.day-editor-presets button:hover,.day-leave:hover{background:#eef5f0}.day-editor-fields{padding:8px 10px}.day-editor-shift{display:grid;grid-template-columns:minmax(110px,1fr) minmax(120px,1.1fr) auto;align-items:center;gap:8px;padding:8px 2px;border-bottom:1px solid #edf0ed}.day-editor-shift:last-child{border-bottom:0}.day-editor-shift>span{display:flex;align-items:center;gap:5px;min-width:0;color:#405049;font-size:12px}.day-editor-shift small{display:block;margin-left:auto;color:#7b8780;font-size:10px;white-space:nowrap}.day-editor-shift select{width:100%;min-width:0;padding:7px;border:1px solid #d6ddd8;border-radius:7px;background:#fff;color:#263b31}.day-leave{color:#8d5b54;border-color:#ead4d0}.day-editor-actions{position:sticky;bottom:0;justify-content:flex-end;background:#f6f8f6;border-top:1px solid #dce3de}.schedule-day-matrix tbody tr:hover td:not(.schedule-day-cell.inactive-cell):not(.schedule-day-cell.closed){box-shadow:inset 0 0 0 999px rgba(55,75,64,.035)}@media(max-width:700px){.schedule-day-matrix th,.schedule-day-matrix td{min-width:49px}.schedule-day-matrix .sticky-name{width:70px;min-width:70px;max-width:70px}.day-editor-shift{grid-template-columns:1fr 1fr}.day-leave{grid-column:1/-1}.day-editor-presets{flex-wrap:wrap}}
/* Stack each shift time above its job; keep empty shifts aligned across dates. */
.schedule-day-cell .schedule-slot-time-label{gap:2px;padding:2px 0;justify-content:center;align-self:stretch}
.schedule-day-cell .schedule-slot-value{text-align:center;line-height:20px}
.schedule-day-matrix tbody td{border-bottom-color:#cbd5ce}
.schedule-day-matrix td.editable:hover{outline:none}
.schedule-day-cell .schedule-slot{appearance:none;width:100%;border:0;border-bottom:1px solid #edf0ed;border-radius:0;background:transparent;font-family:inherit;color:inherit;cursor:pointer}
.schedule-day-cell .schedule-slot:hover,.schedule-day-cell .schedule-slot:focus-visible{outline:2px solid #8ca294;outline-offset:-2px}
.schedule-day-cell .schedule-slot.o{background:transparent}
.schedule-day-cell .schedule-slot.x{background:transparent}
.schedule-day-cell .schedule-slot.rest{background:#faf0ee}
.schedule-day-cell .schedule-slot.leave{background:#faf0ee}
.schedule-day-cell .schedule-slot.job-highlight{background:#e3efe8}

/* Shift editor: separate context, fields, secondary actions and save controls. */
.cell-menu:has(.day-editor-fields){width:min(440px,calc(100vw - 24px));padding:0;border:1px solid #cfdcd4;border-radius:14px;box-shadow:0 12px 40px #203d3226}
.day-editor-head{padding:18px 20px 14px}.day-editor-head strong{font-size:15px;line-height:1.6;overflow-wrap:anywhere}.day-editor-head small{font-size:12px;line-height:1.7;margin-top:6px}
.day-editor-fields{padding:16px 20px}.day-editor-fields .day-editor-shift{display:block;padding:0;border:0;margin:0}.day-editor-fields .day-editor-shift+.day-editor-shift{margin-top:20px}
.day-editor-shift>span{margin-bottom:14px;font-weight:700}.day-editor-shift>span small{font-size:12px;font-weight:400}.day-editor-shift .day-editor-controls{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:14px}
.day-editor-controls>label>small{font-size:12px;font-weight:600;color:#52655a;margin-bottom:5px}.day-editor-controls select{height:42px;padding:8px 10px;font-size:14px;border-radius:8px;border-color:#bdcdc2;color:#263c34}.day-editor-controls select:focus-visible{outline:2px solid #4f8f7b;outline-offset:2px}
.day-editor-secondary{display:flex;align-items:center;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid #e5ebe6}.cell-menu .day-editor-secondary button{width:auto;min-width:64px;padding:7px 14px;border:1px solid #d4ddd6;border-radius:8px;text-align:center;background:#f4f6f3;color:#86928a;cursor:not-allowed;font-size:13px}.day-editor-secondary>small{margin-left:auto;font-size:11px;color:#7b8780}
.cell-menu .day-editor-actions{display:flex;gap:10px;padding:14px 20px;background:#f7f9f7}.cell-menu .day-editor-actions button{width:auto;min-height:42px;padding:9px 22px;border:1px solid #cbd8cf;text-align:center;font-weight:700}.cell-menu .day-editor-actions [data-day-cancel]{background:#fff;color:#52655a}.cell-menu .day-editor-actions [data-day-save]{background:#356b58;color:#fff;border-color:#356b58}.cell-menu .day-editor-actions [data-day-save]:hover{background:#295744}

@media(max-width:420px){.day-editor-shift .day-editor-controls{grid-template-columns:minmax(0,1fr);gap:12px}.day-editor-head,.day-editor-fields{padding:14px 16px}.cell-menu .day-editor-actions{padding:12px 16px}}

.day-editor-controls .day-editor-department{grid-column:1/-1}

.catalog-visibility{grid-column:2/-1;display:flex;align-items:center;gap:8px;font-size:12px;color:#52655a}.catalog-row .catalog-visibility input{width:16px;height:16px;padding:0;margin:0;accent-color:#356b58}

#attendancePolicyForm .section-head p{margin:6px 0 0}.attendance-rules-body{padding:20px 24px}.attendance-rules-summary{display:flex;gap:12px;align-items:center;padding:12px 16px;background:#edf4ef;border-radius:9px;font-size:13px;color:#315440}.attendance-rules-summary>span{color:#66776b;flex-shrink:0}.attendance-rule-block{padding:22px 0;border-bottom:1px solid #e0e6e1}.attendance-rule-block h3{font-size:15px;margin:0 0 6px}.attendance-rule-block p{font-size:12px;color:#68766e;line-height:1.7;margin:6px 0 14px}.attendance-rule-block>.field{display:block;max-width:440px;margin-top:16px}.attendance-rule-block .attendance-rule-hint{margin:10px 0 0}.attendance-rule-block fieldset{margin:18px 0 0;padding:16px;border:1px solid #dce5de;border-radius:9px;background:#fafbf9}.attendance-rule-block legend{font-size:12px;padding:0 6px;color:#56675c}.attendance-minute-input{display:flex;align-items:center;gap:10px}.attendance-minute-input input{max-width:110px;text-align:center}.attendance-minute-input>span{font-size:13px;color:#65746a}.attendance-late-heading{display:flex;justify-content:space-between;align-items:center;gap:18px}.attendance-late-heading p{margin-bottom:0}.attendance-rule-toggle{display:flex;align-items:center;gap:9px;white-space:nowrap;cursor:pointer;font-size:13px;font-weight:700;color:#456353}.attendance-rule-toggle input{appearance:none;width:40px;height:23px;border-radius:20px;background:#aebbb2;position:relative;margin:0;cursor:pointer;flex-shrink:0}.attendance-rule-toggle input::after{content:'';position:absolute;width:17px;height:17px;left:3px;top:3px;background:white;border-radius:50%;transition:transform .15s}.attendance-rule-toggle input:checked{background:#356b58}.attendance-rule-toggle input:checked::after{transform:translateX(17px)}.attendance-rule-toggle input:focus-visible{outline:2px solid #356b58;outline-offset:3px}#attendanceGraceFields{margin-top:16px}.attendance-rules-note{font-size:12px;color:#728078;line-height:1.7;margin:16px 0 0}.attendance-rules-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;background:#f8faf7;border-top:1px solid #e0e6e1}.attendance-rules-footer .btn{flex-shrink:0;min-height:42px}.attendance-rules-footer [role=status]:empty{display:none}.attendance-rules-footer [role=status]{margin:6px 0 0}
@media(max-width:600px){.attendance-rules-body{padding:16px}.attendance-rules-summary{align-items:flex-start;flex-direction:column;gap:4px}.attendance-rule-block .cols-2{grid-template-columns:1fr}.attendance-late-heading{align-items:flex-start}.attendance-rules-footer{padding:16px;align-items:stretch;flex-direction:column}}

/* Attendance uses the same fixed 49px date columns as scheduling. */
.attendance-month{table-layout:fixed;width:calc(84px + var(--days)*49px);min-width:calc(84px + var(--days)*49px);border-collapse:separate;border-spacing:0;font-size:12px}
.attendance-month .attendance-person{width:84px}.attendance-month .attendance-day{width:49px}
.attendance-month th,.attendance-month td{padding:0;text-align:center;border-right:1px solid #ddd;border-bottom:1px solid #ddd;white-space:nowrap}
.attendance-month tr>th:first-child{position:sticky;left:0;z-index:2;background:#f4f7f5;width:84px;overflow:hidden;text-overflow:ellipsis}
.attendance-month thead th{height:44px}.attendance-month th small{display:block;font-weight:normal;color:#667}
.attendance-slot{display:flex;flex-direction:column;position:relative;width:100%;height:66px;padding:0;margin:0;border:0;border-bottom:1px solid #ddd;border-radius:0;background:transparent;color:#26332e;font:inherit;cursor:pointer;align-items:stretch;justify-content:center}
.attendance-slot span{display:block;height:22px;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attendance-slot .attendance-open-label{display:grid;place-items:center;flex:1;height:auto}
.attendance-slot.attendance-full-day-leave,.attendance-slot.attendance-full-day-rest{align-items:center;justify-content:center;border-bottom:0}
.attendance-half-leave .attendance-leave-label,.attendance-half-rest .attendance-rest-label,.attendance-half-unavailable .attendance-unavailable-label{height:auto;flex:1;display:flex;align-items:center;justify-content:center}
.attendance-slot.attendance-leave:not(.attendance-half-leave) .attendance-planned{background:#fff1f1;color:inherit}
.day-editor-controls select.is-attendance{color:#24734d;font-weight:700}
.day-editor-controls option[value="出勤"]{color:#24734d}
.attendance-slot .attendance-late-in,.attendance-slot .attendance-unavailable{color:#cf2525}
.attendance-slot .attendance-planned{background:#e6eee8;color:#466052;font-weight:600}.attendance-adjusted{color:#cf2525;font-weight:bold}
.attendance-slot i{position:absolute;right:0;bottom:0;font-size:9px;line-height:12px;background:#fff2cc;color:#804c00;font-style:normal}
.attendance-overlap{box-shadow:inset 0 0 0 1px #c57920}.attendance-month .attendance-closed{background:#f0f1ee;color:#787e78}.attendance-legacy{padding:16px}
.attendance-detail{width:min(560px,94vw);max-height:90vh;overflow:auto;border:1px solid #ddd;border-radius:14px;padding:24px}
.attendance-detail::backdrop{background:#0006}.attendance-detail label{display:grid;gap:6px;margin:12px 0}.attendance-detail input,.attendance-detail textarea{width:100%;box-sizing:border-box;padding:10px}
.attendance-short-review{width:min(560px,94vw);max-height:90dvh;overflow:auto;padding:24px}
.short-review-times{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#f4f7f4;border:1px solid #e0e7df;border-radius:12px;padding:14px;margin:16px 0}
.short-review-times span{display:grid;gap:6px;color:#64726a;font-size:13px}.short-review-times strong{font-size:24px;color:#2d4b3b}
.attendance-short-review fieldset{border:0;padding:0;margin:20px 0}.attendance-short-review legend{font-weight:650;margin-bottom:10px}
.attendance-short-review .short-review-choice{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid #dce4dc;border-radius:10px;margin:8px 0;cursor:pointer}
.attendance-short-review .short-review-choice:has(input:checked){background:#edf5ef;border-color:#52816a}.attendance-short-review input[type=radio]{width:18px;height:18px;flex-shrink:0;margin:2px 0;accent-color:#396b59}
.short-review-choice span{min-width:0}.short-review-choice small{display:block;line-height:1.6;margin-top:5px;color:#66746b}.attendance-short-review .form-actions{display:flex;justify-content:flex-end;gap:10px}.attendance-short-review [data-status]{color:#ad3636}
@media(max-width:520px){.attendance-short-review{padding:18px}.attendance-short-review .short-review-choice{padding:12px}.attendance-short-review h3{font-size:18px}}

#page-attendance .table-wrap{-webkit-text-size-adjust:100%;text-size-adjust:100%;overscroll-behavior-x:contain}.attendance-slot:focus-visible{outline:2px solid #356957;outline-offset:-2px}

/* Match schedule day/status colors; planned times use a muted green separator. */
.attendance-month .attendance-holiday{background:#fffbe8}.attendance-month .attendance-rest{background:#faf0ee}.attendance-month .attendance-leave{background:#fff1f1}.attendance-month .attendance-rest,.attendance-month .attendance-leave{color:#b42318;font-size:12px;font-weight:400}.attendance-month .attendance-adjusted{color:#cf2525}.attendance-month .attendance-slot .attendance-adjusted{color:#cf2525}

/* Use the attendance planned-time color in the schedule grid. */
.schedule-day-cell .schedule-slot-time-label{background:#e6eee8;color:#466052;margin:0 -2px}.schedule-day-cell .schedule-slot-time-label b{font-weight:600}

/* Keep the full staffing workflow inside the monthly attention card. */
#gapPanel .schedule-attention{background:#fff;border:1px solid #dce3df;padding:16px;overflow:hidden}
#gapPanel .attention-heading{margin-bottom:12px}#gapPanel .attention-heading strong{font-size:15px}
#gapPanel .attention-actions>button{background:#f8faf8;border-color:#e0e6e1;color:#33473b}
#gapPanel .attention-actions>.attention-needs-action strong{color:#a65319}#gapPanel .attention-actions>.attention-needs-action{border-left:3px solid #d49657}
#gapPanel .attention-actions>.attention-review strong{color:#805717}
#gapPanel .attention-actions>button[aria-expanded=true]{border-color:#b8c7be;background:#f0f4f1}
#gapPanel .staffing-details{margin-top:14px;border-top:1px solid #e0e6e1}
#gapPanel .staffing-details>summary{padding:14px 0;font-size:13px;color:#40564a}
#gapPanel .staffing-body{padding:0}#gapPanel .staffing-body>p{margin:0 0 14px;line-height:1.7}
#gapPanel .staffing-columns{grid-template-columns:minmax(230px,1fr) minmax(260px,1.4fr);gap:16px}
#gapPanel .staffing-gaps,#gapPanel .staffing-candidates{min-width:0;border:1px solid #e1e6e2;border-radius:9px;padding:12px;background:#fafbf9}
#gapPanel .staffing-gaps h3,#gapPanel .staffing-candidates h3{font-size:13px;margin:0 0 12px;color:#40564a}
#gapPanel .staffing-gaps h3 small{font-weight:400;color:#78837c;margin-left:6px}
#gapPanel .staffing-candidates{max-height:390px}#gapPanel .staffing-candidates h4{margin:8px 0;font-size:14px}
#gapPanel .staffing-gap-list{padding:0;max-height:330px}
#gapPanel .staffing-gap{background:#fff;border-color:#e1e5df;padding:10px 12px;min-height:82px}
#gapPanel .staffing-gap[aria-pressed=true]{background:#fff8ef;border-color:#cc995e;box-shadow:inset 3px 0 #cc995e}
#gapPanel .staffing-gap:focus-visible{outline:2px solid #a66b32;outline-offset:-2px}
#gapPanel .staffing-gap .staffing-gap-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;color:#35453b}
#gapPanel .staffing-gap-count{font-size:12px;color:#a65319;background:#fff1df;padding:3px 7px;border-radius:5px;white-space:nowrap}
#gapPanel .staffing-gap .staffing-gap-job{color:#37493d;font-size:13px;margin-top:6px}
#gapPanel .staffing-gap .staffing-gap-meta{color:#758076;font-size:11px}
#gapPanel .staffing-empty{font-size:13px;color:#758076;line-height:1.8;padding:16px 8px;margin:0}
#gapPanel .staffing-overage-section{margin-top:14px;border-top:1px solid #e1e6e2}
#gapPanel .staffing-overage-section>summary{padding:12px 0;color:#805717;font-size:13px}
#gapPanel .staffing-overages{margin:0;background:#fffdf8}
@media(max-width:700px){#gapPanel .schedule-attention{padding:12px}#gapPanel .staffing-columns{grid-template-columns:minmax(0,1fr)}#gapPanel .staffing-gap-list{max-height:240px}#gapPanel .staffing-candidates{max-height:320px}}

#gapPanel .staffing-gap-item{display:grid;gap:4px;padding-bottom:8px;border-bottom:1px solid #e4e9e6}#gapPanel .staffing-dismiss{justify-self:end;border:1px solid #d9e0db;background:white;color:#627068;border-radius:6px;padding:6px 10px;font-size:12px;cursor:pointer}#gapPanel .staffing-dismiss:hover{background:#edf2ee}#gapPanel .staffing-ignored{border-top:1px solid #e1e7e2;margin-top:12px;padding-top:12px}#gapPanel .staffing-ignored-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #e6ebe7}#gapPanel [data-staffing-feedback]{color:#a44832}#gapPanel .staffing-gap{width:100%}

.row-actions .action.line-linked{background:#e4f1e7;border-color:#b9d5c0;color:#326146}.row-actions .action.line-linked:hover{background:#d4e9d9;border-color:#9cc3a7}

#employeeTbody .tag.part{background:#e3efff;color:#245a98}
#employeeTbody .tag.piece{background:#fff0d6;color:#925600}
#employeeTbody .tag.special{background:#f0e6fa;color:#704399}


.attendance-method-options{display:flex;flex-wrap:wrap;gap:20px;padding:20px}.attendance-method-options label{display:flex;align-items:center;gap:8px;font-size:16px}.attendance-method-options input{width:20px;height:20px;accent-color:#396b59}.attendance-qr{padding:0 20px 20px}.attendance-qr img{display:block;max-width:100%;height:auto;background:white;margin:16px 0}.attendance-request{padding:18px 0;border-top:1px solid #dce2dc}.attendance-request h4{margin:0 0 10px}.attendance-request textarea{width:min(100%,520px);min-height:65px;padding:10px;font:inherit;border:1px solid #dce2dc;border-radius:8px}.attendance-request p{overflow-wrap:anywhere}.attendance-request-history{margin-top:20px}

.attendance-report{padding:16px;border-bottom:1px solid #dce2dd}
.attendance-report .table-wrap{max-height:320px;margin:12px 0}
.attendance-report table{width:100%;border-collapse:collapse}
.attendance-report th,.attendance-report td{padding:9px 12px;border-bottom:1px solid #e1e6e2;text-align:center;white-space:nowrap}
.attendance-report thead th{position:sticky;top:0;background:#edf3ee;z-index:1}
.attendance-report-flag{color:#a13e32;font-weight:700}
.attendance-report-totals{display:flex;gap:12px 24px;flex-wrap:wrap}
.attendance-report-totals strong{color:#a13e32}

/* Keep monthly records prominent; expand staff statistics only when needed. */
.attendance-report{padding:10px 16px}
.attendance-report-bar{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap}
.attendance-report-totals{align-items:center;gap:6px 18px;font-size:13px}
.attendance-report-totals .attendance-report-title{color:#315943}
.attendance-report-bar [data-export]{flex-shrink:0;min-height:36px;padding:7px 12px}
.attendance-report [data-export-status]:empty{display:none}
.attendance-report [data-export-status]{margin:8px 0;font-size:13px}
.attendance-report-details{margin-top:8px}
.attendance-report-details>summary{cursor:pointer;color:#53695c;font-size:13px;line-height:1.6;min-height:32px}
.attendance-report-details>.muted{font-size:12px;line-height:1.6;margin:8px 0}
.attendance-report-details .table-wrap{max-height:260px;margin:8px 0}
@media(max-width:600px){.attendance-report{padding:10px 12px}.attendance-report-totals{gap:6px 12px}}


.attendance-tasks{padding:12px 16px;border:1px solid #e2d1ad;border-radius:12px;background:#fffdf6;margin-bottom:14px}.attendance-tasks h3{margin:0 0 8px}.attendance-tasks summary{cursor:pointer;padding:8px 0;font-weight:600}.attendance-task-list{max-height:360px;overflow:auto}.attendance-task-list p{line-height:1.6}.attendance-task-list .btn{margin:4px}.attendance-task-list input{max-width:320px}

.catalog-start-times{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:end}.catalog-start-times label{display:grid;gap:4px;font-size:12px;color:#52655b;flex:1;min-width:135px}.catalog-start-times select{width:100%;min-width:0}.catalog-start-times>small{flex-basis:100%;color:#78857f}
.attendance-console .attendance-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:16px}
.attendance-console .attendance-controls label{display:flex;align-items:center;gap:10px;font-weight:600;margin:0}
.attendance-console .attendance-controls input{width:auto;min-height:38px}
.attendance-console .attendance-control-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.attendance-console .btn{width:auto;min-height:38px;margin:0;padding:8px 14px;font-size:14px;white-space:normal}
.attendance-console .attendance-report{padding:0}
.attendance-console .attendance-report-bar{padding:14px 0 4px}
.attendance-console .attendance-tasks{padding:0;margin:0;border:0;background:transparent}
.attendance-console .attendance-action-panel{border:1px solid #dce3df;border-radius:9px;margin:8px 0;background:#fff;overflow:hidden}
.attendance-console .attendance-action-panel>summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;padding:12px 14px;min-height:48px;font-size:15px;font-weight:600;color:#304b40;line-height:1.5}
.attendance-console .attendance-action-panel>summary::-webkit-details-marker{display:none}
.attendance-console .attendance-action-panel>summary::before{content:'›';font-size:20px;line-height:1;transition:transform .15s}
.attendance-console .attendance-action-panel[open]>summary::before{transform:rotate(90deg)}
.attendance-console .attendance-action-panel>summary:hover{background:#f5f8f6}
.attendance-console .attendance-action-panel>summary:focus-visible{outline:2px solid #396b57;outline-offset:-3px}
.attendance-console .attendance-action-panel[open]>summary{border-bottom:1px solid #e6ebe8}
.attendance-console .attendance-action-panel small{font-size:12px;color:#78837d;font-weight:400;margin-left:6px}
.attendance-console .attendance-count{margin-left:auto;font-size:13px;font-weight:400;color:#78837d;text-align:right}
.attendance-console .attendance-count.has-items{color:#a13e32;font-weight:700}
.attendance-console .attendance-action-panel>p,.attendance-console .attendance-action-panel>.attendance-task-list,.attendance-console .attendance-action-body{margin:0;padding:12px 14px}
.attendance-console .attendance-request-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.attendance-console .attendance-request-toolbar p{margin:0}
.attendance-console .attendance-stat-details{margin:0 0 12px}
.attendance-console .attendance-stat-details>summary{font-size:13px;padding:4px 0}
.attendance-console .attendance-report-totals strong{color:inherit}
.attendance-console .attendance-request{box-shadow:none}
@media(max-width:600px){.attendance-console .attendance-controls{align-items:stretch}.attendance-console .attendance-control-actions{width:100%}.attendance-console .attendance-controls label{width:100%}.attendance-console .attendance-controls input{flex:1;min-width:0}.attendance-console .attendance-action-panel small{display:block;margin-left:0}.attendance-console .attendance-action-panel>summary{padding:10px 12px}}

/* Scheduling controls only: the schedule matrix retains its existing layout. */
#page-schedule .schedule-workflow-card{padding:16px;margin-bottom:16px}
#page-schedule .schedule-workflow-card .schedule-month-tabs{margin:0 0 12px;gap:8px}
#page-schedule .schedule-workflow-card .schedule-progress{border:0;background:none;padding:0;margin:0;box-shadow:none;border-radius:0}
#page-schedule .schedule-workflow-card .schedule-next-step{border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:none;margin:12px 0 0;padding:14px 0 0;align-items:center}
#page-schedule .schedule-next-step h3{font-size:17px;margin:0 0 6px}
#page-schedule .schedule-next-step p{margin:0 0 6px;font-size:13px}
#page-schedule .schedule-step-actions{gap:8px}
#page-schedule .schedule-review-card{padding:14px 16px;margin-bottom:16px}
#page-schedule .schedule-review-card #gapPanel{padding:0;margin:0;border:0;background:none}
#page-schedule #gapPanel .schedule-attention{padding:0;border:0;box-shadow:none;border-radius:0}
#page-schedule #gapPanel .attention-actions{gap:8px}
#page-schedule #gapPanel .attention-actions>button{padding:10px 12px;min-height:64px;border-radius:8px}
#page-schedule .schedule-review-card #shiftSignupAdmin{margin:0}
#page-schedule .schedule-review-card #shiftSignupAdmin>details,
#page-schedule .schedule-review-card .monthly-statistics,
#page-schedule .schedule-review-card #pairingWarnings .note{border:0;border-top:1px solid var(--line);border-radius:0;background:none;margin:0;padding:0;box-shadow:none}
#page-schedule .schedule-review-card #shiftSignupAdmin>details>summary,
#page-schedule .schedule-review-card .monthly-statistics>summary,
#page-schedule .schedule-review-card #pairingWarnings summary{padding:12px 0;font-size:13px;font-weight:600;color:#40564a;cursor:pointer}
#page-schedule .schedule-review-card .staffing-details{margin-top:12px}
#page-schedule .schedule-review-card .monthly-statistics[hidden]{display:none}
#page-schedule .schedule-tools-title{font-size:16px;margin:0 0 10px}
#page-schedule .schedule-instructions{margin:0 0 8px;color:var(--muted);font-size:12px}
#page-schedule .schedule-instructions>summary{cursor:pointer;padding:4px 0}
#page-schedule .schedule-instructions .schedule-help{padding:8px 0;margin:0}
#page-schedule .schedule-convenience{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;margin:0 0 12px;padding:0}
#page-schedule .schedule-primary-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex-basis:100%}
#page-schedule .schedule-convenience .btn,
#page-schedule .schedule-convenience>details>summary,
#page-schedule .schedule-step-actions .btn,
#page-schedule #scheduleOtherActions>summary{min-height:38px;padding:8px 12px;border-radius:8px;font-size:13px;margin:0}
#page-schedule .schedule-convenience>details{flex:1 1 220px;margin:0;border:1px solid var(--line);border-radius:8px;background:white}
#page-schedule .schedule-convenience>details>summary{cursor:pointer;color:#40564a;font-weight:600;border:0;background:transparent}
#page-schedule .schedule-convenience .schedule-extra-content{display:flex;flex-wrap:wrap;gap:8px;padding:10px;border-top:1px solid var(--line);position:static;box-shadow:none}
#page-schedule .schedule-convenience .schedule-extra-content .muted{flex-basis:100%}
#page-schedule .daily-view-tabs{margin:10px 0;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);gap:6px}
#page-schedule .daily-view-tabs .btn{min-height:36px;padding:7px 14px;font-size:13px}
@media(max-width:600px){#page-schedule .schedule-workflow-card,#page-schedule .schedule-review-card{padding:12px}#page-schedule .schedule-primary-tools .btn{flex:1 1 110px}#page-schedule .schedule-convenience>details{flex-basis:100%}}


@media(min-width:800px){#page-schedule .schedule-workflow-card{display:grid;grid-template-columns:auto 1fr;gap:0 20px}#page-schedule .schedule-workflow-card .schedule-month-tabs{margin:0}#page-schedule .schedule-workflow-card .schedule-progress{justify-content:flex-end;align-self:center;flex-wrap:wrap}#page-schedule .schedule-workflow-card .schedule-next-step{grid-column:1/-1}#page-schedule #gapPanel .attention-actions>button{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;min-height:48px}#page-schedule #gapPanel .attention-actions>button small{margin-left:auto}}
#page-schedule .schedule-review-card #shiftSignupAdmin{padding:0;border:0;background:none;box-shadow:none;border-radius:0}
#page-schedule .schedule-review-card #shiftSignupAdmin>details{padding:0;background:none;border-radius:0;box-shadow:none}


/* Keep candidate actions beside the name; wrap gracefully in narrow panels. */
.staffing-person-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px}
.staffing-person-heading>strong{min-width:0;overflow-wrap:anywhere}
.staffing-person-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;margin-left:auto;max-width:100%}
.staffing-person-actions .btn{margin:0;padding:6px 10px;min-height:36px;max-width:100%;white-space:normal}
@media(pointer:coarse){.staffing-person-actions .btn{min-height:44px}}

/* Keep the gap selector and dismissal as separate controls inside one card. */
#gapPanel .staffing-gap-item{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:0 10px 0 0;margin-bottom:8px;border:1px solid #e1e5df;border-radius:7px;background:#fff;overflow:hidden}
#gapPanel .staffing-gap-item:has(.staffing-gap[aria-pressed=true]){background:#fff8ef;border-color:#cc995e;box-shadow:inset 3px 0 #cc995e}
#gapPanel .staffing-gap-item .staffing-gap{min-width:0;margin:0;border:0;background:transparent;box-shadow:none;overflow-wrap:anywhere}
#gapPanel .staffing-gap-item .staffing-dismiss{margin:0;max-width:100px;min-height:36px;white-space:normal}
@media(pointer:coarse){#gapPanel .staffing-gap-item .staffing-dismiss{min-height:44px}}

.activity-filters{display:flex;gap:16px;align-items:end;flex-wrap:wrap}.activity-filters .field{min-width:180px}.activity-table-scroll{overflow:auto}.activity-history-view table{width:100%;min-width:780px;text-align:left}.activity-history-view td{vertical-align:top}.activity-history-view pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-width:420px;margin:8px 0 16px}.activity-history-view summary{cursor:pointer;white-space:nowrap}.activity-history-view small{overflow-wrap:anywhere}.activity-history-view [data-more]{margin-top:16px}

/* Employee editor: scoped panels and compact controls, with the same form IDs. */
#employeeFormCard.employee-editor{max-width:1180px;margin:20px auto 28px;padding:0 0 16px;background:#f4f7f4;border:1px solid #d9e3db;border-radius:18px;overflow:visible;box-shadow:0 10px 32px #203d320a}
#employeeFormCard>.employee-editor-header{padding:24px 28px;margin:0 0 20px;background:#eaf1eb;border-radius:18px 18px 0 0;align-items:flex-start;border-bottom:1px solid #d9e3db}
#employeeFormCard .employee-editor-eyebrow{font-size:11px;font-weight:700;color:#668474;letter-spacing:.16em}
#employeeFormCard #employeeFormTitle{font-size:24px;line-height:1.3;margin:5px 0 6px;color:#264b3a}
#employeeFormCard .employee-editor-header p{font-size:13px;color:#68796e;margin:0}
#employeeFormCard>.form-section{margin:14px 20px;padding:22px 24px;background:#fff;border:1px solid #e0e7e0;border-radius:12px}
#employeeFormCard .form-section-title{font-size:16px;line-height:1.5;font-weight:750;color:#284d3b;margin:0 0 6px}
#employeeFormCard .employee-section-caption{font-size:12px;color:#758278;margin:0 0 18px;line-height:1.6}
#employeeFormCard .form-grid{gap:18px 20px}
#employeeFormCard .field{min-width:0;gap:7px}
#employeeFormCard .field>span{font-size:12px;font-weight:650;color:#4d5f53}
#employeeFormCard input:not([type=checkbox]):not([type=range]),#employeeFormCard select{width:100%;min-width:0;box-sizing:border-box;min-height:42px;background:#fcfdfb;border:1px solid #d8e2d9;border-radius:8px;padding:9px 11px;color:#293d30;font-size:14px}
#employeeFormCard input:focus-visible,#employeeFormCard select:focus-visible{outline:2px solid #80a990;outline-offset:2px}
#employeeFormCard input[type=checkbox]{width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:0;accent-color:#356b58;vertical-align:middle}
#employeeFormCard .check-box{display:flex;flex-wrap:wrap;gap:8px;padding:8px;background:#f6f8f5;border:1px solid #e4eae2;border-radius:9px;min-height:42px}
#employeeFormCard .check-box label{display:flex;align-items:center;gap:7px;min-height:34px;padding:5px 9px;border-radius:7px;font-size:13px;cursor:pointer}
#employeeFormCard .check-box label:has(input:checked){background:#e7f1e9;color:#29533b}
#employeeFormCard #employeeAvailabilityFields .check-box{display:grid;grid-template-columns:1fr;gap:3px}
#employeeFormCard #employeeAvailabilityFields .check-box label small{margin-left:auto;font-size:12px;white-space:nowrap}
#employeeFormCard .form-hint,#employeeFormCard .field small,#employeeFormCard .muted{font-size:12px;line-height:1.7;color:#738075}
#employeeFormCard .form-hint{margin-top:14px}
#employeeFormCard .range-field{padding:14px;background:#f7f9f6;border:1px solid #e7ece4;border-radius:10px}
#employeeFormCard .range-field>span{display:flex;justify-content:space-between;align-items:center}
#employeeFormCard .range-field b{font-size:17px;font-variant-numeric:tabular-nums;color:#356b58}
#employeeFormCard input[type=range]{width:100%;accent-color:#356b58;min-height:28px}
#employeeFormCard .range-scale{font-size:10px;color:#7b887c}
#employeeFormCard .employee-option{display:flex;align-items:center;gap:10px;padding:14px 16px;margin:16px 0 10px;background:#f2f7f1;border:1px solid #deeadc;border-radius:9px;font-size:13px;cursor:pointer}
/* 代班優先: many jobs plus 平日/假日, so the row wraps on a phone */
#employeeFormCard .replacement-priority{flex-wrap:wrap;row-gap:8px}
#employeeFormCard .replacement-priority label{display:inline-flex;align-items:center;gap:4px}
#employeeFormCard .replacement-priority-days{display:inline-flex;gap:10px;padding-left:10px;border-left:1px solid #cfdccc}
#employeeFormCard .employee-setting-help{margin:12px 0;color:#627366;font-size:12px}
#employeeFormCard summary{cursor:pointer;padding:8px 0;min-height:36px}
#employeeFormCard .employee-advanced{margin-top:20px;border-top:1px solid #e3e9e1;padding-top:10px}
#employeeFormCard .employee-advanced>summary{font-size:14px;font-weight:700;color:#365841}
#employeeFormCard .employee-advanced>summary span{font-size:12px;font-weight:400;color:#7a877c;margin-left:14px}
#employeeFormCard .employee-advanced-content{padding-top:14px}
#employeeFormCard>.employee-editor-actions{position:sticky;bottom:12px;z-index:10;margin:20px 20px 0;padding:12px 16px;display:flex;align-items:center;gap:10px;background:#fffffff5;backdrop-filter:blur(10px);border:1px solid #d9e3da;border-radius:11px;box-shadow:0 5px 22px #203d3210}
#employeeFormCard .employee-editor-actions>span{margin-right:auto;font-size:12px;color:#738075}
#employeeFormCard .employee-editor-actions .primary{min-width:124px}
@media(max-width:900px){#employeeFormCard .form-grid.cols-4,#employeeFormCard .form-grid.cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#employeeFormCard>.employee-editor-header{padding:20px 16px}#employeeFormCard>.form-section{margin:12px 10px;padding:18px 14px}#employeeFormCard .form-grid.cols-3,#employeeFormCard .form-grid.cols-2{grid-template-columns:1fr}#employeeFormCard .form-grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#employeeFormCard>.employee-editor-actions{margin:14px 10px 0;bottom:8px;padding:10px}#employeeFormCard .employee-editor-actions>span{display:none}#employeeFormCard .employee-editor-actions .primary{flex:1}#employeeFormCard .employee-advanced>summary span{display:block;margin-left:15px}#employeeFormCard #employeeAvailabilityFields .check-box label{flex-wrap:wrap}}
.replacement-trial{margin:20px 0;padding:16px;border:1px solid #cbd9d1;border-radius:12px;background:#f7faf8}
.replacement-trial-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.replacement-trial-card{padding:14px;margin-top:12px;border:1px solid #dce4df;border-radius:10px;background:#fff}
.replacement-trial li{margin:8px 0;overflow-wrap:anywhere}.replacement-trial small{display:block;color:#617168;margin-top:3px}
.replacement-trial-table{overflow-x:auto}.replacement-trial table{width:100%;border-collapse:collapse;text-align:left}.replacement-trial th,.replacement-trial td{padding:7px;border-bottom:1px solid #e1e7e3}.replacement-trial caption{text-align:left;color:#617168;font-size:12px;margin-bottom:6px}


/* Scheduling workspace: scoped to surrounding controls, not matrix geometry or cell colours. */
#page-schedule .schedule-head{margin:18px 0 14px;align-items:center}
#page-schedule .schedule-head h2{font-size:23px;letter-spacing:.02em;color:#264b3b}
#page-schedule .schedule-head .muted{margin-top:7px;line-height:1.6}
#page-schedule .schedule-workflow-card{display:block;padding:18px 20px;border-color:#d9e4dc;box-shadow:0 3px 12px #294b3c05}
#page-schedule .schedule-workflow-card .schedule-month-tabs{display:flex;gap:8px;margin:0 0 16px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
#page-schedule .schedule-month-tabs button{flex:0 0 auto;min-width:130px;display:flex;align-items:center;gap:12px;padding:11px 14px;min-height:44px;border-radius:9px;background:#f7f9f6;border-color:#e1e7df;font-size:14px;color:#5c6b61}
#page-schedule .schedule-month-tabs button small{display:inline;font-size:11px;margin:0;padding:3px 7px;border-radius:5px;background:#e9eeea}
#page-schedule .schedule-month-tabs button[aria-selected=true]{background:#e9f2ec;border-color:#81a58f;box-shadow:inset 0 -2px #46755b;color:#284f3a;font-weight:750}
#page-schedule .schedule-workflow-card .schedule-progress{justify-content:space-between;gap:10px;padding:0;margin:0}
#page-schedule .schedule-progress ol{gap:5px}
#page-schedule .schedule-progress li{padding:5px 10px;color:#758078}
#page-schedule .schedule-progress li+li:before{content:'›';color:#a3afa6;margin-right:10px}
#page-schedule .schedule-progress li.current{background:#edf4ee;color:#315e44}
#page-schedule .schedule-workflow-card .schedule-next-step{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;margin-top:12px;padding-top:14px}
#page-schedule .schedule-next-step>div:first-child{flex:1 1 400px}
#page-schedule .schedule-step-actions{flex:0 1 auto;display:flex;align-items:center;flex-wrap:wrap}
#page-schedule .schedule-next-step h3{font-size:17px;font-weight:750;color:#294c3b}
#page-schedule .schedule-next-step p{max-width:none;font-size:12px;line-height:1.65}
#page-schedule .schedule-next-step .deadline-state{margin-top:5px;font-size:11px}
#page-schedule .schedule-next-step .muted{font-size:11px}
#page-schedule #btnAutoDraft,#page-schedule #btnPublish{min-height:42px;min-width:134px;box-shadow:0 2px 5px #315d4420}
#page-schedule .schedule-section-heading{display:flex;align-items:center;gap:12px;margin:0 0 12px}
#page-schedule .schedule-section-heading h3{margin:0;font-size:15px;color:#294c3b}
#page-schedule .schedule-section-heading>span{font-size:12px;color:#7a867d}
#page-schedule .schedule-review-card{padding:16px 20px;background:#fcfdfb}
#page-schedule #gapPanel .attention-heading{display:none}
#page-schedule #gapPanel .attention-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:0 0 8px}
#page-schedule #gapPanel .attention-actions>button{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;min-height:68px;padding:11px 14px;background:#fff;border:1px solid #e0e6dd;box-shadow:none}
#page-schedule #gapPanel .attention-actions>button strong{font-size:15px;grid-column:1;grid-row:2;color:#35553e}
#page-schedule #gapPanel .attention-actions>button small{grid-column:2;grid-row:1/3;margin:0;color:#62796a;font-size:11px}
#page-schedule #gapPanel .attention-actions>button:focus-visible{outline:2px solid #7ba58b;outline-offset:2px}
#page-schedule #gapPanel .staffing-details:not([open]){display:none}
#page-schedule .schedule-review-card #shiftSignupAdmin>details>summary,#page-schedule .schedule-review-card .monthly-statistics>summary{padding:10px 0;font-size:12px;color:#5c7162}
#page-schedule .schedule-card{border-color:#d8e2da}
#page-schedule .schedule-board-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
#page-schedule .schedule-board-heading h3{font-size:18px;color:#284e39;margin:0 0 5px}
#page-schedule .schedule-board-heading p{font-size:12px;color:#748176;margin:0;line-height:1.6}
#page-schedule #scheduleFocusMode{font-size:12px;min-height:38px;white-space:nowrap;background:#f5f8f4;border-color:#dbe4d9;color:#476a53}
#page-schedule #scheduleFocusMode[aria-pressed=true]{background:#e3efe6;border-color:#8cad96;color:#254d36}
#page-schedule .schedule-instructions{margin:0 0 8px}
#page-schedule .schedule-convenience{align-items:flex-start;padding:10px 0 14px;gap:8px;border-bottom:1px solid #e6ebe4;margin:0 0 12px}
#page-schedule .schedule-primary-tools{flex:1 1 auto;gap:7px}
#page-schedule .schedule-convenience>details{flex:0 1 auto;position:relative;background:#fafcf9;border-color:#e1e7dd}
#page-schedule .schedule-convenience>details>summary{padding:9px 13px;min-height:38px;font-size:12px;white-space:nowrap}
#page-schedule .schedule-convenience>details[open]{flex-basis:100%;order:5}
#page-schedule .schedule-convenience .schedule-extra-content{background:#f6f9f4;border-radius:0 0 8px 8px;margin:0;padding:12px;border-top:1px solid #e0e8dc}
#page-schedule .schedule-convenience .btn{font-size:12px;background:#fff;min-height:38px}
#page-schedule #btnBulkSchedule{background:#edf4ed;color:#315b3e;border-color:#c7d9c8;font-weight:700}
#page-schedule .schedule-view-controls{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:12px 0;flex-wrap:wrap}
#page-schedule .schedule-view-options{display:flex;align-items:end;gap:16px;flex-wrap:wrap;flex:1}
#page-schedule .schedule-view-controls .daily-view-tabs{margin:0;padding:3px;background:#f0f3ef;border:1px solid #e0e6dc;border-radius:9px;display:flex;gap:3px}
#page-schedule .daily-view-tabs .btn{border:0;background:transparent;font-size:12px;min-height:34px;padding:7px 16px;color:#778276}
#page-schedule .daily-view-tabs .btn[aria-pressed=true]{background:white;box-shadow:0 1px 5px #23442c12;color:#2f593b}
#page-schedule .schedule-row-filter,#page-schedule .schedule-search{font-size:11px;color:#778273;display:grid;gap:5px;min-width:0}
#page-schedule .schedule-row-filter select,#page-schedule .schedule-search input{font:inherit;font-size:12px;color:#40583f;min-height:40px;padding:8px 10px;background:white;border:1px solid #dce4d7;border-radius:8px;max-width:100%;box-sizing:border-box}
#page-schedule .schedule-search input{width:180px}
#page-schedule .schedule-search[hidden],#page-schedule .schedule-search-result[hidden],#page-schedule .schedule-row-filter[hidden]{display:none}
#page-schedule .schedule-search-result{padding:10px 12px;background:#f1f6ed;color:#496343;border-radius:8px;font-size:12px;line-height:1.6}
#page-schedule .schedule-search-hidden{display:none!important}
#page-schedule .schedule-history-hint{font-size:12px;font-weight:400;color:#81907e;margin-left:12px}
#page-schedule.schedule-focus-mode>.schedule-workflow-card,#page-schedule.schedule-focus-mode>.schedule-history{display:none}
#page-schedule.schedule-focus-mode>.schedule-card{margin-top:8px}
@media(max-width:700px){
 #page-schedule .schedule-workflow-card,#page-schedule .schedule-review-card{padding:14px}
 #page-schedule .schedule-progress ol{width:100%;justify-content:space-between;gap:0}
 #page-schedule .schedule-progress li{padding:5px 4px;font-size:10px}
 #page-schedule .schedule-progress li+li:before{margin-right:4px}
 #page-schedule .schedule-next-step>div:first-child{flex-basis:100%}
 #page-schedule .schedule-section-heading{align-items:baseline;flex-wrap:wrap;gap:6px}
 #page-schedule #gapPanel .attention-actions{grid-template-columns:1fr}
 #page-schedule .schedule-primary-tools{flex:1 1 100%;flex-wrap:nowrap}
 #page-schedule .schedule-primary-tools .btn{flex:1;min-height:44px}
 #page-schedule .schedule-convenience>details{flex:1 1 30%;min-width:0}
 #page-schedule .schedule-convenience>details>summary{padding:10px 8px;font-size:11px}
 #page-schedule .schedule-convenience>details[open]{flex-basis:100%}
 #page-schedule .schedule-board-heading{align-items:flex-start}
 #page-schedule .schedule-board-heading p{max-width:220px}
 #page-schedule .schedule-view-options{flex-basis:100%;gap:10px}
 #page-schedule .schedule-view-controls .daily-view-tabs{flex:1 1 100%;flex-wrap:nowrap}
 #page-schedule .daily-view-tabs .btn{flex:1;white-space:nowrap}
 #page-schedule .schedule-row-filter{flex:1 1 160px}
 #page-schedule .schedule-search{width:100%}
 #page-schedule .schedule-search input{width:100%;font-size:16px}
 #page-schedule .schedule-history-hint{display:block;margin:6px 0 0 15px}
}

.attendance-attempt-list{display:grid;gap:12px;margin:14px 0}.attendance-attempt-card{border:1px solid #dce3ea;border-radius:10px;padding:14px;background:#fff;overflow-wrap:anywhere}.attendance-attempt-card p{margin:8px 0}.attendance-attempt-card small{color:#596675}
.attendance-attempt-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}.attendance-attempt-status{display:inline-block;border-radius:999px;padding:3px 10px;font-size:13px;font-weight:700;white-space:nowrap}.attendance-attempt-status-saved{background:#e5f5ec;color:#17633d}.attendance-attempt-status-corrected{background:#e9f0fc;color:#234f91}.attendance-attempt-status-missing{background:#fff0e8;color:#93400c}.attendance-attempt-reasons{padding-left:22px;margin:8px 0 12px}.attendance-attempt-reasons li{margin:5px 0}.attendance-attempt-history{border-top:1px solid #e3e8ef;padding-top:10px}.attendance-attempt-history>summary{cursor:pointer;color:#284c70;font-weight:600}.attendance-attempt-original{padding:8px 0;border-bottom:1px solid #edf0f4}.attendance-attempt-original:last-child{border-bottom:0}.attendance-attempt-original small{display:block;margin:4px 0}

.calendar-confirmation{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;margin-bottom:16px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;color:#475569}.calendar-confirmation strong{display:block;margin-bottom:6px}.calendar-confirmation.confirmed{background:#edf8f0;border-color:#86b79a;color:#21613c}.calendar-confirmation.changed{background:#fff7e8;border-color:#dbac58;color:#855509}.calendar-confirmation .muted{font-size:13px;margin-top:4px}.calendar-confirmation button{flex-shrink:0}.calendar-confirmation button:disabled{opacity:.65}@media(max-width:640px){.calendar-confirmation{align-items:stretch;flex-direction:column}}


.dashboard-reminder-dialog{width:min(680px,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:1px solid #dce5df;border-radius:16px;padding:20px;color:#243a2d}.dashboard-reminder-dialog::backdrop{background:#0006}.dashboard-reminder-dialog h2{font-size:20px}.dashboard-reminder-list article{display:grid;gap:6px;padding:12px 0;border-bottom:1px solid #e4e9e5}.dashboard-reminder-list small{color:#637267}.dashboard-reminder-message{white-space:pre-wrap;overflow-wrap:anywhere}.dashboard-reminder-actions{display:flex;gap:8px;margin:16px 0;flex-wrap:wrap}.dashboard-reminder-dialog .section-head{gap:12px;flex-wrap:wrap}

.reminder-template-editor{margin:20px 0;padding:16px;border:1px solid #dce2e8;border-radius:12px}.reminder-template-editor textarea{display:block;width:100%;box-sizing:border-box;resize:vertical;margin:12px 0;line-height:1.6}.reminder-template-editor pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#f5f7fa;padding:12px;border-radius:8px}

.todo-list article>div:first-child{flex:1;min-width:0}.todo-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-shrink:0;margin-left:auto;flex-wrap:wrap}@media(max-width:700px){.todo-actions{width:100%}}

.schedule-matrix .schedule-confirmation-marks{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;margin-top:4px}
.schedule-matrix .schedule-confirmation-marks:has(> [hidden]:only-child){display:none}
.schedule-matrix .availability-confirmed-mark,.schedule-matrix .publication-confirmation-mark{display:inline-block;padding:2px 4px;border-radius:4px;font-weight:700;font-size:11px;line-height:1.3;white-space:nowrap}
.schedule-matrix .availability-confirmed-mark{color:#15803d;background:#eef8f0}
.schedule-matrix .publication-confirmation-mark.confirmed{color:#1d4ed8;background:#eff6ff}
.schedule-matrix .publication-confirmation-mark.pending{color:#9a4d0b;background:#fff5e8}
.schedule-matrix .publication-confirmation-mark.unknown{color:#647067;background:#f2f4f2}
.schedule-matrix .publication-confirmation-mark[hidden]{display:none}
.manual-reason-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.manual-reason-row{display:flex;gap:8px;align-items:center;min-width:0}.manual-reason-row input{flex:1;min-width:0}.manual-reason-row .btn{flex-shrink:0}
#manualReasonSettings fieldset{border:0;padding:0;margin:0;min-width:0}.manual-reason-fixed{display:flex;gap:14px;align-items:center;padding:12px 0;margin-top:12px;border-top:1px solid var(--line)}
@media(max-width:700px){.manual-reason-list{grid-template-columns:1fr}.manual-reason-fixed{align-items:flex-start}}


.attendance-overtime-slot .attendance-overtime-approved,.attendance-detail .attendance-overtime-approved{color:#28643f;font-weight:600}

.attendance-month td.attendance-overtime-day{vertical-align:top}.attendance-overtime-day .attendance-overtime-slot{border-bottom:0}

.attendance-month td.attendance-closed-day{vertical-align:top;line-height:22px}

/* Overtime review: readable records with actions kept inside each card. */
.overtime-list{display:grid;gap:12px;padding:4px 14px 16px;background:#f7f9f8}
.overtime-card{min-width:0;border:1px solid #e0e7e2;border-radius:12px;background:white;padding:18px 20px;box-shadow:0 2px 5px #203c2d04}
.overtime-card header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.overtime-person{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.overtime-person strong{font-size:18px;color:#294437}.overtime-person>span{font-size:13px;color:#748078}
.overtime-badge{flex-shrink:0;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:600;background:#f0f2f1;color:#66716b}.overtime-badge.approved{background:#edf6ef;color:#38694a}.overtime-badge.pending{background:#fff3df;color:#956417}.overtime-badge.rejected{background:#fbeeed;color:#a44c42}
.overtime-body{display:grid;grid-template-columns:minmax(350px,1fr) minmax(0,1fr);gap:28px}.overtime-times{display:grid;grid-template-columns:1fr 24px 1fr 1fr;gap:10px;align-items:start;font-variant-numeric:tabular-nums}
.overtime-card label{display:block;font-size:12px;color:#7a867f;margin:0 0 6px;font-weight:400}.overtime-times strong{display:block;font-size:19px;line-height:1.4;font-weight:600;color:#34483d;white-space:nowrap}.overtime-times span:not(.overtime-arrow){font-size:12px;color:#8a938e}.overtime-arrow{padding-top:23px;color:#b4beb8}.overtime-duration{border-left:1px solid #e8ede9;padding-left:16px}.overtime-card .overtime-duration small{margin:0;font-size:12px;font-weight:400;color:#7a867f}
.overtime-reason p{margin:0;line-height:1.7;font-size:14px;overflow-wrap:anywhere}.overtime-reason .overtime-note{font-size:12px;color:#7a867f;margin-top:8px}
.overtime-card footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:16px;padding-top:12px;border-top:1px solid #edf0ee}.overtime-card footer>details{flex:1 1 300px;font-size:12px;min-width:0;color:#6c7d72;overflow-wrap:anywhere}.overtime-card footer>details summary{cursor:pointer}.overtime-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-left:auto}.overtime-actions .btn{margin:0;font-size:13px;min-height:38px}.overtime-warning{font-size:13px;color:#956417;background:#fff8ec;padding:8px 12px;border-radius:6px}.overtime-empty{text-align:center;padding:32px;color:#7a867f}
.overtime-review-dialog{width:min(520px,calc(100vw - 32px));box-sizing:border-box}.overtime-review-dialog textarea{box-sizing:border-box;display:block;width:100%;min-height:96px;margin-top:8px;border:1px solid #ced9d1;border-radius:8px;padding:12px;font:inherit;resize:vertical}.overtime-review-dialog .form-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
@media(max-width:800px){.overtime-body{grid-template-columns:1fr;gap:16px}.overtime-card{padding:16px}.overtime-times{grid-template-columns:1fr 14px 1fr 1fr;gap:6px}.overtime-times strong{font-size:16px}.overtime-duration{padding-left:10px}.overtime-list{padding:4px 10px 12px}.overtime-person{gap:6px}.overtime-actions .btn{min-height:44px}}

.cell-menu .day-editor-secondary button[data-day-absence]{color:#315b45;background:#edf5ef;border-color:#b7cfc0;cursor:pointer}.cell-menu .day-editor-secondary button[data-day-absence]:hover{background:#dfede3}.cell-menu .day-editor-secondary:has([data-day-absence]){flex-wrap:wrap}

/* Replacement replies stay visible above the general task list. */
.replacement-inbox{margin:24px 0;border:1px solid #dbe5df;border-radius:14px;overflow:hidden;background:#fbfcfa}
.replacement-inbox-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;background:#f0f5f1;border-bottom:1px solid #dbe5df}
.replacement-inbox-heading h3{font-size:18px;margin:0 0 5px}.replacement-inbox-heading p{margin:0;font-size:13px;color:#53695a}.replacement-step-hint{font-size:12px;color:#607268}
.replacement-task{display:flex;align-items:center;gap:24px;padding:22px 20px;border-bottom:1px solid #e0e7e1;background:#fff}.replacement-task:last-child{border-bottom:0}.replacement-task.ready{border-left:4px solid #397452;background:#f6faf7}.replacement-task.manual{border-left:4px solid #b47a35}.replacement-task-content{flex:1;min-width:0}.replacement-status{display:inline-block;border-radius:20px;padding:4px 10px;background:#edf1ef;color:#53665b;font-size:12px;font-weight:700}.ready .replacement-status{background:#dcefe2;color:#285e3b}.manual .replacement-status{background:#fbedd7;color:#80571c}.replacement-task p{font-size:13px;line-height:1.6;margin:6px 0;color:#5e6c63;overflow-wrap:anywhere}.replacement-task .replacement-slot{margin-top:12px;color:#43584c}.replacement-task h4{font-size:21px;line-height:1.5;color:#244b34;margin:4px 0;overflow-wrap:anywhere}.replacement-task .replacement-next{color:#31583f;font-weight:600}.replacement-replies{margin-top:12px;font-size:12px;color:#607268}.replacement-replies summary{cursor:pointer}.replacement-replies>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.replacement-reply{padding:5px 9px;border-radius:6px;background:#f1f3f1}.replacement-reply.accepted{background:#e3f2e7;color:#265d39}.replacement-choice-list{display:grid;gap:8px;margin:12px 0}.replacement-choice{display:flex;align-items:center;gap:12px;border:1px solid #d9e2dc;padding:14px;border-radius:10px;cursor:pointer}.replacement-choice:has(input:checked){background:#edf6ef;border-color:#397452}.replacement-choice strong{display:block;color:#2c5139}.replacement-choice small{display:block;margin-top:4px;color:#617066}.replacement-choice input{width:auto!important;margin:0;flex-shrink:0}.replacement-review-heading{padding:14px;background:#f0f6f1;border-radius:10px;margin-bottom:14px}.replacement-review-heading h4{margin:0 0 6px;font-size:17px}.replacement-review-heading p{margin:0;font-size:13px}.replacement-confirmation{max-width:560px}.replacement-confirmation .form-actions{justify-content:flex-end}
@media(max-width:700px){.replacement-inbox-heading{align-items:flex-start;flex-direction:column}.replacement-task{flex-direction:column;align-items:stretch;gap:12px;padding:16px}.replacement-task h4{font-size:19px}.replacement-task .todo-actions .btn{width:100%}.replacement-step-hint{font-size:11px}}
.replacement-case-people{display:grid;gap:8px;margin-top:14px}.replacement-case-people>div{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 12px;border:1px solid #e1e8e2;border-radius:8px;font-size:12px}.replacement-case-people strong{min-width:120px}.replacement-case-people small{font-weight:400;color:#66776c}.case-confirmed{color:#2c6c41;font-weight:700}.case-pending{color:#926421;font-weight:600}.replacement-completed{max-height:650px;overflow:auto}.replacement-completed h4{font-size:17px}

/* Task summaries: show actions first and keep completed records compact. */
.dashboard-tasks .review-eyebrow{display:block;font-size:11px;letter-spacing:.12em;color:#75847b;margin-bottom:7px}
.dashboard-tasks .section-head h2{font-size:23px;letter-spacing:-.03em;margin:0;color:#233e30}
.dashboard-tasks [data-status]{font-size:12px;color:#7a857f;margin:12px 0 22px}
.dashboard-tasks .todo-counts:empty{display:none}
.review-clear{display:flex;align-items:center;gap:14px;padding:20px 22px;border:1px solid #d9e7df;background:#f1f7f3;border-radius:12px;margin:12px 0 26px}
.review-check{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border-radius:50%;background:#dcece2;color:#37694d;font-size:20px}
.review-clear strong{font-size:16px;font-weight:650;color:#315940}.review-clear p{font-size:13px;color:#687b6e;margin:5px 0 0;line-height:1.6}
.case-history{margin-top:24px}.case-history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.case-history-heading h3{font-size:14px;margin:0;color:#46594d}.case-history-heading h3 span{font-size:11px;font-weight:400;margin-left:8px;color:#7d8981}.case-history-heading>span{font-size:12px;color:#7d8981}
.case-record{border:1px solid #e3e8e4;border-radius:12px;margin-top:8px;background:#fff;overflow:hidden}.case-record>summary{display:flex;align-items:center;gap:18px;padding:18px;cursor:pointer;list-style:none}.case-record>summary::-webkit-details-marker{display:none}.case-record>summary:hover{background:#f8faf8}.case-record>summary:focus-visible{outline:2px solid #397452;outline-offset:-3px;border-radius:11px}
.case-record-date{font-size:16px;font-weight:650;color:#52675a;min-width:56px;font-variant-numeric:tabular-nums}.case-record-date small{display:block;font-size:12px;font-weight:400;color:#849087;margin-top:4px}.case-record-main{flex:1;min-width:0}.case-record-main strong{display:block;font-size:15px;color:#2c4436;overflow-wrap:anywhere}.case-record-main small{display:block;font-size:12px;color:#758279;margin-top:5px;line-height:1.6}
.case-record-status{font-size:12px;color:#40704e;background:#edf5ef;border-radius:6px;padding:6px 10px;flex-shrink:0}.case-record-status.needs-followup{background:#fff3df;color:#8a6227}.case-chevron{color:#849087;font-size:18px}.case-record[open] .case-chevron{transform:rotate(180deg)}
.case-record-detail{padding:0 18px 18px;border-top:1px solid #edf0ed;background:#fafbf9}.case-record-detail>p{font-size:12px;color:#748278;margin:14px 0}.case-record-detail footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px}.case-record-detail footer small{font-size:12px;color:#758279}.case-record-detail .replacement-case-people{margin-top:0}.case-record-detail .btn{white-space:nowrap;min-height:40px}
#gapPanel .attention-heading{margin:0 0 12px}#gapPanel .attention-heading strong{font-size:12px;color:#6b7d70;font-weight:500}#gapPanel .attention-heading>span{display:none}
#gapPanel .attention-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px!important}
#page-schedule #gapPanel .attention-actions>button,#gapPanel .attention-actions>button{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;padding:20px!important;border-radius:12px!important;min-height:124px!important;background:#fff;border:1px solid #dfe6e1;transition:background .15s,border-color .15s}
#gapPanel .attention-actions>button:hover{background:#f7faf7;border-color:#a3bba9}#gapPanel .attention-actions>button:focus-visible{outline:2px solid #397452;outline-offset:3px}
#gapPanel .attention-actions>button>span{font-size:12px;color:#728075}#gapPanel .attention-actions>button>strong{font-size:19px;line-height:1.5;font-weight:650;color:#2e4b38}#gapPanel .attention-actions>button>small{font-size:12px;color:#597561}
#gapPanel .attention-actions>.attention-complete{background:#f3f8f4!important;border-color:#dce8df}#gapPanel .attention-actions>.attention-needs-action{background:#fff7ec!important;border-color:#ebd2ae}#gapPanel .attention-actions>.attention-needs-action strong{color:#865a24}
#gapPanel .staffing-details{border:0;margin:0!important}#gapPanel .staffing-details>summary{display:none}#gapPanel .staffing-details[open]{margin-top:14px!important;border-top:1px solid #e5eae6}#gapPanel .staffing-body{padding:14px 0 0}#gapPanel .review-inline-clear{font-size:13px;color:#56775f;padding:6px 0;margin:0 0 10px}#gapPanel [data-staffing-feedback]:empty{display:none}
@media(max-width:700px){.dashboard-tasks .section-head h2{font-size:20px}.review-clear{padding:16px;align-items:flex-start}.case-history-heading{align-items:flex-start;flex-direction:column;gap:5px}.case-record>summary{display:grid;grid-template-columns:48px minmax(0,1fr) 18px;gap:8px 12px;padding:15px}.case-record-date{grid-row:1 / 3;min-width:0}.case-record-main{grid-column:2}.case-record-status{grid-row:2;grid-column:2;justify-self:start}.case-chevron{grid-row:1 / 3;grid-column:3}.case-record-detail footer{align-items:flex-start;flex-direction:column}.case-record-detail .btn{min-height:44px;width:100%}.case-record-detail .replacement-case-people>div{gap:6px}.case-record-detail .replacement-case-people strong{width:100%}#gapPanel .attention-actions{grid-template-columns:minmax(0,1fr)}#page-schedule #gapPanel .attention-actions>button,#gapPanel .attention-actions>button{padding:16px!important;min-height:112px!important}}

.absence-confirm-option{display:flex;align-items:flex-start;gap:8px;margin:12px 0;line-height:1.6}
.absence-confirm-option input[type="checkbox"]{flex:0 0 auto;margin-top:5px}
.absence-confirm-option[hidden]{display:none}


.request-reason-editor{border-top:1px solid var(--line);padding:14px 0}.request-reason-editor>summary{font-weight:700;cursor:pointer}.request-reason-editor form{margin-top:14px}.request-reason-editor fieldset{border:0;padding:0;margin:0;min-width:0}
.manual-reason-row input{min-height:40px;min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:inherit;font:inherit}.request-reason-editor .form-actions{margin-top:12px}.request-reason-editor .manual-reason-fixed{margin:10px 0;padding:10px 0}.request-reason-editor form>[role=status]:empty{display:none}

.catalog-day-start-times{flex-basis:100%;border-top:1px solid #e1e7e2;padding-top:8px}.catalog-day-start-times summary{font-size:12px;cursor:pointer;color:#356b58}.catalog-day-start-group{display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:8px}

/* Payroll settings: scoped so scheduling tables and employee forms are unchanged. */
.pay-workspace{max-width:1320px;margin:0 auto;color:#20362c}
.pay-workspace [hidden]{display:none!important}
.pay-intro{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:24px 0}
.pay-intro h2{font-size:26px;letter-spacing:.03em;margin:7px 0}
.pay-intro p{font-size:13px;color:#718078;margin:0}
.pay-eyebrow{font-size:10px;font-weight:800;letter-spacing:.15em;color:#6a8476}
.pay-local,.pay-status{font-size:12px;border:1px solid #cbdcd2;border-radius:20px;padding:6px 10px;background:#f0f6f2;white-space:nowrap}
.pay-local{background:#fff8ec;border-color:#e9d9bc;color:#826437}
.pay-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:20px;align-items:start}
.pay-roster,.pay-editor{background:white;border:1px solid #dce4dd;border-radius:16px;min-width:0}
.pay-roster{padding:18px 10px}
.pay-roster h3{font-size:15px;margin:0 8px 16px;display:flex;justify-content:space-between}
.pay-roster h3 span{font-size:12px;color:#819087}
.pay-search{display:block;margin:0 8px 14px}
.pay-search input{width:100%;border:1px solid #dde4de;background:#fafbf9;border-radius:9px;padding:10px;font:inherit;font-size:13px}
.pay-people{display:grid;gap:5px;max-height:65vh;overflow-y:auto}
.pay-import-note{margin:0 24px 16px;padding:14px 16px;background:#f7f8f2;border:1px solid #e3e6d8;border-radius:10px;font-size:12px;line-height:1.7;color:#52624f}
.pay-import-note p{margin:6px 0}.pay-import-note summary{cursor:pointer;font-weight:600}
.pay-review-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.pay-search select{width:100%;margin-top:8px}
.pay-people button{display:flex;align-items:center;gap:10px;text-align:left;min-width:0;padding:12px 9px;background:transparent;border:1px solid transparent;border-radius:10px;color:#3d5145;cursor:pointer}
.pay-people button:hover{background:#f5f8f5}
.pay-people button.selected{background:#edf5ee;border-color:#c6dccb}
.pay-people strong{display:block;font-size:13px;font-weight:700;overflow-wrap:anywhere}
.pay-people small{display:block;color:#7b8d80;margin-top:4px;font-size:11px}
.pay-avatar{background:#e5ece5;border-radius:9px;width:32px;height:34px;display:grid;place-items:center;flex-shrink:0;font-weight:700;font-size:12px}
.pay-roster-note{margin:18px 8px 2px!important;line-height:1.8}
.pay-person-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:22px 24px 18px}
.pay-person-head h3{margin:0;font-size:20px}
.pay-person-head p{font-size:11px;color:#788a7c;margin:6px 0 0}
.pay-tabs{display:flex;padding:0 22px;border-bottom:1px solid #e1e8e1;overflow-x:auto;gap:22px}
.pay-tabs button{background:transparent;cursor:pointer;white-space:nowrap;border:0;border-bottom:3px solid transparent;padding:12px 1px;font-size:13px;color:#7a877e}
.pay-tabs button[aria-selected=true]{border-color:#497a60;color:#2e6249;font-weight:800}
.pay-workspace :focus-visible{outline:2px solid #427a5c;outline-offset:3px}
.pay-form-fields{border:0;min-width:0;padding:0;margin:0}
.pay-form-fields>section{padding:22px 24px 12px;min-height:340px}
.pay-section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 18px}
.pay-section-title h4{margin:0;font-size:14px}
.pay-section-title>span{font-size:11px;color:#829084}
.pay-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}
.pay-field{display:flex;flex-direction:column;gap:7px;min-width:0}
.pay-field>span{font-size:12px;font-weight:700;color:#53675a}
.pay-field em{font-style:normal;font-weight:500;color:#819385;margin-left:5px}
.pay-field input,.pay-field select,.pay-field textarea{width:100%;min-width:0;border:1px solid #d6dfd7;border-radius:9px;padding:10px 12px;background:#fff;font:inherit;font-size:14px;color:#233c2c;min-height:42px}
.pay-field textarea{resize:vertical;line-height:1.6}
.pay-field small{font-size:11px;color:#89958b;line-height:1.6;font-weight:400}
.pay-span{grid-column:1/-1}
.pay-guidance{border-left:3px solid #a9c9b3;background:#f3f8f3;padding:12px 14px;border-radius:0 8px 8px 0;font-size:12px;line-height:1.8;color:#5b7965;margin:20px 0 4px}
.pay-muted{color:#7e8b82;font-size:12px;line-height:1.8}
.pay-components{display:grid;gap:12px}
.pay-component{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:12px;background:#f8faf7;border:1px solid #e3e9e0;border-radius:10px;padding:15px}
.pay-component-basis{grid-column:span 2;display:flex;align-items:center;gap:6px;font-size:11px;color:#6a7d6e}
.pay-remove{justify-self:end;color:#8b5e50}
.pay-empty{padding:45px 15px;text-align:center;background:#fafcf9;border:1px dashed #d8e3d7;border-radius:12px;color:#6f8773;line-height:2}
.pay-empty small{font-size:12px;color:#9aaa9b}
.pay-actions{display:flex;justify-content:space-between;gap:14px;align-items:center;border-top:1px solid #e5ebe2;background:#fbfcfa;padding:16px 24px;border-radius:0 0 16px 16px}
.pay-actions>span{font-size:11px;color:#899685}
.pay-actions>div{display:flex;gap:9px;flex-wrap:wrap}
.pay-message{font-size:13px;line-height:1.6;color:#35754c;padding:0 24px 16px;overflow-wrap:anywhere;min-height:22px}
.pay-message:empty{padding-bottom:0;min-height:0}
.pay-message.pay-error{color:#ab3c32}
.pay-preview:not(:empty){margin:18px 24px;padding:16px;border:1px solid #cbdccd;border-radius:11px;background:#f7faf5;font-size:12px}
.pay-preview h4{margin:0 0 14px}
.pay-compare{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.pay-compare small{color:#7a8d7c}
.pay-compare p{line-height:1.8;margin-bottom:0;overflow-wrap:anywhere}
.pay-history{border:1px solid #e1e8df;border-radius:9px;padding:13px 15px;margin:10px 0;font-size:12px}
.pay-history summary{display:flex;justify-content:space-between;gap:12px;cursor:pointer}
.pay-history summary span{color:#819080;font-size:11px}
.pay-version-dialog{width:min(580px,calc(100vw - 32px));max-height:80vh;overflow:auto;border:1px solid #d1dfd1;border-radius:16px;padding:24px;color:#34513d}
.pay-version-dialog::backdrop{background:#10251e66}
.pay-version-dialog [data-reveal-id]{margin-top:10px}
.pay-version-dialog dl{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;font-size:13px}
.pay-version-dialog dt{color:#879485}
.pay-version-dialog dd{margin:0;overflow-wrap:anywhere}
.pay-dialog-actions{display:flex;justify-content:flex-end;gap:8px}
.pay-workspace .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:1150px){.pay-layout{grid-template-columns:190px minmax(0,1fr)}.pay-tabs{gap:15px}.pay-person-head,.pay-form-fields>section{padding-left:18px;padding-right:18px}}
@media(max-width:760px){
 .pay-intro{align-items:flex-start;margin:12px 0 18px}.pay-intro h2{font-size:22px}.pay-intro p{line-height:1.7}.pay-local{font-size:10px}
 .pay-layout{grid-template-columns:1fr;gap:12px}.pay-roster{padding:12px}.pay-roster h3,.pay-roster-note{display:none}.pay-search{margin:0 0 10px}
 .pay-people{display:flex;overflow-x:auto}.pay-people button{min-width:175px}.pay-avatar{display:none}
 .pay-person-head{padding:16px}.pay-person-head h3{font-size:18px}.pay-status{font-size:11px}
 .pay-tabs{padding:0 16px;gap:20px}.pay-grid,.pay-compare{grid-template-columns:1fr}
 .pay-form-fields>section{padding:20px 16px;min-height:0}.pay-actions{padding:14px 16px;flex-wrap:wrap}.pay-actions>div{margin-left:auto}
 .pay-component{grid-template-columns:1fr 1fr}.pay-component .pay-field:first-child{grid-column:1/-1}.pay-component-basis{grid-column:1/-1}
 .pay-preview:not(:empty){margin:12px 16px}.pay-message{padding-left:16px;padding-right:16px}.pay-history summary{flex-wrap:wrap}
}
/* Local payroll catalog and snapshot-based employee sections. */
.pay-head-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.pay-catalog-rows{display:grid;gap:10px}
.pay-catalog-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:14px;padding:14px;background:#f8faf7;border:1px solid #e1e8e1;border-radius:10px}
.pay-catalog-row .btn{margin-bottom:1px}
.pay-component-basis[hidden]{display:none}
#page-payroll-config[hidden],#page-payroll[hidden]{display:none}
#page-payroll-config .pay-form-fields>section{padding:24px}
#page-payroll-config .pay-section-title{margin-top:24px}
#page-payroll-config pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:350px;overflow:auto}
@media(max-width:640px){.pay-catalog-row{grid-template-columns:1fr}.pay-head-tools{justify-content:flex-start}.pay-person-head{flex-wrap:wrap;gap:12px}}
#page-payroll-personnel[hidden]{display:none}
.pay-person-list{display:grid;gap:8px;margin:16px 0}.pay-person-list-row{display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:12px;border:1px solid #e1e8e1;border-radius:10px;padding:16px;background:white}
.pay-person-list-row[hidden]{display:none}.pay-person-list-row small{display:block;font-size:12px;color:#6a7d6e;margin-top:6px}
@media(max-width:640px){.pay-person-list-row{grid-template-columns:1fr auto}.pay-person-list-row>div:nth-child(2){grid-column:1}}

/* Local payroll agreements: compact per-person amounts, shared rules live in settings. */
.pay-component{grid-template-columns:repeat(3,minmax(0,1fr))}
.pay-component-note{grid-column:1/-2;align-self:center;color:#607466}
.pay-component .pay-remove{justify-self:end}
.pay-component [hidden]{display:none}
.pay-att-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pay-att-card{padding:16px;border:1px solid #dde6dc;border-radius:12px;background:#f8faf7;display:grid;align-content:start;gap:10px}
.pay-att-card p,.pay-att-card small{margin:0;color:#607466;font-size:12px;line-height:1.6}
.pay-att-toggle{display:flex;align-items:center;gap:8px}.pay-att-toggle span{margin-left:auto;font-size:12px;color:#607466}
.pay-att-card .pay-field input:disabled{opacity:.6;background:#edf0eb}
@media(max-width:1000px){.pay-component{grid-template-columns:repeat(2,minmax(0,1fr))}.pay-component-note{grid-column:1/-1}}
@media(max-width:650px){.pay-att-grid{grid-template-columns:1fr}}

.pay-period-bar{display:flex;flex-wrap:wrap;align-items:end;gap:16px;padding-bottom:0}
.pay-period-bar>.pay-field{width:180px}.pay-period-bar .pay-tabs{margin:0;border:0}.pay-period-bar [role=status]{width:100%;margin:0}
.pay-period-bar .pay-tabs{padding:0;gap:8px}.pay-period-bar .pay-tabs button{padding:12px 16px}
[data-monthly-root] .pay-roster>input{box-sizing:border-box;width:calc(100% - 16px);border:1px solid #dde4de;background:#fafbf9;border-radius:9px;padding:10px;font:inherit;font-size:13px}
.pay-month-component{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr auto;gap:10px;border:1px solid #dde6dc;background:#f8faf7;padding:14px;border-radius:10px;align-items:end}
.pay-month-component button{align-self:end}
.pay-month-totals{display:flex;gap:16px;flex-wrap:wrap;padding:20px 0}.pay-month-totals>div{display:grid;gap:5px;min-width:100px}.pay-month-totals strong{font-size:20px}.pay-month-totals small{font-size:12px;color:#607466}
[data-monthly-root] .pay-actions,[data-monthly-root] .pay-message{padding:16px 24px}
@media(max-width:1100px){.pay-month-component{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.pay-period-bar{display:block}.pay-period-bar .pay-field{width:100%}.pay-month-totals strong{font-size:16px}}

.sales-card{border:1px solid #dbe3df;border-radius:14px;padding:22px;margin:18px 0;background:#fff}.sales-card summary{cursor:pointer;padding:16px 0;font-weight:600}.sales-members{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.sales-members label{display:flex;align-items:center;gap:8px}.sales-members input[type=number]{width:75px}.sales-table{width:100%;border-collapse:collapse}.sales-table td,.sales-table th{padding:12px;text-align:left;border-bottom:1px solid #e2e8e4}

.bonus-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin:16px 0 28px}.bonus-choice{display:block;text-align:left;padding:24px;border:1px solid #d9e2dc;border-radius:16px;background:#fff;color:#294138;font:inherit;cursor:pointer;box-shadow:0 3px 12px #203b2d06}.bonus-choice:hover{border-color:#7fa18c;background:#f8fbf9}.bonus-choice[aria-pressed="true"]{border:2px solid #446d58;background:#edf5ef;padding:23px}.bonus-choice:focus-visible{outline:3px solid #8eb6a0;outline-offset:3px}.bonus-card-type{font-size:12px;color:#637d6d;letter-spacing:.05em}.bonus-choice h3,.bonus-card-summary h3{margin:8px 0 12px;font-size:22px}.bonus-card-formula{font-weight:600}.bonus-card-action{display:block;margin-top:20px;font-weight:700;color:#356247}.bonus-card-summary{position:relative}.bonus-card-summary>.btn{margin-top:16px}.bonus-card-editor{border-top:1px solid #e0e7e2;margin-top:20px;padding-top:20px}.bonus-card-editor[hidden]{display:none}.bonus-setting-card{max-width:100%}

/* Compact shared bonus summaries, keeping keyboard and touch targets usable. */
.bonus-card-grid{gap:12px;margin:12px 0 20px}.bonus-choice{padding:15px 18px;border-radius:12px}.bonus-choice[aria-pressed="true"]{padding:14px 17px}.bonus-choice h3,.bonus-card-summary h3{font-size:18px;margin:4px 0 6px}.bonus-choice p,.bonus-card-summary p{margin:4px 0;font-size:14px;line-height:1.45}.bonus-card-type,.bonus-choice small,.bonus-card-summary small{font-size:12px}.bonus-card-action{margin-top:10px;font-size:14px}.bonus-setting-card{padding:16px 18px;margin:12px 0}.bonus-card-summary>.btn{margin-top:10px;min-height:36px;padding:6px 14px}.bonus-card-editor{margin-top:14px;padding-top:14px}

/* Sales cards size to their content instead of the employee editor's minimum height. */
.sales-workspace .pay-form-fields>section.sales-card,
#page-payroll-config .sales-workspace .pay-form-fields>section.sales-card{min-height:0;padding:14px 18px;margin:10px 0;border-radius:12px}
.sales-workspace .sales-card h3{margin:0 0 6px;font-size:18px}
.sales-workspace .sales-card p{margin:4px 0 10px;font-size:14px;line-height:1.45}
.sales-workspace .sales-card .pay-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 16px}
.sales-workspace .sales-card summary{padding:10px 0;font-size:14px}
.sales-workspace .sales-card .pay-actions{padding:10px 0 0;margin-top:4px;background:transparent;border-radius:0}
@media(max-width:1000px){.sales-workspace .sales-card .pay-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.sales-workspace .sales-card .pay-grid{grid-template-columns:1fr}}

.pay-people button[hidden]{display:none}

.identity-masked{-webkit-text-security:disc}

/* Monthly payroll workbook: compact category tables with one shared employee editor. */
.pay-book{min-width:0}
.pay-book [hidden]{display:none!important}
.pay-book .pay-period-bar{margin-bottom:12px;gap:10px}
.pay-book-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:0;border-radius:16px 16px 0 0;padding:22px 24px}
.pay-book-heading h2{margin:5px 0;font-size:24px}
.pay-book-heading p{margin:0;color:#69766f;font-size:14px}
.pay-book-tabs{display:flex;gap:4px;border:1px solid #dce4df;border-top:0;background:#fff;padding:0 20px}
.pay-book-tabs button{border:0;border-bottom:3px solid transparent;background:transparent;padding:15px 22px;color:#5a6860;font:inherit;font-weight:700;cursor:pointer}
.pay-book-tabs button[aria-selected=true]{color:#28634e;border-bottom-color:#34705a;background:#f0f6f2}
.pay-book-tabs button:focus-visible,.pay-book-link:focus-visible{outline:3px solid #6e9c89;outline-offset:2px}
.pay-book-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 10px}
.pay-book-metrics>div{padding:16px;background:#fff;border:1px solid #dce4df;border-radius:12px;min-width:0}
.pay-book-metrics span{display:block;font-size:13px;color:#637168;margin-bottom:8px}
.pay-book-metrics strong{display:block;font-size:23px;color:#234d3d;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.pay-book-metrics>div:nth-child(3) strong{font-size:15px;line-height:1.7}
.pay-book-notice{padding:12px 16px;border-left:3px solid #b69858;border-radius:4px;background:#fbf8ee;color:#655630;font-size:14px;line-height:1.6}
.pay-book-table-wrap{overflow-x:auto;border:1px solid #dce4df;border-radius:12px;background:#fff}
.pay-book-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;min-width:880px;font-variant-numeric:tabular-nums}
.pay-book-table caption{text-align:left;padding:14px 18px;color:#637168;font-size:13px}
.pay-book-table th,.pay-book-table td{padding:14px 16px;border-bottom:1px solid #e7ece8;text-align:right;vertical-align:top;white-space:nowrap}
.pay-book-table th:first-child{text-align:left}
.pay-book-table .pay-book-status{text-align:center;vertical-align:middle}
.pay-book-table .pay-book-status .btn{margin-inline:auto}
.pay-book-table .pay-book-status [data-admin-payslip-preview]{display:block;margin-top:8px}
.pay-book-table thead th{background:#eef3ef;font-size:13px;color:#53655b}
.pay-book-table tbody th:first-child{position:sticky;left:0;background:#fff;z-index:1;min-width:100px}
.pay-book-table tbody tr:hover td,.pay-book-table tbody tr:hover th{background:#f7faf7}
.pay-book-table small{display:block;font-size:12px;color:#738077;margin-top:5px;max-width:250px;white-space:normal;line-height:1.5}
.pay-book-table tfoot{font-weight:700;background:#edf4ef}
.pay-book-table tfoot th,.pay-book-table tfoot td{border-bottom:0}
.pay-book-link{background:none;border:0;padding:0;color:#2b6650;text-decoration:underline;text-underline-offset:4px;font:inherit;font-weight:700;cursor:pointer}
.pay-book-checked{color:#357358!important}
.pay-book-table .pay-book-checked{white-space:nowrap}
.pay-book-pending{color:#8a692c}
.pay-book-help,.pay-book-legacy{background:#fff;border:1px solid #dce4df;border-radius:12px;padding:18px 22px;margin-top:18px}
.pay-book-help h3,.pay-book-legacy h3{font-size:16px;margin:0 0 8px}
.pay-book-help p,.pay-book-legacy p{font-size:14px;color:#69766f;line-height:1.7;margin:4px 0}
.pay-book-legacy .btn{margin-top:10px}
.pay-book-search{display:flex;gap:12px;align-items:center;margin-top:16px;font-size:14px}
.pay-book-search input{max-width:260px}
.pay-book-detail-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:18px 0}
.pay-book-person-navigation{display:flex;gap:8px}
.pay-book-person-navigation .btn{min-height:44px;white-space:nowrap}
.pay-book-detail-bar strong{min-width:0;overflow-wrap:anywhere}
.pay-book-detail [data-sheet-editor] .pay-roster,.pay-book-detail [data-sheet-editor] .pay-intro,.pay-book-detail .pay-review-navigation{display:none}
.pay-book-detail .pay-layout{display:block}
.pay-book-detail [data-book-quantities] h3{margin-top:0;font-size:18px}
.pay-book-detail [data-book-quantities] fieldset{border:0;padding:0;min-width:0}
.pay-book-calculation{margin-top:12px;background:#eef5ef;border-radius:10px;padding:14px 16px}
.pay-book-calculation small{display:block;color:#637168;margin-top:8px;line-height:1.7}
.pay-book-calculation p{margin:8px 0 0;font-size:14px}
@media(max-width:1100px){.pay-book-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.pay-book-tabs{padding:0 4px;gap:0}.pay-book-tabs button{flex:1;padding:13px 5px;font-size:14px}.pay-book-heading{padding:16px;align-items:flex-start}.pay-book-heading h2{font-size:20px}.pay-book-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pay-book-metrics>div{padding:12px}.pay-book-metrics strong{font-size:20px}.pay-book-detail-bar{align-items:flex-start}.pay-book-table th,.pay-book-table td{padding:12px}.pay-book-search{flex-wrap:wrap}}
@media(max-width:420px){.pay-book-heading{display:grid;grid-template-columns:1fr;gap:10px}.pay-book-heading>.btn{justify-self:start}}

.insurance-table-scroll{overflow-x:auto;margin:16px 0;border:1px solid #dce4df;border-radius:12px}.insurance-tier-table{width:100%;min-width:1250px;border-collapse:collapse}.insurance-tier-table caption{text-align:left;padding:14px;font-weight:700}.insurance-tier-table th,.insurance-tier-table td{padding:10px;border-bottom:1px solid #e4e9e6;text-align:right;white-space:nowrap}.insurance-tier-table th{background:#f1f5f2;color:#365448}.insurance-tier-table input{width:100px;min-width:80px;text-align:right;padding:9px;border:1px solid #ccd8d0;border-radius:6px}.insurance-tier-table [data-person-total],.insurance-tier-table [data-company-total]{font-weight:700;color:#245c46;background:#f6faf7}

.insurance-tier-table tr.insurance-duplicate td{background:#fff2ed}.insurance-tier-table tr.insurance-duplicate input[aria-invalid]{border-color:#b4492f}

.insurance-tier-card{border:1px solid #dce4df;border-radius:12px;padding:18px;margin:16px 0;background:#fff}.insurance-fixed-grid,.insurance-health-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px}.insurance-tier-card label{display:flex;flex-direction:column;gap:7px}.insurance-tier-card input{width:100%;box-sizing:border-box;padding:10px;border:1px solid #ccd8d0;border-radius:7px}.insurance-tier-card h3{font-size:15px;margin:20px 0 12px}.insurance-tier-card p{line-height:1.8;color:#365448}.insurance-tier-card.insurance-duplicate{border-color:#b4492f;background:#fff6f2}


.pay-book-actions,.pay-work-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.pay-book-actions{margin-left:auto}
.pay-work-actions>.btn,.pay-book-actions>.btn{white-space:nowrap}
.pay-work-actions{margin-bottom:12px}
.pay-book-actions .pay-work-actions{margin-bottom:0}
@media(max-width:640px){.pay-book-heading{flex-wrap:wrap}.pay-book-actions{width:100%;margin-left:0;justify-content:flex-start}.pay-work-actions{justify-content:flex-start}}

.sales-card .sales-rule-actions{justify-content:flex-end;gap:8px;flex-wrap:wrap;}

.pay-catalog-tree{display:grid;gap:12px;}
.pay-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin:8px 0 12px}
.pay-cat-card{display:grid;align-content:start;gap:10px;padding:14px 16px;border:1px solid var(--border,#dce3de);border-radius:12px;background:#fff;min-width:0}
.pay-cat-card.editing{grid-column:1/-1;background:#fbfcfa}
.pay-cat-head{display:flex;align-items:center;gap:8px;min-width:0}.pay-cat-head h4{margin:0;font-size:16px;color:#30463a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pay-cat-head small{color:#65756b;font-size:12px}.pay-cat-head .btn{margin-left:auto;min-height:32px;padding:4px 12px;font-size:13px}
.pay-cat-section{padding:1px 8px;border-radius:999px;font-size:12px;background:#eef3ef;color:#476052}.pay-cat-allowance,.pay-cat-bonus{background:#e8f2ec;color:#256b3d}.pay-cat-attendance,.pay-cat-insurance{background:#fbeceb;color:#a13e32}
.pay-cat-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}.pay-cat-chips li{padding:3px 10px;border-radius:999px;background:#f4f7f5;border:1px solid #e3e9e4;font-size:13px;color:#33473b}
.pay-cat-card .pay-category-items{margin-top:4px}
.pay-category-branch{border:1px solid var(--border,#dce3de);border-radius:12px;background:#fff;overflow:hidden;}
.pay-category-branch>summary{cursor:pointer;padding:16px 20px;background:#f4f8f5;color:#30463a;}
.pay-category-branch>summary strong{margin-right:16px;}
.pay-category-branch>summary span{font-size:.85rem;color:#65756b;}
.pay-category-body{padding:16px 20px;}
.pay-category-items{margin:16px 0 12px 14px;padding-left:18px;border-left:2px solid #cdded2;display:grid;gap:12px;}
.pay-category-items .pay-catalog-row{position:relative;padding:12px;background:#f8faf8;border-radius:8px;}
.pay-category-items .pay-catalog-row::before{content:"";position:absolute;left:-20px;top:50%;width:20px;border-top:2px solid #cdded2;}
.pay-category-actions{display:flex;justify-content:flex-end;}
@media(max-width:640px){.pay-category-body{padding:12px;}.pay-category-branch>summary{padding:14px 12px;}.pay-category-items{margin-left:4px;padding-left:12px;}.pay-category-items .pay-catalog-row::before{left:-14px;width:14px;}}

/* Award workflow: compact choices and attendance rows. */
.award-rule-picker { margin-bottom: 16px; }
.award-rule-picker > summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.award-people-list { display: grid; gap: 8px; margin: 12px 0; }
.award-people-list > .sales-card { margin: 0; padding: 12px 16px; display: grid; grid-template-columns: minmax(120px,1fr) minmax(180px,2fr) minmax(140px,1fr); align-items: center; gap: 12px; }
.award-people-list > .sales-card p { margin: 0; }
.award-people-list .pay-grid { grid-template-columns: 1fr; gap: 8px; }
@media(max-width:700px) { .award-people-list > .sales-card { grid-template-columns: 1fr; gap: 8px; } }

.incentive-type-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; border: 1px solid #dce5df; border-radius: 8px; margin: 12px 0; padding: 10px 14px; }
.incentive-type-filter legend { font-weight: 700; }
.incentive-type-filter small { flex-basis: 100%; color: #687970; }

.award-estimate { grid-column: 1 / -1; background: #eef5ef; padding: 10px 12px; border-radius: 6px; }
.award-estimate small { display: block; margin-top: 4px; color: #52675a; }

/* Schedule allowance cards: external styles comply with the server CSP. */
.schedule-allowance-form .schedule-allowance-rules{border:0;padding:0;margin:0;min-width:0;display:grid;gap:28px}
.schedule-allowance-rules>p{margin:0}
.schedule-allowance-rules>.schedule-allowance-card{margin:0;padding:24px;border:1px solid #cddbcf;border-radius:14px;background:#fff;box-shadow:0 2px 8px #203c2510;min-width:0}
.schedule-allowance-card>summary{margin:0 0 20px;padding-bottom:14px;border-bottom:1px solid #e1e9e2;font-size:18px;cursor:pointer}
.schedule-allowance-card:not([open])>summary{margin:0;padding-bottom:0;border-bottom:0}
.schedule-allowance-card>fieldset{margin-top:18px;padding:14px 16px;border:1px solid #e1e9e2;border-radius:8px}
.schedule-allowance-card-actions{display:flex;justify-content:flex-end;margin-top:20px;padding-top:16px;border-top:1px solid #e1e9e2}
.schedule-allowance-form>.pay-actions{margin-top:24px}
@media(max-width:640px){.schedule-allowance-rules>.schedule-allowance-card{padding:16px}.schedule-allowance-form .schedule-allowance-rules{gap:24px}}

.pay-work-quantities{margin-top:28px;padding:20px;border:1px solid #d1ded3;border-radius:12px;background:#f8fbf8}
.pay-work-quantities>fieldset{border:0;padding:0;min-width:0}.pay-work-quantities .pay-guidance{margin:16px 0}.pay-work-quantities h4{margin:12px 0}.pay-work-quantities .pay-field textarea{width:100%;box-sizing:border-box}.pay-work-quantities details{margin-top:18px}

.pay-agreement{margin:0 0 20px;padding:16px;border:1px solid #d1ded3;border-radius:12px;background:#fff}.pay-agreement>summary{cursor:pointer;font-weight:700;color:#345448}.pay-agreement>summary span{font-weight:400;font-size:.85em;margin-left:12px;color:#64766d}.pay-agreement[open]>summary{margin-bottom:18px}.pay-rate-history{padding:16px 0;border-top:1px solid #d1ded3;border-bottom:1px solid #d1ded3;margin:24px 0}.pay-rate-history>summary{cursor:pointer;font-weight:700}

/* Navigation groups follow the administration workflow. */
.sidebar #nav{display:flex;flex-direction:column;gap:0}
.sidebar .nav-group{padding:10px 0}
.sidebar .nav-group:first-child{padding-top:0}
.sidebar .nav-group+.nav-group{border-top:1px solid #ffffff26}
.sidebar .nav-group .nav-item{position:relative;margin:3px 0;min-height:44px;padding:10px 14px;border:1px solid transparent;transition:background .15s,color .15s,border-color .15s}
.sidebar .nav-group .nav-item:hover:not(.active){background:#ffffff12;color:#fff;border-color:#ffffff20}
.sidebar .nav-group .nav-item.active{background:#edf4ee;color:#244c3b;box-shadow:inset 3px 0 0 #8fb59a;font-weight:750}
@media(max-width:700px){.sidebar #nav{flex-direction:row;overflow-x:auto;align-items:stretch;gap:10px}.sidebar .nav-group{display:flex;flex:0 0 auto;align-items:center;padding:0 0 0 10px;gap:4px}.sidebar .nav-group:first-child{padding-left:0}.sidebar .nav-group+.nav-group{border-top:0;border-left:1px solid #ffffff26}.sidebar .nav-group .nav-item{width:auto;white-space:nowrap;margin:0}}

/* Monthly payroll controls align with the full-width workbook. */
.pay-book>.pay-period-bar,.pay-book>.pay-book-heading{max-width:none;margin-left:0;margin-right:0;width:100%}
.pay-book>.pay-period-bar{justify-content:flex-start}
.pay-book>.pay-book-heading{padding-left:0;padding-right:0}
.pay-enroll-dialog .pay-enroll-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.pay-enroll-dialog [data-enroll-error]{line-height:1.6}
@media(max-width:640px){.pay-book .pay-book-actions{margin-left:auto;justify-content:flex-end}.pay-book .pay-work-actions{justify-content:flex-end}}
.pay-book .pay-period-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-left:auto}


.calendar-suspension{width:100%;margin-top:6px;padding:5px;border:1px solid #c7b7da;border-radius:6px;background:#f1eaf8;color:#62417c}.calendar-suspension-label{font-size:11px;color:#62417c;margin-top:5px}.schedule-slot.suspension-slot{background:#eee6f5;color:#62417c;cursor:default}.work-suspension-dialog{width:min(640px,94vw);max-height:90vh}.work-suspension-dialog .field{display:block;margin-bottom:14px}.suspension-impact{max-height:260px;overflow:auto;font-size:13px}.suspension-impact p{margin:6px 0}


/* Special attendance: external styles also work under the server CSP. */
[data-special-preview] .special-dates{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
[data-special-preview] .special-person-card{padding:18px;border:1px solid #dce5df;border-radius:14px;background:#fff;margin:0 0 14px;box-shadow:0 2px 6px #253d2f08}
[data-special-preview] .special-person-label{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:700}
[data-special-preview] .special-type{font-size:12px;font-weight:500;color:#586b60;background:#f0f4f1;padding:3px 8px;border-radius:6px}
[data-special-preview] .special-shifts{display:flex;flex-direction:column;align-items:flex-start;gap:3px;margin:8px 0}
[data-special-preview] .special-shift{font-weight:600;line-height:1.5}
[data-special-preview] .special-check{font-size:inherit}
[data-special-preview] .special-cross{color:#bd7d79}
[data-special-preview] .special-paper{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:4px 0;padding:6px 10px;border:1px solid #dce5df;border-radius:8px;min-inline-size:0;background:#f7faf8}
[data-special-preview] .special-paper-legend{padding:0 8px;font-weight:600;color:#425e4d}
[data-special-preview] .special-paper-fields{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
[data-special-preview] .special-time-label{display:flex;flex-direction:row;align-items:center;gap:6px;margin:0}
[data-special-preview] .special-time-input{width:78px;min-height:32px;height:32px;padding:4px 8px}
[data-special-preview] .special-paper-confirm{display:flex;align-items:center;gap:8px;margin:0;padding:5px 8px;min-height:32px;border:1px solid #c9dbce;border-radius:9px;background:#edf5ef;font-weight:600;color:#315740;cursor:pointer}
[data-special-preview] .special-paper-checkbox{width:17px;height:17px;flex:0 0 17px;accent-color:#397153}
[data-special-preview] .special-live{grid-column:1 / -1;margin:4px 0;color:#315740;font-weight:600}

/* Attendance-based award review: compact shift marks and separate review cue. */
.award-attendance-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;margin:10px 0}
.award-attendance-shifts{display:flex;flex-direction:column;gap:3px;font-weight:600;line-height:1.5}
.award-attendance-shifts b{display:inline-block;width:18px;font-size:inherit}
.award-shift-yes{color:#397153}.award-shift-no{color:#bd7d79}
.award-attendance-note{margin:0;padding:7px 11px;border-left:3px solid #d7b66d;border-radius:5px;background:#faf6ec;color:#705b2b;font-size:12px;font-weight:600}
.award-attendance-note span{display:block;font-weight:400;margin-top:2px}
.sidebar .nav-row{display:flex;align-items:center;gap:4px}
.sidebar .nav-row .nav-item{flex:1;min-width:0}
.sidebar .nav-open{display:flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;min-height:44px;padding:8px;border:1px solid transparent;border-radius:9px;background:transparent;color:#d4e2d9;cursor:pointer}
.sidebar .nav-open:hover{background:#ffffff18;color:#fff;border-color:#ffffff28}
.sidebar .nav-open:focus-visible{outline:2px solid #b9d8c4;outline-offset:2px}
.sidebar .nav-open svg{display:block;pointer-events:none}
@media(max-width:700px){.sidebar .nav-row{flex:0 0 auto}.sidebar .nav-row .nav-item{flex:0 0 auto}}

/* The separate monthly schedule window keeps the existing view/filter controls. */
body.schedule-window .sidebar,body.schedule-window .topbar,
body.schedule-window #page-schedule>.schedule-head,
body.schedule-window #page-schedule>.schedule-workflow-card,
body.schedule-window #page-schedule>.schedule-review-card,
body.schedule-window #page-schedule>.schedule-history,
body.schedule-window #btnViewManualChanges,
body.schedule-window .schedule-board-heading,
body.schedule-window .schedule-instructions,
body.schedule-window #scheduleConvenience,
body.schedule-window #absencePanel,
body.schedule-window #page-schedule>.schedule-card>.legend{display:none!important}
body.schedule-window .app-shell{grid-template-columns:minmax(0,1fr)}
body.schedule-window .main{margin-left:0;padding:12px;min-width:0}
body.schedule-window #page-schedule>.schedule-card{margin:0}
body.schedule-window .schedule-view-controls{margin-top:0!important}

body.schedule-window .schedule-slot:disabled,body.schedule-window .daily-person:disabled,body.schedule-window .daily-job-title:disabled{opacity:1;cursor:default}


/* Special attendance review workspace: scoped to its own filters and cards. */
.special-workspace .special-page-head{margin:8px 0 18px}
.special-workspace .special-page-head h2{margin:0 0 6px;font-size:24px}
.special-workspace .special-page-head p{margin:0;color:#708176;font-size:14px}
.special-workspace .special-panel{border:1px solid #dce5df;border-radius:14px;background:#fff;padding:18px;box-shadow:0 3px 12px #203b2d05}
.special-workspace .special-step-heading{display:flex;align-items:flex-start;gap:11px;margin-bottom:16px}
.special-workspace .special-step-heading>span{display:flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:#eaf3ed;color:#356247;font-weight:700}
.special-workspace .special-step-heading h3{margin:1px 0 4px;font-size:17px}
.special-workspace .special-step-heading p{margin:0;color:#738278;font-size:13px;line-height:1.5}
.special-workspace .special-filters .pay-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.special-workspace .special-date-picker{border-top:1px solid #edf1ee;margin:14px 0;padding-top:12px}
.special-workspace .special-date-picker>summary{font-weight:600;cursor:pointer}
.special-workspace .special-date-inputs{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px;border:0;padding:12px 0 0;margin:0}
.special-workspace .special-date-inputs legend{font-size:12px;color:#7a887e;padding-top:8px}
.special-workspace .special-date-inputs .pay-field{flex:0 1 185px;min-width:0;margin:0}
.special-workspace .special-date-inputs p{width:100%;margin:0;color:#7a887e;font-size:12px}
.special-workspace .special-types{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:10px 0 14px}
.special-workspace .special-types legend{font-size:13px;font-weight:600;margin-bottom:8px}
.special-workspace .special-types>label{display:flex;align-items:center;gap:6px;min-height:36px;padding:6px 13px;border:1px solid #dce5df;border-radius:8px;background:#fafcfb;cursor:pointer}
.special-workspace .special-types>label:has(input:checked){background:#edf5ef;border-color:#a7c3b0;color:#315f43}
.special-workspace .special-help{margin:12px 0 16px;color:#718076;font-size:12px;line-height:1.6}
.special-workspace .special-help summary{cursor:pointer;font-size:13px}
.special-workspace .special-help p{margin:8px 0}
.special-workspace .special-feedback{padding:10px 13px;border-radius:8px;background:#f0f5f2;color:#3e6450;font-size:13px}
.special-workspace .special-feedback:empty{display:none}
.special-workspace .special-review{margin-top:24px}
.special-workspace .special-asof{font-size:12px;color:#849087;margin:-4px 0 12px}
.special-workspace .special-review-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;align-items:start;gap:18px}
.special-workspace .special-list-column{min-width:0}
.special-workspace .special-dates{margin:0 0 16px;gap:8px}
.special-workspace .special-dates .btn{flex:1 1 170px;min-height:48px;white-space:normal;font-size:13px;line-height:1.5;border-radius:10px}
.special-workspace .special-day-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 10px}
.special-workspace .special-day-heading h4{margin:0;font-size:16px}
.special-workspace [data-visible-count]{font-size:12px;color:#849087}
.special-workspace .special-list-tools{display:flex;gap:8px;margin-bottom:12px}
.special-workspace .special-list-tools label:first-child{flex:1;min-width:0}
.special-workspace .special-list-tools label:last-child{flex:0 0 125px}
.special-workspace .special-list-tools input,.special-workspace .special-list-tools select{width:100%;min-height:38px;margin:0;font-size:13px;border:1px solid #dce5df;border-radius:8px;background:#fff;padding:7px 10px;color:#3e5747}
.special-workspace .special-list-note{font-size:12px;color:#78877d;line-height:1.5;margin:10px 0}
.special-workspace .special-person-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;margin:14px 0}
.special-workspace .special-person-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:10px;min-width:0;margin:0;padding:15px;border:1px solid #dce5df;border-radius:12px;background:#fff;box-shadow:0 2px 9px #253d2f04}
.special-workspace .special-person-card.is-selected{border-color:#74a287;background:#fbfefc;box-shadow:0 0 0 1px #74a28730}
.special-workspace .special-person-card.is-pending{border-color:#e7dbc4}
.special-workspace .special-person-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.special-workspace .special-person-label{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;font-size:16px;font-weight:700;line-height:1.5}
.special-workspace .special-person-label input{width:17px;height:17px;flex:0 0 17px;accent-color:#397153}
.special-workspace .special-type{font-size:11px;white-space:nowrap;padding:2px 6px;border-radius:5px}
.special-workspace .special-status{display:inline-block;flex:0 0 auto;padding:3px 7px;border-radius:6px;font-size:11px;font-weight:600;line-height:1.5}
.special-workspace .special-status.is-ready{background:#e9f4ed;color:#366748}
.special-workspace .special-status.is-warning{background:#fbf2e4;color:#8c6936}
.special-workspace .special-basis{margin:0;font-size:12px;line-height:1.6;color:#6c8071}
.special-workspace .special-basis.is-warning{padding:8px 10px;background:#fcf7ee;border-radius:7px;color:#8b6b3e}
.special-workspace .special-shifts{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px;margin:0;font-size:12px}
.special-workspace .special-shifts>small{margin-right:2px}
.special-workspace .special-shift{padding:3px 7px;background:#f2f6f3;border-radius:5px;line-height:1.4}
.special-workspace .special-payment{display:flex;flex-direction:column;gap:5px;margin:0;font-size:12px;font-weight:600}
.special-workspace .special-payment select{width:100%;min-height:36px;height:36px;margin:0;padding:5px 9px;font-size:13px;font-weight:400}
.special-workspace .special-payment small{font-size:11px;color:#849087;font-weight:400}
.special-workspace .special-paper{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 10px;margin:2px 0 0;border-radius:8px;background:#f5f9f6}
.special-workspace .special-paper-legend{font-size:12px;padding:0 5px}
.special-workspace .special-paper-fields{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.special-workspace .special-paper-fields>label{font-size:13px;min-height:30px;display:flex;align-items:center;gap:5px}
.special-workspace .special-time-input{width:60px;min-height:32px;height:32px;padding:4px 6px}
.special-workspace .special-paper-confirm{font-size:12px;min-height:32px;padding:5px 7px;border-radius:6px}
.special-workspace .special-paper-confirm:has(input:checked){background:#e4f1e8;border-color:#98bba5;color:#2f6443}
.special-workspace .special-live{margin:0;padding:8px 10px;border-radius:7px;background:#f0f6f2;color:#315d42;font-size:13px;line-height:1.5}
.special-workspace .special-summary{position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:auto}
.special-workspace .special-summary .special-step-heading{margin-bottom:12px}
.special-workspace .special-summary-stats{display:grid;gap:8px;margin:0 0 14px}
.special-workspace .special-summary-stats>div{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f4f8f5;border-radius:8px;padding:10px}
.special-workspace .special-summary-stats small{font-size:12px;color:#74867a}
.special-workspace .special-summary-stats strong{font-size:16px;color:#315e43;overflow-wrap:anywhere}
.special-workspace .special-summary details>summary{font-size:13px;font-weight:600;cursor:pointer}
.special-workspace [data-date-summary] p{font-size:12px;line-height:1.6;padding:8px 0;margin:0;border-bottom:1px solid #edf1ee}
.special-workspace .special-summary h4{font-size:13px;margin:16px 0 8px}
.special-workspace [data-total]{font-size:12px;color:#7b887f}
.special-workspace .special-summary-person{display:flex;justify-content:space-between;gap:8px;margin:0;padding:8px 0;border-bottom:1px solid #edf1ee;font-size:13px}
.special-workspace .special-summary-person>span{min-width:0;overflow-wrap:anywhere}
.special-workspace .special-summary-person strong{white-space:nowrap;color:#315d42}
.special-workspace .special-summary>label{display:flex;gap:7px;align-items:flex-start;margin:16px 0;font-size:13px;line-height:1.6}
.special-workspace .special-summary>label input{flex:0 0 auto;margin-top:4px}
.special-workspace .special-summary .form-actions{margin-top:12px}
.special-workspace .special-summary .form-actions .btn{width:100%;min-height:42px}
.special-workspace .special-summary-note{font-size:11px;line-height:1.6;color:#89948d;margin:12px 0 0}
.special-workspace .special-empty{padding:24px;text-align:center;border:1px dashed #d5dfd8;border-radius:10px;color:#819087;font-size:13px}
.special-workspace .special-discard{margin-top:18px;font-size:12px}
.special-workspace .special-history-title{font-size:17px;margin-top:28px;padding-top:20px;border-top:1px solid #e2e9e4}
.special-workspace details.sales-card{display:block}
@media(max-width:1100px){.special-workspace .special-review-layout{grid-template-columns:minmax(0,1fr)}.special-workspace .special-summary{position:static;max-height:none;overflow:visible}}
@media(max-width:700px){.special-workspace .special-page-head h2{font-size:21px}.special-workspace .special-panel{padding:14px}.special-workspace .special-filters .pay-grid{grid-template-columns:minmax(0,1fr)}.special-workspace .special-person-list{grid-template-columns:minmax(0,1fr)}.special-workspace .special-person-card{padding:13px}.special-workspace .special-types>label{min-height:40px}.special-workspace .special-payment select{min-height:40px;height:40px}.special-workspace .special-paper-fields>label{min-height:36px}.special-workspace .special-dates .btn{flex-basis:145px}.special-workspace .special-day-heading{align-items:flex-start;flex-wrap:wrap}.special-workspace .special-asof{line-height:1.6}}

body[data-admin-role="normal"] [data-payroll-person],body[data-admin-role="normal"] [data-page="payroll"],body[data-admin-role="normal"] [data-page="payrollConfig"]{display:none!important}
.admin-accounts{margin-top:28px;padding-top:24px;border-top:1px solid #dce5df}.admin-account-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #e4ebe6}.admin-accounts details{margin-top:20px}.admin-accounts form{max-width:460px}.admin-account-dialog{border:1px solid #dce5df;border-radius:16px;padding:28px;max-width:480px;width:calc(100% - 32px)}.admin-account-dialog::backdrop{background:#152a2066}

body[data-admin-role="normal"] #btnAddEmployee,body[data-admin-role="normal"] #btnEmployeeOrder,body[data-admin-role="normal"] #employeeFormCard,body[data-admin-role="normal"] #lineBindingRequests,body[data-admin-role="normal"] #employeeTbody .row-actions{display:none!important}

body[data-admin-role="normal"] .payroll-nav-group{display:none!important}

.sidebar .brand-version{margin-top:7px;font:600 12px/1.5 ui-monospace,monospace;color:#d2e6d8;overflow-wrap:anywhere}.sidebar .brand-identity{margin-top:5px;font-size:12px;line-height:1.5;color:#c5cec8}.sidebar .brand-sub{margin-top:5px}

.revenue-report .revenue-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0 12px}.revenue-metrics>div{padding:18px;background:#f2f7f4;border:1px solid #dce7df;border-radius:14px;display:grid;gap:8px}.revenue-metrics strong{font-size:1.35rem}.revenue-table-wrap{overflow-x:auto;margin-bottom:16px}.revenue-report table{width:100%;min-width:720px}.revenue-report td input{width:100%;min-width:90px;box-sizing:border-box}.revenue-report td:nth-child(3){width:100px}.revenue-report th,.revenue-report td{padding:10px;text-align:left}.revenue-report td:nth-child(4),.revenue-report td:nth-child(5){text-align:right;white-space:nowrap}.revenue-costs{margin:24px 0;padding:18px;border:1px solid #dce7df;border-radius:14px}.revenue-costs summary{cursor:pointer;font-weight:600}@media(max-width:700px){.revenue-report .revenue-metrics{grid-template-columns:1fr;gap:8px}.revenue-metrics>div{padding:12px}}

.revenue-report td input{font:inherit;padding:8px 10px;border:1px solid #d5dfd8;border-radius:8px;background:#fff;color:#263d33;min-height:38px}.revenue-report td input:focus{outline:2px solid #769a80;outline-offset:1px}

.pay-overview-heading{margin:18px 0}.pay-overview-heading h3{margin-bottom:8px}.pay-overview-distribution{margin:28px 0;padding:20px;border:1px solid #dce7df;background:#fff;border-radius:14px}.pay-overview-distribution h3{margin-top:0}

.revenue-report .revenue-cost-ratios{min-width:0;font-variant-numeric:tabular-nums}.revenue-report .revenue-cost-ratios td{text-align:right;white-space:nowrap}.revenue-cost-ratios tfoot{font-weight:600}

.pay-amount-button{border:0;border-bottom:1px dotted #729485;padding:0;text-align:right;background:none;color:inherit;font:inherit;font-variant-numeric:tabular-nums;cursor:help}
.pay-amount-button:focus-visible{outline:3px solid #6e9c89;outline-offset:4px}
.pay-amount-popup{position:fixed;inset:auto;margin:0;width:340px;max-width:calc(100vw - 16px);max-height:min(420px,calc(100dvh - 16px));box-sizing:border-box;overflow:auto;white-space:normal;text-align:left;padding:16px;border:1px solid #b9cfc2;border-radius:12px;background:#fff;color:#243e32;box-shadow:0 8px 28px #173d302e;font-size:14px;line-height:1.5}
.pay-amount-popup>strong{font-size:16px}.pay-amount-popup section{border-top:1px solid #e3ebe6;margin-top:10px;padding-top:8px}.pay-amount-popup h4,.pay-amount-popup h5{margin:0 0 6px}.pay-amount-popup ul{list-style:none;padding:0;margin:0}.pay-amount-popup li{display:flex;justify-content:space-between;gap:16px;padding:3px 0}.pay-amount-popup li span{overflow-wrap:anywhere}.pay-amount-popup .pay-nowrap{white-space:nowrap}.pay-amount-popup li b{font-variant-numeric:tabular-nums;white-space:nowrap}.pay-amount-popup p{font-size:12px;color:#66756d;margin:8px 0}.pay-amount-popup footer{border-top:1px solid #dce7df;margin-top:12px;padding-top:10px;font-weight:700;text-align:right}

.pay-book-frame{border:1px solid #dce4df;border-radius:12px;overflow:hidden;background:#fff}.pay-book-frame>.pay-book-tabs{border:0;border-bottom:1px solid #dce4df}.pay-book-frame>.pay-book-table-wrap{border:0;border-radius:0}

.pay-overtime-fields{border:0;padding:0;margin:0;min-width:0}.pay-overtime-fields [data-ot-break]{width:110px;max-width:100%;box-sizing:border-box}.pay-overtime-fields .pay-table{width:100%;min-width:520px}

.pay-import-overview{margin:28px 0}.pay-import-overview h3{margin-bottom:8px}.pay-import-overview p{line-height:1.7;color:#61756a}.pay-import-overview .pay-book-table{min-width:1450px}

.pay-overtime-card{padding:12px;gap:8px;background:#fff}.pay-overtime-card .pay-section-title{margin:0;gap:8px}.pay-overtime-card h4{margin:0;font-size:14px}.pay-ot-saved{font-size:11px;color:#62776b;background:#edf3ef;border-radius:20px;padding:3px 9px}.pay-ot-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 8px}.pay-ot-stat{display:grid;align-content:start;gap:2px;min-width:0;padding:8px 12px;border:1px solid #e1e8e3;border-radius:8px;background:#f8faf8}.pay-ot-stat>span{font-size:11px;color:#64786c}.pay-ot-stat>strong,.pay-ot-stat>input{font-size:22px;font-weight:650;line-height:1.3;color:#274b3d;font-variant-numeric:tabular-nums}.pay-ot-stat>input{height:29px;min-width:0;width:100%;box-sizing:border-box;padding:0;border:0;background:transparent;border-radius:0}.pay-ot-stat>input:not([readonly]){border-bottom:1px solid #859c8f}.pay-overtime-card .pay-ot-stat small{font-size:11px;line-height:1.35;font-weight:400}.pay-ot-highlight{background:#edf5ef;border-color:#c7dccd}.pay-overtime-card .pay-table{min-width:650px;font-size:12px}.pay-overtime-card .pay-table th,.pay-overtime-card .pay-table td{padding:6px 8px;line-height:1.35;vertical-align:middle}.pay-overtime-card .pay-table th{font-size:11px;font-weight:500}.pay-overtime-card [data-ot-break]{width:64px;height:29px;padding:3px 5px;font-size:12px}.pay-ot-clock,.pay-ot-daily{white-space:nowrap;font-variant-numeric:tabular-nums}.pay-ot-daily{text-align:right;font-weight:600}.pay-overtime-card .pay-ot-reason{display:block;line-height:1.35;font-size:11px}.pay-ot-tiers{display:flex;gap:4px;flex-wrap:wrap}.pay-ot-tiers span{white-space:nowrap;background:#f0f4f1;border:1px solid #e2e9e3;border-radius:5px;padding:3px 5px;font-size:11px;font-variant-numeric:tabular-nums}.pay-ot-tiers b{font-weight:600;color:#315b47}.pay-ot-bottom{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-top:8px}.pay-ot-bottom>details{min-width:0;flex:1;font-size:11px;color:#64786c}.pay-ot-bottom summary{cursor:pointer;padding:6px 0}.pay-ot-bottom .pay-dialog-actions{margin:0;gap:6px;flex-shrink:0}.pay-overtime-card .btn{padding:6px 10px;min-height:30px;font-size:12px}.pay-overtime-card [data-ot-status]:empty,.pay-overtime-card .pay-ot-preview:empty{display:none}.pay-source-component.pay-special-source{padding:10px 12px;margin:6px 0}.pay-special-source p{margin:3px 0;line-height:1.4;font-size:12px}.pay-special-source small{font-size:11px;line-height:1.35}.pay-special-source .pay-muted{font-size:11px}.pay-special-source strong{font-size:13px}
@media(max-width:560px){.pay-overtime-card{padding:9px}.pay-ot-summary{gap:5px}.pay-ot-stat{padding:7px}.pay-ot-stat>strong,.pay-ot-stat>input{font-size:20px}.pay-overtime-card .pay-ot-stat small{font-size:10px}.pay-ot-bottom{flex-wrap:wrap}.pay-ot-bottom>details{flex-basis:100%}.pay-ot-bottom .pay-dialog-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}.pay-ot-saved{font-size:10px;padding:3px 6px}}
.pay-ot-config{padding:10px 12px;margin-bottom:12px;border:1px solid #dce6df;border-radius:9px;background:#f5f9f5}.pay-ot-config h4{margin:0 0 7px;font-size:13px}.pay-ot-config .pay-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pay-ot-config .pay-field{gap:4px;font-size:12px}.pay-ot-config input{padding:7px 9px;min-width:0}.pay-ot-config p{margin:7px 0 0;font-size:11px;line-height:1.45}
.pay-source-body{grid-column:1/-1;min-width:0}.pay-special-trace{white-space:pre-line}.pay-source-component.pay-special-source{display:block}
.pay-ot-hours{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:600;color:#315b47}.pay-source-component.pay-special-source .pay-source-body>strong{font-size:15px;line-height:1.4}.pay-special-source .pay-special-amount{font-size:15px;font-weight:600;color:#315b47;margin:4px 0 7px}.pay-att-pending-badge{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:12px;background:#edf2ee;color:#708076;font-size:11px;font-weight:400;line-height:1.4}.pay-att-pending-note{margin:6px 0;color:#78867d;font-size:12px;line-height:1.5}
.pay-att-wallet{border:1px solid #dde6dc;border-radius:12px;padding:14px;margin:12px 0;background:#fff}.pay-att-wallet .pay-section-title{margin:0 0 10px}.pay-att-wallet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pay-att-wallet-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px;background:#f6f8f5;border-radius:8px;min-width:0}.pay-att-wallet-item div{display:grid;gap:4px}.pay-att-wallet-item strong{font-size:14px}.pay-att-wallet-item small{font-size:12px;color:#607466}.pay-att-wallet-item b{font-size:17px;white-space:nowrap}.pay-att-wallet>p{margin:10px 0 0}@media(max-width:560px){.pay-att-wallet-grid{grid-template-columns:1fr}.pay-att-wallet{padding:10px}.pay-att-wallet-item{padding:10px}}


.pay-book-table .pay-book-quantity{white-space:nowrap}

.pay-channel-cell{text-align:center!important}.pay-channel{display:inline-block;border-radius:7px;padding:4px 9px;font-size:12px;font-weight:700;line-height:1.5}.pay-channel-cathay{color:#17643d;background:#e5f3e9}.pay-channel-taiwan{color:#9b3035;background:#fbe9eb}.pay-channel-other{color:#285f92;background:#e8f0fa}.pay-channel-cash{color:#805c0d;background:#fff2cd}.pay-channel-unknown{color:#66716a;background:#edf0ed}
label.pay-att-card.pay-custody-option{display:flex;align-items:center;gap:10px;padding:10px;min-height:44px;box-sizing:border-box;cursor:pointer}.pay-custody-option>span{flex:1;min-width:0}.pay-custody-option>strong{margin-left:auto;white-space:nowrap}.pay-custody-option input[role=switch]{appearance:none;flex:0 0 36px;width:36px;height:22px;margin:0;padding:3px;border:1px solid #bdcbc2;border-radius:999px;background:#d4ded7;cursor:pointer}.pay-custody-option input[role=switch]::before{content:"";display:block;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #25443633;transition:transform .12s}.pay-custody-option input[role=switch]:checked{background:#386b56;border-color:#386b56}.pay-custody-option input[role=switch]:checked::before{transform:translateX(14px)}.pay-custody-option input[role=switch]:focus-visible{outline:2px solid #386b56;outline-offset:3px}.pay-custody-option input[role=switch]:disabled{opacity:.6;cursor:wait}
.pay-receipt-progress.pay-workspace{width:100%;max-width:none;margin:24px 0}.pay-receipt-progress .todo-counts{grid-template-columns:repeat(4,minmax(0,1fr))}.pay-receipt-month{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0 16px}.pay-receipt-month input{min-height:38px;padding:7px 10px;border:1px solid #dce5de;border-radius:8px;background:#fff;color:inherit}@media(max-width:700px){.pay-receipt-progress .todo-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}

.pay-work-quantities .pay-quantity-actions{margin-top:16px;gap:12px;align-items:center;flex-wrap:wrap}.pay-quantity-actions>.btn{white-space:nowrap}

.pay-paper-toolbar{margin:16px 0;display:flex;flex-wrap:wrap;gap:8px;align-items:center}.pay-work-panel{margin:12px 0;padding:12px;border:1px solid #d1ded3;border-radius:10px;background:#fff;min-width:0;overflow-x:auto}.pay-work-panel:empty{display:none}.pay-work-panel>details>summary{font-weight:600;cursor:pointer}.pay-paper-review{padding:12px;border:1px solid #d1ded3;border-radius:10px;background:#fff;margin:12px 0}.pay-paper-review .pay-table{min-width:650px}.pay-paper-hours{display:flex;align-items:center;gap:6px;white-space:nowrap}.pay-paper-hours input{width:64px;min-width:0}.pay-work-quantities .pay-monthly-cash{margin-top:16px}.pay-paper-review-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:12px}.pay-paper-review-actions label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;margin-left:auto}

/* Keep recall anchored to the full source card, independent of the form grid. */
.pay-source-component{position:relative}
.pay-source-component .pay-source-body>strong{display:block;padding-right:88px;min-height:38px;box-sizing:border-box}
.pay-source-component .btn.pay-award-revoke{position:absolute;top:12px;right:12px;float:none;width:auto;min-width:64px;margin:0;padding:7px 14px;min-height:34px;background:#fce8e6;border:1px solid #edc4c0;color:#973e38;line-height:1.3;white-space:nowrap}
.pay-source-component .btn.pay-award-revoke:hover{background:#f8d9d5;border-color:#dfa7a1}
.pay-source-component .btn.pay-award-revoke:focus-visible{outline:2px solid #ad5148;outline-offset:3px}

.pay-custodian-name{color:#b42318;font-weight:600}

/* Keep staffing and candidates inside the active schedule workspace. */
#page-schedule .schedule-card{position:relative}
#page-schedule .schedule-card>#gapPanel{margin-top:16px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}
@media(min-width:1250px){#page-schedule .schedule-card:has(#staffingDetails[open]){padding-right:480px;min-height:620px}#page-schedule .schedule-card:has(#staffingDetails[open])>#gapPanel{position:absolute;right:16px;top:62px;width:440px;max-height:calc(100% - 90px);overflow:auto}#page-schedule .schedule-card>#gapPanel .staffing-columns{grid-template-columns:minmax(0,1fr)}#page-schedule .schedule-card>#gapPanel .staffing-gap-list{max-height:180px}}

/* Workspace toolbar: status first, one contextual action, compact tool groups. */
#page-schedule #scheduleConvenience{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 16px;padding:0 0 16px;margin:0 0 14px;align-items:center}
#page-schedule .schedule-state-summary{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:0;padding:0 0 12px;border-bottom:1px solid #edf1ed;font-size:12px;color:#69796e;line-height:1.5}
#page-schedule .workspace-version{font-weight:650;color:#335845}
#page-schedule .workspace-working{display:inline-flex;align-items:center;gap:6px}
#page-schedule .workspace-working i{width:6px;height:6px;border-radius:50%;background:#9ba79f}
#page-schedule .workspace-working.settled i{background:#5b9273}
#page-schedule .workspace-working.pending{color:#98652c}
#page-schedule .workspace-working.pending i{background:#c68a42}
#page-schedule .workspace-candidate-count{margin-left:auto;color:#79857e}
#page-schedule .workspace-candidate-count b{font-weight:650;color:#3f5f4c;margin-left:4px}
#page-schedule #scheduleConvenience .schedule-primary-tools{display:flex;flex-wrap:wrap;gap:8px;min-width:0;flex-basis:auto}
#page-schedule #scheduleConvenience .btn{min-height:38px;padding:8px 12px;border-radius:8px;font-size:12px;white-space:nowrap}
#page-schedule #scheduleConvenience #btnWorkspaceNext{background:#356b54;border-color:#356b54;color:white;box-shadow:0 2px 4px #254d3612}
#page-schedule #scheduleConvenience #btnWorkspaceNext:hover{background:#285841}
#page-schedule #scheduleConvenience #btnBulkSchedule{background:white;border-color:#dce5dc;color:#536c5c;font-weight:550}
#page-schedule #scheduleConvenience #btnUndoSchedule{border-color:transparent;background:transparent;color:#6c7c70;font-weight:500}
#page-schedule #scheduleConvenience #btnUndoSchedule:disabled{color:#a2aaa4;cursor:default}
#page-schedule .workspace-secondary-tools{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0}
#page-schedule .workspace-secondary-tools>details{position:relative;margin:0;border:0;background:transparent;min-width:0}
#page-schedule .workspace-secondary-tools>details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:6px;padding:9px 10px;min-height:38px;white-space:nowrap;font-size:12px;font-weight:550;color:#607467;border-radius:8px;background:transparent;border:0}
#page-schedule .workspace-secondary-tools>details>summary::-webkit-details-marker{display:none}
#page-schedule .workspace-secondary-tools>details>summary::after{content:'⌄';font-size:12px;color:#8b998f}
#page-schedule .workspace-secondary-tools>details>summary:hover,#page-schedule .workspace-secondary-tools>details[open]>summary{background:#f0f5f0;color:#315a42}
#page-schedule #scheduleConvenience .workspace-secondary-tools .schedule-extra-content{position:absolute;right:0;top:calc(100% + 6px);z-index:25;display:flex;flex-direction:column;align-items:stretch;gap:6px;width:280px;max-width:calc(100vw - 48px);margin:0;padding:10px;background:white;border:1px solid #dfe8df;border-radius:12px;box-shadow:0 10px 30px #24402c1c}
#page-schedule .workspace-secondary-tools .schedule-extra-content>.btn,#page-schedule .workspace-secondary-tools .schedule-extra-content>.history-link{text-align:left;font-weight:500}
#page-schedule .workspace-secondary-tools .schedule-extra-content>.muted{font-size:11px;line-height:1.65;margin:2px 4px 6px}
#page-schedule .workspace-secondary-tools .schedule-instructions{margin:4px}
#page-schedule .schedule-board-heading{margin-bottom:12px}
#page-schedule .schedule-board-heading h3{font-size:18px;margin-bottom:4px}
@media(max-width:1100px){#page-schedule #scheduleConvenience{grid-template-columns:minmax(0,1fr)}#page-schedule .workspace-secondary-tools{justify-content:flex-start;border-top:1px solid #edf1ed;padding-top:8px}#page-schedule .workspace-secondary-tools>details:first-child .schedule-extra-content{left:0;right:auto}}
@media(max-width:600px){#page-schedule #scheduleConvenience{gap:10px;padding-bottom:12px}#page-schedule .schedule-state-summary{gap:6px 10px;padding-bottom:10px;font-size:11px}#page-schedule #scheduleConvenience .schedule-primary-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}#page-schedule #scheduleConvenience .schedule-primary-tools .btn{min-height:44px;flex:none;padding:9px 8px;font-size:12px}#page-schedule .workspace-secondary-tools{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0}#page-schedule .workspace-secondary-tools>details>summary{justify-content:center;padding:10px 4px;min-height:44px;font-size:11px}#page-schedule #scheduleConvenience .workspace-secondary-tools .schedule-extra-content{width:276px}#page-schedule .workspace-secondary-tools>details:nth-child(2) .schedule-extra-content{left:50%;right:auto;transform:translateX(-50%)}#page-schedule .workspace-secondary-tools>details:last-child .schedule-extra-content{right:0;left:auto}#page-schedule .schedule-board-heading p{font-size:11px;max-width:none}}
#page-schedule #scheduleConvenience .workspace-secondary-tools .schedule-extra-content>*{flex:0 0 auto;max-width:100%}
#page-schedule #scheduleConvenience .workspace-secondary-tools .schedule-extra-content>.btn{width:100%;min-height:40px}
@media(max-width:600px){#page-schedule #scheduleConvenience .workspace-secondary-tools .schedule-extra-content>.btn{min-height:44px}}
#page-schedule .workspace-secondary-tools>details{flex:0 0 auto}
#page-schedule .workspace-secondary-tools>details>summary{width:auto}
/* The existing single manual confirmation remains reachable with impact tables. */
#manualReasonDialog .modal-card{box-sizing:border-box;width:min(680px,100%);max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain}
#manualReasonDialog .table-wrap{max-width:100%;overflow-x:auto}
/* Restore previews keep the outcome visible without adding a separate wizard. */
.schedule-tool-dialog .recovery-outcome{border-left:3px solid #59795f;background:#f3f7f2;padding:10px 12px;margin:12px 0;overflow-wrap:anywhere}.schedule-tool-dialog .recovery-outcome p{margin:5px 0 0}.schedule-tool-dialog .tool-table td small{display:block;white-space:normal}

/* Expired tabs cannot reveal stale dialogs when pending callbacks finish. */
body[data-admin-session-expired="true"] > :not(#loginScreen):not(script):not(style),body[data-admin-session-expired="true"] .modal-overlay,body[data-admin-session-expired="true"] dialog{display:none!important}

.pay-funding-table{width:100%;min-width:0!important;table-layout:fixed}
.pay-funding-table th,.pay-funding-table td{white-space:normal;overflow-wrap:anywhere}
.pay-funding-table th:first-child{width:23%}.pay-funding-table th:last-child{width:30%}
.pay-funding-table .pay-funding-note{text-align:left}.pay-funding-table small{display:block}
.pay-funding-label{display:none}
@media(max-width:600px){
 .pay-funding-table thead{display:none}.pay-funding-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border-bottom:1px solid #ddd}
 .pay-funding-table tr>th{grid-column:1;grid-row:1 / span 3;width:auto}
 .pay-funding-amount{grid-column:2;grid-row:1}.pay-funding-remaining{grid-column:2;grid-row:2}.pay-funding-fee{grid-column:2;grid-row:3}
 .pay-funding-note{grid-column:1 / -1}.pay-funding-label{display:inline;font-weight:600}
}
.pay-notification-dialog{width:min(680px,calc(100vw - 32px));box-sizing:border-box;max-height:90dvh;overflow:auto;overflow-wrap:anywhere}
.pay-notification-dialog details{margin:12px 0}.pay-notification-dialog summary{cursor:pointer;font-weight:600}
.pay-notification-dialog blockquote{margin:12px 0;padding:16px;background:#f0f7f3;border-left:4px solid #459270;border-radius:8px}
.pay-notification-warning{padding:12px;background:#fff4df;color:#684600;border-radius:8px;margin:12px 0}
.pay-notification-warning label{display:flex;align-items:flex-start;gap:8px}.pay-notification-warning input{flex:none;margin-top:4px}
.pay-notification-records{padding-left:20px}.pay-notification-records li{padding:8px 0;border-bottom:1px solid #ddd}.pay-notification-records time{font-size:.85em}
.pay-notification-dialog .pay-dialog-actions{display:flex;flex-wrap:wrap;gap:8px}
.pay-receipt-progress .section-head{flex-wrap:wrap;gap:12px}
.pay-receipt-actions{display:flex;gap:8px;margin-left:auto;max-width:100%}
.pay-receipt-actions .btn{white-space:nowrap}
@media(max-width:560px){.pay-receipt-actions{width:100%;justify-content:flex-end;gap:6px}.pay-receipt-actions .btn{padding-left:10px;padding-right:10px}}
@media(max-width:560px){.pay-notification-dialog{padding:16px}.pay-notification-dialog .pay-dialog-actions .btn{width:100%}}

/* Ephemeral manager-only A4 payslip preview; shared payroll dialogs retain their layout. */
.pay-version-dialog.pay-admin-payslip-preview{width:min(960px,calc(100vw - 32px));max-width:960px;max-height:90vh;box-sizing:border-box}
.pay-admin-payslip-preview .pay-admin-payslip-page{display:block;width:100%;height:auto;margin:12px 0;background:#fff;box-shadow:0 1px 8px #0002}
@media(max-width:600px){.pay-version-dialog.pay-admin-payslip-preview{padding:12px}}
/* Paper OCR only: do not widen schedule import or other payroll dialogs. */
.pay-version-dialog.paper-upload-dialog{max-height:92dvh;padding:16px;overflow:auto}
.paper-upload-dialog>*{min-width:0}.paper-upload-dialog h2{font-size:20px;margin:14px 0 8px}.paper-upload-dialog h3{font-size:16px;margin:10px 0}.paper-upload-dialog p{line-height:1.5;overflow-wrap:anywhere}
.paper-recognition-editor{min-width:0;padding:10px}.paper-recognition-editor .paper-recognition-wrap{max-width:100%;min-width:0;overflow:auto}
.paper-recognition-editor .pay-table.paper-recognition-table{width:100%;min-width:0;table-layout:fixed;font-size:13px}
.paper-recognition-editor .paper-recognition-table th,.paper-recognition-editor .paper-recognition-table td{box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;vertical-align:top;padding:8px 6px}
.paper-recognition-table th:nth-child(1){width:7%}.paper-recognition-table th:nth-child(2){width:15%}.paper-recognition-table th:nth-child(3){width:34%}.paper-recognition-table th:nth-child(4){width:14%}.paper-recognition-table th:nth-child(5){width:13%}.paper-recognition-table th:nth-child(6){width:17%}
.paper-recognition-editor .paper-recognition-field{display:grid;gap:3px;min-width:0;margin:0 0 6px;font-size:11px;line-height:1.4;color:#52665a}
.paper-recognition-editor .paper-recognition-field input{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:34px;padding:5px 6px;border:1px solid #cbd8ce;border-radius:6px;font:inherit;font-size:13px;font-variant-numeric:tabular-nums;color:#213d2a;background:#fff}
.paper-recognition-interval{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.55fr);gap:6px;margin-bottom:6px;padding-bottom:4px;border-bottom:1px solid #e5ece6}
.paper-recognition-editor button{max-width:100%;white-space:normal;font-size:11px;line-height:1.4;padding:4px 7px;margin:3px 0}.paper-recognition-editor small{display:block;font-size:11px;color:#68796e;line-height:1.4}.paper-recognition-editor p{margin:5px 0 8px;font-size:12px}.paper-recognition-evidence{font-size:12px;margin-bottom:7px;overflow-wrap:anywhere}.paper-recognition-evidence summary{cursor:pointer;color:#70551f}.paper-recognition-evidence p{white-space:pre-wrap}
@media(max-width:700px){.pay-version-dialog.paper-upload-dialog{padding:10px;max-height:94dvh}.paper-recognition-editor{padding:7px}.paper-recognition-table,.paper-recognition-table tbody{display:block}.paper-recognition-table thead{display:none}.paper-recognition-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #dce5de;border-radius:8px;margin:8px 0;padding:5px;background:#fff}.paper-recognition-editor .paper-recognition-table td{display:block;min-width:0;border:0;padding:5px}.paper-recognition-table td:nth-child(3),.paper-recognition-table td:nth-child(6){grid-column:1/-1}.paper-recognition-table td::before{content:attr(data-column);display:block;font-size:11px;font-weight:600;color:#67786b;margin-bottom:5px}.paper-recognition-editor .paper-recognition-field input{font-size:16px;height:38px}.paper-recognition-interval{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.paper-recognition-interval .paper-recognition-field:last-child{grid-column:1/-1}.paper-recognition-editor button{font-size:12px;min-height:32px}.paper-recognition-table td:nth-child(1) strong{font-size:16px}}
.paper-upload-dialog button{max-width:100%;white-space:normal}.paper-upload-dialog pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}.paper-upload-technical{font-size:12px;color:#68796e;margin:8px 0}.paper-upload-technical summary{cursor:pointer}
/* Basic-pay paper import reuses the schedule review region, never a modal. */
[data-photo-inline]{margin:16px 0;min-width:0}.paper-inline-review .pay-table{width:100%;min-width:0;table-layout:fixed}.paper-inline-review th,.paper-inline-review td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}.paper-inline-review .paper-inline-input{box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin:3px 0;padding:6px 8px;border:1px solid #cbd8ce;border-radius:6px;background:#fff;color:#213d2a;font:inherit;font-size:14px;min-height:34px;font-variant-numeric:tabular-nums}.paper-inline-review label,.paper-inline-review small{display:block}.paper-inline-review [aria-invalid=true]{border-color:#b45309;background:#fffbeb}.paper-inline-review details{font-size:12px}/* 日期要看得到整個 2026-11-19 (owner, 2026-11-27) */.paper-inline-review th:nth-child(1){width:32%}.paper-inline-review th:nth-child(2){width:20%}.paper-inline-review th:nth-child(3){width:20%}.paper-inline-review th:nth-child(4){width:28%}
@media(max-width:600px){.paper-inline-review th,.paper-inline-review td{padding:5px 3px;font-size:12px}.paper-inline-review .paper-inline-input{font-size:16px;min-height:36px}}
.paper-inline-review .pay-paper-hours{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}.paper-inline-review .pay-paper-hours .paper-inline-input{width:54px;flex:0 1 54px}.paper-inline-review .paper-inline-warning>summary{color:#92400e;font-weight:600}
@media(max-width:600px){.paper-inline-review .pay-table,.paper-inline-review tbody{display:block;width:100%}.paper-inline-review thead{display:none}.paper-inline-review tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:10px 0;padding:10px;border:1px solid #d1d5db;border-radius:8px}.paper-inline-review td{display:block;min-width:0;width:auto!important;padding:0}.paper-inline-review td:first-child,.paper-inline-review td:last-child{grid-column:1/-1}.paper-inline-review td:before{content:attr(data-column);display:block;font-size:13px;font-weight:600;margin-bottom:4px}.paper-inline-review .pay-paper-hours .paper-inline-input{width:70px;flex:0 1 70px}.paper-inline-review .paper-inline-input{font-size:16px;min-height:38px}}

.paper-inline-review .paper-inline-span{min-height:40px}.paper-inline-review .paper-inline-span-date{min-height:94px}.paper-inline-review .paper-inline-date-exception{font-size:11px;color:#8a4c0d}.paper-inline-review .paper-inline-uncertainties{padding:8px 10px;background:#fffbeb;color:#854d0e;border-radius:6px;margin-top:8px}.paper-inline-review .paper-inline-uncertainties p{margin:4px 0;font-size:12px}.paper-inline-uncertainties>summary{cursor:pointer;font-size:13px;font-weight:600}
.reason-quick-picks{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}.reason-quick-picks .btn{font-size:13px;padding:4px 10px}
.schedule-step-summary{margin:6px 0 0;font-size:14px;font-weight:500;color:#355e52}
.workspace-more{position:relative;display:inline-block}.workspace-more>summary{list-style:none;cursor:pointer;padding:7px 12px;border:1px solid #c9d6cf;border-radius:8px;background:#fff;font-size:14px}.workspace-more>summary::-webkit-details-marker{display:none}.workspace-more>summary::after{content:" ▾"}.workspace-more[open]>.workspace-more-content{position:absolute;z-index:30;right:0;top:calc(100% + 6px);min-width:260px;max-width:min(360px,90vw);padding:10px;background:#fff;border:1px solid #dce3df;border-radius:10px;box-shadow:0 8px 24px #0002;display:grid;gap:8px}.workspace-more-common{display:grid;gap:6px}.workspace-more-content .btn{width:100%;text-align:left}.workspace-more-content .workspace-secondary-tools{display:grid;gap:6px}
.overview-facts{display:block;margin:4px 0 12px;font-size:14px;color:#5b6b63}.overview-facts b{color:#263f35;font-weight:600}.overview-help>summary{cursor:pointer;font-weight:600;color:#355e52}.overview-help[open]>summary{margin-bottom:8px}
.overview-today{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin:4px 0 12px}.overview-today-cell{background:#f4f7f5;border-radius:8px;padding:8px 10px;display:grid;gap:2px}.overview-today-cell span{font-size:13px;color:#5b6b63}.overview-today-cell strong{font-size:22px;color:#263f35}.overview-today-cell.warn strong{color:#a5640b}.overview-today-cell.danger strong{color:#b42318}.overview-today-closed{margin:4px 0 12px;font-weight:600;color:#5b6b63}
.overview-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}.overview-chip{border:0;border-radius:8px;padding:6px 12px;font-size:14px;cursor:pointer;background:#eef2f0;color:#355e52}.overview-chip.warn{background:#fdf3e1;color:#8a5208}.overview-chip.danger{background:#fdecea;color:#a1251b}.overview-chip[aria-pressed="true"]{outline:2px solid currentColor;outline-offset:1px}
.overview-row{display:grid;grid-template-columns:auto auto 1fr auto;gap:4px 12px;align-items:center}.overview-row-when{font-weight:600}.overview-row-what{color:#a1251b}.overview-row .todo-actions{display:flex;gap:6px}.overview-row-more{margin-top:4px;font-size:13px;color:#5b6b63}.overview-row-more>summary{cursor:pointer}.overview-names>summary{cursor:pointer}.overview-names>summary span{color:#2f6f9f}.overview-footnote{font-size:13px;margin:8px 0 0}.overview-payroll>summary{cursor:pointer;font-weight:600;color:#355e52}
@media(max-width:600px){.overview-row{grid-template-columns:1fr 1fr}.overview-row-what,.overview-row .todo-actions{grid-column:1/-1}}
.schedule-step-summary{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline;font-weight:400;color:#38463f}.draft-quality-title{width:100%;font-size:13px;color:#5b6b63}.draft-quality-item{font-size:14px}.draft-quality-item b{color:#263f35}.draft-quality-item small{margin-left:4px;color:#7a8781}.draft-quality-item.better b{color:#1e7a44}.draft-quality-item.worse b{color:#b42318}.draft-quality-ok{font-size:14px;color:#1e7a44;font-weight:600}

/* Overview: today first, one task tab at a time, grouped attendance rows, folded history */
.top-menu{position:relative}.top-menu>summary{display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;min-width:40px}.top-menu>summary::-webkit-details-marker{display:none}.top-menu-list{position:absolute;right:0;top:calc(100% + 6px);z-index:30;display:flex;flex-direction:column;gap:6px;padding:8px;min-width:120px;background:#fff;border:1px solid #dfe5e1;border-radius:10px;box-shadow:0 6px 18px rgba(0,0,0,.12)}
@media(max-width:700px){body .topbar>div:first-child>.muted{display:none}body .topbar>div:first-child{flex:0 0 auto}body .topbar h1{white-space:nowrap}body .topbar{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px}body .top-actions{display:flex;flex-wrap:nowrap;align-items:center;gap:8px}}
.overview-today-card{margin:0 0 12px}.overview-today-card .overview-today{margin:0 0 8px}.overview-today-date{margin:0 0 8px;font-size:13px;color:#5b6b63}.overview-pending{margin:0;font-size:14px;color:#5b6b63}.overview-pending strong{font-size:18px;color:#263f35}.overview-pending.clear{color:#2f6f4f}
.dashboard-tasks{padding:14px}.dashboard-tasks .overview-status{font-size:12px;color:#7a857f;margin:0 0 8px}.dashboard-tasks .todo-list{max-height:none;overflow:visible}
.overview-chips{margin:0 0 8px}.overview-chip{padding:8px 12px;min-height:40px}.overview-chip[aria-pressed="true"]{outline:2px solid currentColor;outline-offset:1px;font-weight:600}
.overview-group{display:flex;align-items:center;justify-content:space-between;gap:12px}.overview-group-main{display:grid;gap:2px;min-width:0;flex:1}.overview-group .todo-actions{flex-shrink:0;margin-left:0;width:auto}.overview-group-main strong{font-size:15px}.overview-group .btn{min-width:64px}
.overview-article{display:block!important;padding:10px 2px!important}.overview-group-more{margin-top:6px}.overview-group-more .overview-row{padding:8px 0;border-top:1px solid #edf0ee}.overview-group-more .overview-row-more{margin:0 0 6px}
.case-history-fold,.dashboard-tasks .overview-options{margin-top:12px;border-top:1px solid #e5e7eb;padding-top:10px}.case-history-fold>summary,.overview-options>summary{cursor:pointer;font-weight:600;color:#355e52;display:flex;justify-content:space-between;gap:8px}.case-history-fold>summary span{font-weight:400;color:#5b6b63}.case-history-fold .case-history{margin-top:12px}.case-history-fold .case-history-heading h3{display:none}
.overview-options .form-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0 6px}
@media(max-width:600px){.overview-group{align-items:flex-start}.overview-today-card .overview-today{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.overview-today-card .overview-today-cell{padding:6px 8px}.overview-today-card .overview-today-cell strong{font-size:18px}}

button.overview-today-cell{border:0;font:inherit;text-align:left;cursor:pointer;width:100%}button.overview-today-cell:hover{background:#e9efec}button.overview-today-cell[aria-expanded="true"]{box-shadow:inset 0 -3px 0 #6b9a86}
.overview-today-hint{margin:0 0 8px;font-size:12px;color:#7a857f}.overview-today-detail{margin:0 0 10px;padding:10px 12px;border:1px solid #e0e6e2;border-radius:10px;background:#fafcfb}.overview-today-detail[hidden]{display:none}
.overview-today-detail h4{margin:0 0 6px;font-size:14px;color:#263f35}.overview-today-detail section+section{margin-top:10px}.overview-today-detail ul{list-style:none;margin:0;padding:0}.overview-today-detail li{padding:6px 0;border-top:1px solid #edf0ee;font-size:14px;line-height:1.7}.overview-today-detail li:first-child{border-top:0}
.overview-today-detail li.gap{color:#8a2a1f}.overview-today-detail li.gap em{font-style:normal;font-weight:600;color:#b42318}.overview-today-detail li span{color:#5b6b63}.overview-today-detail .btn{min-height:34px;padding:4px 10px;margin-left:6px}.overview-leave{margin:6px 0 0;font-size:13px;color:#5b6b63}
.overview-inline{margin:10px 0 4px;padding:10px 12px;border:1px solid #e0e6e2;border-radius:10px;background:#fafcfb}.overview-inline[hidden]{display:none}.overview-request+.overview-request{margin-top:14px;padding-top:12px;border-top:1px solid #e5e7eb}.overview-request h4{margin:0 0 4px;font-size:15px}.overview-request p{margin:3px 0;font-size:13px}.overview-request textarea{width:100%;min-height:64px;margin:6px 0;padding:8px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:14px}.overview-request [data-request-feedback]{color:#b42318;min-height:1em}.overview-request .form-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start;margin:6px 0 0}.overview-request [data-request-feedback]{margin:0}

.dashboard-tasks .overview-bar{display:flex;align-items:center;justify-content:space-between;gap:10px 12px;flex-wrap:wrap;margin:0 0 10px}.dashboard-tasks .overview-bar .overview-status{margin:0;flex:1 1 140px;min-width:0}.overview-controls{display:flex;align-items:center;gap:8px;margin-left:auto}.overview-controls label{display:flex;align-items:center;gap:6px;font-size:13px;color:#5b6b63}.overview-controls input[type=month]{min-height:36px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:13px}.overview-controls .btn{min-height:36px;padding:4px 12px}

#gapPanel .staffing-dismiss-all{display:inline-flex;margin:0 0 8px;min-height:36px;padding:4px 12px;border:1px solid #d9e0db;border-radius:8px;background:#fff;color:#5b6b63;font-size:13px;cursor:pointer}#gapPanel .staffing-dismiss-all:hover{background:#f1f5ef}

.time24{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px}.time24 select{min-height:44px;padding:6px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:16px;background:#fff}.time24 input{width:7.5em;min-height:44px;padding:6px 10px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:20px;letter-spacing:.04em;font-variant-numeric:tabular-nums}.time24 input:invalid{border-color:#b42318}.time24-hint{flex-basis:100%;color:#b42318;font-size:13px;min-height:0}.time24-hint:empty{display:none}
.time24>select,.time24>input{display:inline-block;flex:0 0 auto;width:auto;margin:0}.time24>input{width:6.5em}
.dt24{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px}.dt24-field{flex:1 1 12em;min-width:0;min-height:44px;padding:6px 10px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:18px;font-variant-numeric:tabular-nums;background:#fff}.dt24-timeonly .dt24-field{flex:0 0 7em}.dt24-field:invalid{border-color:#b42318}.dt24-open{min-width:44px;min-height:44px;border:1px solid #d8e1da;border-radius:8px;background:#fff;font-size:18px;cursor:pointer}
.dt24-pop{position:absolute;z-index:60;top:calc(100% + 4px);left:0;padding:12px;background:#fff;border:1px solid #cfd8d2;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);max-width:min(560px,calc(100vw - 32px))}.dt24-pop[hidden]{display:none}.dt24-body{display:flex;flex-wrap:wrap;gap:12px}
.dt24-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.dt24-head button{border:0;background:none;font-size:20px;padding:4px 8px;cursor:pointer}.dt24-week,.dt24-days{display:grid;grid-template-columns:repeat(7,36px);gap:2px;text-align:center}.dt24-week span{font-size:13px;color:#5b6b63;padding:4px 0}
.dt24-days button,.dt24-col button{border:1px solid transparent;border-radius:6px;background:none;font:inherit;font-size:15px;height:34px;cursor:pointer;font-variant-numeric:tabular-nums}.dt24-days button.other{color:#a3aca6}.dt24-days button.today{border-color:#9aa8a0}.dt24-days button.on,.dt24-col button.on{background:#2f6fe4;color:#fff;font-weight:700}
.dt24-cols{display:grid;gap:4px}.dt24-colhead,.dt24-colrow{display:grid;grid-template-columns:repeat(2,56px);gap:6px;text-align:center}.dt24-colhead span{font-size:13px;color:#5b6b63}.dt24-col{display:grid;align-content:start;max-height:238px;overflow-y:auto;overscroll-behavior:contain}
.dt24-foot{display:flex;gap:12px;align-items:center;margin-top:8px}.dt24-foot button{border:0;background:none;color:#2f6fe4;font:inherit;font-size:15px;cursor:pointer;padding:6px 4px}.dt24-foot .dt24-done{margin-left:auto;background:#356b58;color:#fff;border-radius:8px;padding:6px 16px}
.dt24-cols.with-seconds .dt24-colhead,.dt24-cols.with-seconds .dt24-colrow{grid-template-columns:repeat(3,52px)}
/* 打卡紀錄 → 待處理: compact rows, two columns on wide screens; an opened panel takes the full row.
   Rows with items stand out; rows with 0 are quieter. Panels and their content are unchanged. */
.attendance-console .attendance-review-area{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:10px}
.attendance-console .attendance-review-area>#attendanceTaskPanels,.attendance-console .attendance-review-area>#attendanceAttemptLog,.attendance-console .attendance-review-area .attendance-tasks{display:contents}
.attendance-console .attendance-review-area .attendance-action-panel{margin:0;border-radius:8px}
.attendance-console .attendance-review-area .attendance-action-panel[open]{grid-column:1/-1}
.attendance-console .attendance-review-area .attendance-action-panel>summary{min-height:40px;padding:7px 12px;font-size:14px;gap:8px}
.attendance-console .attendance-review-area .attendance-action-panel>summary::before{font-size:18px}
.attendance-console .attendance-review-area .attendance-action-panel:has(>summary .attendance-count:not(.has-items)){background:#fafbfa;border-color:#e6ebe8}
.attendance-console .attendance-review-area .attendance-action-panel:has(>summary .attendance-count:not(.has-items))>summary{font-weight:500;color:#5b6b63}
.attendance-console .attendance-review-area .attendance-action-panel:has(>summary .attendance-count.has-items){border-color:#e3b8b1}
@media(max-width:700px){.attendance-console .attendance-review-area{grid-template-columns:1fr;gap:4px}.attendance-console .attendance-review-area .attendance-action-panel small{display:inline;margin-left:6px}}
/* 收支流水 */
.bank-ledger .ledger-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}.bank-ledger .ledger-bar h3{margin:0}
.bank-ledger .ledger-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bank-ledger .ledger-controls label{display:flex;align-items:center;gap:6px;font-size:13px;color:#5b6b63}.bank-ledger .ledger-controls input[type=month]{min-height:38px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit}
.bank-ledger .ledger-upload{cursor:pointer;color:#fff}.bank-ledger .ledger-status{font-size:13px;color:#5b6b63;margin:4px 0 8px;min-height:1em}.bank-ledger .ledger-status.storage-error{color:#b42318}
.bank-ledger .chip{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600}.bank-ledger .chip.ok{background:#e6f3ea;color:#256b3d}.bank-ledger .chip.warn{background:#fdf3e1;color:#8a5208}.bank-ledger .chip.danger{background:#fdecea;color:#a1251b}
.ledger-preview{border:1px solid #cfdcd3;border-radius:10px;padding:12px;margin:0 0 14px;background:#fbfdfb}.ledger-facts{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;font-size:13px;color:#4c5d54;margin-bottom:10px}
.ledger-warn{color:#a1251b;font-size:13px}.ledger-ok{color:#256b3d;font-size:14px}.ledger-pending h4,.ledger-h{margin:12px 0 6px;font-size:15px;color:#263f35}.ledger-h small{font-weight:400;color:#7a857f}
.ledger-row,.ledger-entry{border-top:1px solid #e8ece9;padding:8px 0}.ledger-row.reversed,.ledger-entry.reversed{opacity:.6}
.ledger-main,.ledger-entry>summary{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:4px 10px;align-items:center;font-size:14px}.ledger-entry>summary{cursor:pointer;list-style:none}.ledger-entry{padding:6px 0}.ledger-entry>summary::-webkit-details-marker{display:none}
.ledger-date{color:#5b6b63;font-variant-numeric:tabular-nums}.ledger-memo{min-width:0;overflow-wrap:anywhere}.ledger-memo small,.ledger-cat small{color:#7a857f}.ledger-cat{display:inline-block;font-size:12px;color:#355e52;background:#eef3f0;border-radius:6px;padding:0 6px;white-space:nowrap}
.ledger-in,.ledger-out{font-variant-numeric:tabular-nums;font-weight:600;text-align:right;white-space:nowrap}.ledger-in{color:#256b3d}.ledger-out{color:#263f35}
.ledger-edit{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 2px 54px}.ledger-edit select,.ledger-edit input[type=month],.ledger-edit input[data-note]{min-height:38px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:14px;background:#fff}.ledger-edit input[data-note]{flex:1 1 160px}[data-entry] .ledger-edit input[data-memo]{flex:1 1 100%;min-height:38px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:14px;background:#fff}.ledger-bank-memo{flex:1 1 100%;margin-top:-4px;font-size:12px}.ledger-edit label{display:flex;align-items:center;gap:6px;font-size:13px;color:#5b6b63}.ledger-remember{font-size:13px}
.ledger-groups>summary,.ledger-group>summary{cursor:pointer;font-weight:600;color:#355e52;padding:8px 0}.ledger-group{margin-left:8px}.ledger-group>summary{display:flex;justify-content:space-between;font-weight:500;color:#263f35;border-top:1px solid #e8ece9}
.ledger-preview .form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.ledger-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:4px 0 6px}.ledger-summary>div{background:#f4f7f5;border-radius:8px;padding:8px 12px;display:grid;gap:2px}.ledger-summary strong{font-size:18px;font-variant-numeric:tabular-nums}
.ledger-totals{display:grid;gap:0;border:1px solid #e0e6e2;border-radius:10px;overflow:hidden}.ledger-total{display:grid;grid-template-columns:minmax(0,1fr) auto 7.5em;gap:10px;align-items:center;padding:8px 12px;border-top:1px solid #edf0ee;font-size:14px}.ledger-total:first-child{border-top:0}.ledger-total strong{text-align:right;font-variant-numeric:tabular-nums}.ledger-total small{color:#7a857f;font-weight:400}.ledger-total.muted-row{color:#7a857f;background:#fafbfa}.ledger-total-group>summary.ledger-total{list-style:none;cursor:pointer;border-top:1px solid #edf0ee}.ledger-totals>.ledger-total-group:first-child>summary.ledger-total{border-top:0}.ledger-total-group>summary::-webkit-details-marker{display:none}.ledger-total-group>summary>span:first-child::before{content:'▸';display:inline-block;width:1em;color:#9aa59f;transition:transform .15s}.ledger-total-group[open]>summary>span:first-child::before{transform:rotate(90deg)}.ledger-total-group>summary:hover{background:#f4f7f5}.ledger-total-lines{padding:2px 12px 8px 30px;background:#fbfcfb;border-top:1px dashed #e6ebe8}.ledger-total-line{display:grid;grid-template-columns:3.2em minmax(0,1fr) auto;gap:8px;align-items:baseline;padding:4px 0;font-size:13px;border-top:1px solid #f0f3f1}.ledger-total-line:first-child{border-top:0}.ledger-total-line>span:nth-child(2){overflow-wrap:anywhere}.ledger-total-line>span:last-child{text-align:right;font-variant-numeric:tabular-nums}.ledger-count{color:#7a857f;font-size:13px}.ledger-note{font-size:12px;margin:6px 0 0}
@media(max-width:600px){.ledger-edit{margin-left:0}}
.ledger-list>summary{cursor:pointer;margin-top:14px}.bank-ledger .ledger-upload,.bank-ledger .ledger-upload:hover{color:#fff!important;font-weight:600}

.ledger-list-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:14px}.ledger-list-head .ledger-h{margin:0}
.ledger-modes{display:inline-flex;border:1px solid #cfdcd3;border-radius:8px;overflow:hidden}.ledger-modes button{border:0;background:#fff;padding:6px 12px;font:inherit;font-size:13px;color:#355e52;cursor:pointer;min-height:36px}.ledger-modes button[aria-pressed="true"]{background:#356b58;color:#fff;font-weight:600}
.bank-ledger details.ledger-list{border:1px solid #e0e6e2;border-radius:10px;margin-top:8px;padding:0 12px}.bank-ledger details.ledger-list>summary{display:grid;grid-template-columns:minmax(0,1fr) auto 8em;gap:10px;align-items:center;padding:10px 0;margin:0;cursor:pointer;font-weight:600;color:#263f35;list-style:none}.bank-ledger details.ledger-list>summary::-webkit-details-marker{display:none}.bank-ledger details.ledger-list>summary small{color:#7a857f;font-weight:400}.bank-ledger details.ledger-list>summary strong{text-align:right;font-variant-numeric:tabular-nums}.bank-ledger details.ledger-list>summary::before{content:none}

/* 收支流水 tabs, 現金收支, 收支設置 */
.finance-page .ledger-bar label.finance-month{display:flex;align-items:center;gap:6px;font-size:13px;color:#5b6b63}.finance-page .finance-month input{min-height:38px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit}.finance-page .ledger-bar label.finance-month[hidden]{display:none}
.finance-month-nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.finance-step{min-height:38px;padding:4px 10px;border:1px solid #d8e1da;border-radius:8px;background:#fff;color:#2f4a3c;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}.finance-step:hover{background:#f2f6f3}
.finance-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #cfdcd3;border-radius:10px;overflow:hidden;margin:4px 0 12px}.finance-tabs button{border:0;background:#fff;font:inherit;font-size:15px;padding:10px 4px;color:#355e52;cursor:pointer;min-height:44px}.finance-tabs button+button{border-left:1px solid #cfdcd3}.finance-tabs button[aria-selected="true"]{background:#356b58;color:#fff;font-weight:700}
.finance-page [role=tabpanel][hidden]{display:none}.ledger-actions{display:flex;justify-content:flex-end;margin-bottom:4px}
.ledger-summary small{display:block;font-size:12px;font-weight:400;line-height:1.4}
.cash-quick{border:1px solid #e0e6e2;border-radius:10px;padding:10px 12px;margin:10px 0}.cash-quick .ledger-h{margin:0 0 8px}
.cash-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.cash-tag{border:1px solid #cfdcd3;background:#f4f7f5;border-radius:999px;padding:6px 12px;font:inherit;font-size:14px;color:#263f35;cursor:pointer;min-height:38px}.cash-tag small{color:#7a857f}.cash-tag.in{background:#e6f3ea;border-color:#b9d9c3}
.cash-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.cash-form input,.cash-form select{min-height:40px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:15px;background:#fff}.cash-form input[name=amount]{width:7em;font-variant-numeric:tabular-nums}.cash-memo-row{display:flex;gap:8px;align-items:center;flex:1 1 13em;min-width:0}.cash-form input[name=memo]{flex:1 1 auto;min-width:0;width:100%}.cash-memo-row .btn{flex:none}
.cash-direction{display:inline-flex;border:1px solid #cfdcd3;border-radius:8px;overflow:hidden}.cash-direction button{border:0;background:#fff;padding:6px 12px;font:inherit;min-height:40px;cursor:pointer;color:#355e52}.cash-direction button[aria-pressed="true"]{background:#356b58;color:#fff;font-weight:600}
.cash-count form{margin:4px 0 8px}.cash-counts{margin:0 0 10px;padding-left:18px;font-size:13px;color:#4c5d54}
.finance-todos .todo-list{margin:0 0 8px}.finance-todos .todo-ok{margin:0 0 10px}
/* 盤點零用金 and 收支待處理 carry no amount: on a phone their empty amount column gives its room to the title */
@media(max-width:700px){.bank-ledger details:is(.cash-count,.finance-todos)>summary{grid-template-columns:minmax(0,1fr) auto}.bank-ledger details:is(.cash-count,.finance-todos)>summary>strong:empty{display:none}}
.fs-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:12px}.fs-card{border:1px solid #e0e6e2;border-radius:10px;padding:10px 12px}.fs-head{display:flex;align-items:baseline;gap:8px}.fs-head h4{margin:0;font-size:15px;color:#263f35}.fs-help{font-size:12px;margin:4px 0 8px}
.fs-add,.fs-edit{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}.fs-add input,.fs-add select,.fs-edit input,.fs-edit select{min-height:38px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit;font-size:14px;background:#fff}.fs-add input,.fs-edit input{flex:1 1 120px;min-width:0}.fs-edit[hidden]{display:none}.fs-edit{grid-column:1/-1;background:#fafcfb;border-radius:8px;padding:6px}
.fs-row{display:grid;grid-template-columns:minmax(0,1fr) 6em 7em auto;gap:4px 10px;align-items:center;padding:8px 0;border-top:1px solid #edf0ee;font-size:14px}
.fs-row>.muted{text-align:left}.fs-row>.fs-count{text-align:right}.fs-name{min-width:0;overflow-wrap:anywhere}.fs-count{color:#7a857f;font-size:13px;white-space:nowrap}.fs-actions{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.fs-actions .btn{min-height:34px;padding:4px 10px}
.fs-row .chip{display:inline-block;padding:0 7px;border-radius:999px;font-size:11px;background:#eef3f0;color:#5b6b63;font-weight:400}.fs-row .chip.warn{background:#fdf3e1;color:#8a5208}.fs-row .chip.ok{background:#e6f3ea;color:#256b3d}
.fs-meta{display:none}
@media(max-width:600px){.fs-row{grid-template-columns:minmax(0,1fr) auto}.fs-row>.muted,.fs-row>.fs-count,.fs-row>span:empty{display:none}.fs-meta{display:block;font-size:12px;color:#7a857f;font-weight:400}}

/* Monthly payroll downloads stay beside the dynamically mounted special-attendance toolbar. */
.pay-book-actions>.pay-month-download{order:2;position:relative;text-align:left}
.pay-month-download>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:6px;white-space:nowrap}
.pay-month-download>summary::-webkit-details-marker{display:none}
.pay-month-download[open]>summary{position:relative;z-index:42}
.pay-month-download-backdrop{position:fixed;inset:0;z-index:40;border:0;background:transparent;cursor:default;width:100%;height:100%}
.pay-month-download-panel{position:absolute;z-index:41;top:calc(100% + 8px);right:0;width:min(380px,calc(100vw - 32px));box-sizing:border-box;padding:16px;background:#fff;border:1px solid #c8d6cc;border-radius:12px;box-shadow:0 10px 32px #173c2729;max-height:calc(100dvh - 140px);overflow:auto}
.pay-month-download-panel fieldset{margin:0 0 12px;padding:10px;border:1px solid #d5dfd8;border-radius:8px;display:flex;gap:10px 14px;flex-wrap:wrap}
.pay-month-download-panel fieldset label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.pay-month-download-panel input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:#427a5c}
.pay-month-download-panel [data-month-export-status]{font-size:13px;line-height:1.65;margin:12px 0 0;overflow-wrap:anywhere;color:#51665a}
.pay-month-download-panel .btn:disabled{cursor:not-allowed;opacity:.5}
/* 營業匯總: POS import */
.revenue-pos-pick{cursor:pointer;margin-left:auto}
.pos-preview{margin:12px 0;padding:12px 14px;border:1px solid #cfe0d4;border-radius:12px;background:#f7fbf8;display:grid;gap:8px}
.pos-facts{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;font-size:14px}
.revenue-report table.pos-table{min-width:0;table-layout:fixed}
.pos-table th,.pos-table td{padding:6px 8px;font-size:14px}
.pos-table th:nth-child(2),.pos-table td:nth-child(2){width:5em}.pos-table th:nth-child(3),.pos-table td:nth-child(3){width:7.5em}.pos-table th:nth-child(4),.pos-table td:nth-child(4){width:40%}
.pos-table td:nth-child(2),.pos-table td:nth-child(3),.pos-table th:nth-child(2),.pos-table th:nth-child(3){text-align:right;font-variant-numeric:tabular-nums}
.pos-table td:first-child{overflow-wrap:anywhere}
.pos-preview .revenue-table-wrap{margin-bottom:0}
.pos-table select{min-height:32px;width:100%;padding:2px 6px;border:1px solid #d8e1da;border-radius:8px;font:inherit;background:#fff}
.pos-table tr.pos-unmatched td{background:#fff4f2}
.pos-preview .pay-actions{justify-content:flex-end}
/* 商品銷售 */
.ps-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.ps-tabs button{padding-left:2px;padding-right:2px}
@media (max-width:420px){.ps-tabs button{font-size:14px}}
.ps-highlights{margin:4px 0 12px;padding:10px 14px;border-radius:12px;background:#f4f8f5;border:1px solid #dfeae2}.ps-highlights .ledger-h{margin:0 0 4px}.ps-highlights .ledger-h small{font-weight:400;color:#7a857f;margin-left:6px}.ps-highlights ul{margin:0;padding-left:18px;line-height:1.75;font-size:14px}
.ps-summary small{font-size:12px}
.ps-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:4px 0 10px}
.ps-summary>div{display:grid;gap:2px;padding:10px 12px;border-radius:10px;background:#f4f7f5;font-size:13px}
.ps-summary strong{font-size:17px;font-variant-numeric:tabular-nums}
.ps-filter{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#5b6b63;margin:2px 0 8px}
.ps-filter input[type=number]{width:5em;min-height:32px;padding:2px 6px;border:1px solid #d8e1da;border-radius:8px;font:inherit}
.ps-table-wrap{overflow-x:auto;border:1px solid #e0e6e2;border-radius:10px}
.ps-table{width:100%;border-collapse:collapse;font-size:13px;min-width:560px}
.ps-table th,.ps-table td{padding:7px 10px;border-top:1px solid #edf0ee;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.ps-table thead th{border-top:0;background:#f7f9f8;color:#5b6b63;font-weight:600}
.ps-table th[scope=row],.ps-table .l{text-align:left}
.ps-table th[scope=row]{font-weight:400;white-space:normal;min-width:7em}
.ps-table tr.ps-cat th,.ps-table tr.ps-cat td{background:#eef4f0;font-weight:700}
/* 台股習慣：漲紅跌綠 */
.ps-up{color:#b3261e}.ps-down{color:#256b3d}.ps-big{font-weight:700;text-decoration:underline;text-underline-offset:3px}
.ps-table tr.ps-losing th,.ps-table tr.ps-losing td{background:#fff6f4}
.ps-bar{display:inline-flex;width:110px;height:10px;border-radius:5px;overflow:hidden;background:#eef1ef;vertical-align:middle}
.ps-bar i,.ps-legend i{display:block;height:100%}.dine{background:#3f7d5c}.take{background:#a9c7b4}.deliver{background:#e0a458}
.ps-legend{display:flex;gap:12px;align-items:center;font-size:12px;color:#5b6b63;margin:0 0 6px}.ps-legend span{display:inline-flex;align-items:center;gap:4px}.ps-legend i{width:10px;height:10px;border-radius:2px;display:inline-block}
.ps-share{display:inline-block;width:60px;height:8px;margin-right:6px;border-radius:4px;background:#eef1ef;overflow:hidden;vertical-align:middle}.ps-share i{display:block;height:100%;background:#3f7d5c}
.ps-grade{display:inline-block;min-width:1.6em;text-align:center;border-radius:6px;font-weight:700;font-size:12px;padding:1px 4px}
.ps-grade-A .ps-grade{background:#e6f3ea;color:#256b3d}.ps-grade-B .ps-grade{background:#fdf3e1;color:#8a5a12}.ps-grade-C .ps-grade{background:#f1f1f1;color:#6b6b6b}
.ps-empty{padding:18px 4px}
@media(max-width:600px){.ps-summary strong{font-size:15px}.ps-summary>div{padding:8px}}
/* 營業匯總: 對帳 */
.revenue-reconcile{margin-top:16px;border:1px solid #e0e6e2;border-radius:12px;padding:10px 14px;background:#fff}
.revenue-reconcile>summary{cursor:pointer;font-weight:700;font-size:15px;padding:4px 0}
.revenue-reconcile .ledger-h{margin:14px 0 4px}
.revenue-reconcile .ledger-h small{font-weight:400;color:#7a857f;margin-left:6px}
.revenue-reconcile p.muted{margin:0 0 6px;font-size:12px}
.revenue-report .revenue-reconcile table.ps-table{min-width:0;table-layout:fixed}
.revenue-report .revenue-reconcile .ps-table th,.revenue-report .revenue-reconcile .ps-table td{background:transparent;padding:6px 8px;white-space:normal}
.revenue-report .revenue-reconcile .ps-table thead th{background:#f7f9f8}
.revenue-report .revenue-reconcile .ps-table th[scope=row]{width:6.5em}
.ps-table tbody th[scope=row]{background:transparent}
/* a marked row (成本率過高、外送比內用少) is pink across, the dish name included */
.ps-table tbody tr.ps-losing th[scope=row]{background:#fff6f4}
.ps-table tr.ps-cat th{background:#eef4f0}
.ps-table tr.ps-pending th,.ps-table tr.ps-pending td{color:#9aa59f}
/* 營業分析 */
.an-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:4px 0 12px}
.an-kpis>div{display:grid;gap:2px;padding:10px 12px;border-radius:10px;background:#f4f7f5;font-size:13px;min-width:0}
.an-kpis strong{font-size:18px;font-variant-numeric:tabular-nums}
.an-kpis small{font-size:12px}
.an-kpis.an-three{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 6px}
.an-kpis.an-five{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:900px){.an-kpis.an-five{grid-template-columns:repeat(2,minmax(0,1fr))}}
.an-card{border:1px solid #e0e6e2;border-radius:12px;padding:10px 14px;margin:0 0 12px;background:#fff}
.an-card .ledger-h{margin:0 0 6px}.an-card .ledger-h small{font-weight:400;color:#7a857f;margin-left:6px}
.an-tip{display:grid;grid-template-columns:14px minmax(0,1fr);gap:4px 10px;padding:9px 0;border-top:1px solid #edf0ee}
.an-tip:first-of-type{border-top:0}
.an-tip p{margin:0;line-height:1.55}.an-tip p.muted{font-size:12.5px}
.an-dot{width:9px;height:9px;border-radius:50%;margin-top:7px;background:#9aa59f}
.an-warn .an-dot{background:#c2410c}.an-good .an-dot{background:#2f7d4f}.an-info .an-dot{background:#4b7bb5}
.an-metrics{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.an-metrics button{border:1px solid #d8e1da;background:#fff;border-radius:999px;padding:4px 10px;font:inherit;font-size:12.5px;color:#355e52;cursor:pointer;min-height:30px}
.an-metrics button[aria-pressed=true]{background:#3f7d5c;border-color:#3f7d5c;color:#fff}
.an-bars{display:flex;align-items:flex-end;gap:6px;height:150px}
.an-bars>div{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;font-size:11px;color:#5b6b63}
.an-bars em{flex:1;min-height:0;width:100%;display:flex;align-items:flex-end;font-style:normal}
.an-bars i{display:block;width:100%;background:#cfe0d4;border-radius:4px 4px 0 0}
.an-bars .cur i{background:#3f7d5c}.an-bars span{font-variant-numeric:tabular-nums;white-space:nowrap}.an-bars b{font-weight:400;margin-top:3px}
.an-foot{font-size:12px}
@media(max-width:600px){.an-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.an-kpis.an-three{grid-template-columns:1fr}.an-bars span{font-size:10px}}
.an-queue-list{margin:0;padding-left:18px;font-size:13px;line-height:1.7}
.an-queue-pick{margin-top:8px}
.pay-actions>span.ledger-warn{color:#a1251b}
.an-hours{height:110px}
.fs-wide{flex-wrap:wrap}.fs-wide input[name=pos],.fs-wide input[name=bank],.fs-wide input[name=vendors],.fs-wide input[name=items],.fs-wide input[name=skip],.fs-wide input[name=share]{flex:1 1 220px}
.fs-check{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:#5b6b63;white-space:nowrap}
.fs-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.fs-tabs button{padding-left:2px;padding-right:2px}
.cash-card{margin-bottom:12px}.cash-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.cash-card-head h2{margin:0;font-size:18px}
.cash-card .cash-quick{border:0;padding:0;margin:10px 0 0}
.cash-card-foot{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid #edf0ee;margin-top:8px;padding-top:8px}
.cash-card-recent{list-style:none;margin:6px 0 0;padding:0;font-size:14px}.cash-card-recent li{display:flex;justify-content:space-between;gap:8px;padding:3px 0;color:#4d5a53}
.cash-links ul{list-style:none;margin:6px 0 0;padding:0}.cash-links li{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:6px 0;border-top:1px solid #edf0ee}.cash-links li span{min-width:9em;font-variant-numeric:tabular-nums}.cash-links select{min-height:38px;border:1px solid #d8e1da;border-radius:8px;padding:4px 8px;font:inherit;background:#fff;max-width:100%}
.todo-list{list-style:none;margin:0;padding:0}.todo-list li{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:8px 0;border-top:1px solid #edf0ee;font-size:14px}.todo-list li:first-child{border-top:0}.todo-list li span{flex:1;min-width:0}.todo-list li .btn{flex:none;white-space:nowrap}
.todo-warn span::before{content:'●';color:#c0573e;margin-right:6px}.todo-info span::before{content:'●';color:#b9a24a;margin-right:6px}
.todo-ok{margin:0;color:#3d6b58;font-weight:600}
.imp-drop{display:flex;flex-direction:column;gap:4px;align-items:center;text-align:center;border:2px dashed #b8cbbf;border-radius:12px;padding:22px 14px;background:#f7faf8;cursor:pointer}.imp-drop.over{background:#e8f1ec;border-color:#3d6b58}.imp-drop strong{font-size:16px;color:#263f35}.imp-drop span{font-size:13px}
.imp-log{list-style:none;margin:10px 0 0;padding:0;font-size:14px}.imp-log li{padding:4px 0}.imp-ok::before{content:'✓ ';color:#3d6b58;font-weight:700}.imp-warn::before{content:'! ';color:#b07a1e;font-weight:700}.imp-error::before{content:'✕ ';color:#c0573e;font-weight:700}
.imp-table td{text-align:center}.imp-table .imp-ok::before{content:''}.imp-ok{color:#3d6b58;font-weight:700}.imp-miss{color:#c0573e;font-weight:700}
.monthly-import section{margin-top:14px}
.pl-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px}.pl-year{display:flex;gap:8px;align-items:center}
.pl-head{display:flex;flex-direction:column;gap:6px;margin:12px 0}.pl-head>div{display:flex;flex-direction:column}.pl-head strong{font-size:30px;color:#263f35;font-variant-numeric:tabular-nums}.pl-head strong.pl-loss{color:#c0573e}
.pl-note{margin:0;padding:6px 10px;border-radius:8px;background:#fbf5e6;color:#7a5a12;font-size:13px}
.pl-lines{list-style:none;margin:0 0 14px;padding:0}.pl-lines li{display:grid;grid-template-columns:minmax(0,1fr) auto 4.2em 6em;gap:4px 10px;align-items:baseline;padding:7px 0;border-top:1px solid #edf0ee;font-size:15px}
.pl-lines li span small{display:block;font-size:12px}.pl-lines li strong{font-variant-numeric:tabular-nums;text-align:right}.pl-lines li>small{text-align:right;font-variant-numeric:tabular-nums}
.pl-lines .pl-total{border-top:2px solid #3d6b58;font-weight:700}.pl-up{color:#3d6b58}.pl-down{color:#c0573e}
.pl-table tr[data-pl-month]{cursor:pointer}.pl-table tr.pl-selected{background:#eef5f1}.pl-table .pl-sum th,.pl-table .pl-sum td{border-top:2px solid #d8e1da;font-weight:600}
@media(max-width:600px){.pl-lines li{grid-template-columns:minmax(0,1fr) auto;font-size:14px;gap:0 10px}.pl-lines li>span{grid-row:span 3}.pl-lines li>small{grid-column:2}}
.fs-inline{display:inline-flex;align-items:center;gap:4px;font-size:14px;color:#4d5a53}.fs-inline input[name=months]{width:3.5em}
.an-sub{margin:14px 0 6px;font-size:14px;color:#263f35}
.an-days{gap:2px}.an-days>div b,.an-days>div span{font-size:10px}.an-days>div em i,.an-dow>div em i{background:#9cbfae}.an-days>div.hol em i,.an-dow>div.hol em i{background:#2f5a48}
.an-dow>div b{font-size:12px}
@media(max-width:700px){.an-days>div span{display:none}.an-days>div:nth-child(even) b{visibility:hidden}}
body[data-admin-role="normal"] .finance-nav-group{display:none!important}
/* 總覽: the 營業分析 look — figures as tiles */
.overview-facts.card{padding:12px 14px;margin:0 0 12px}.overview-facts .an-kpis{margin:0}
.todo-more{margin-top:10px;width:100%}
@media(max-width:700px){.overview-facts .an-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 智能排班: 本月概況 tiles; the deadline and version lines live in the tiles now */
.schedule-kpis{margin:12px 0 4px}.schedule-kpis .kpi-warning{background:#fff7e6}.schedule-kpis .kpi-overdue{background:#fdecec}.schedule-kpis .kpi-overdue strong{color:#b42318}
#page-schedule #publishState,#page-schedule #deadlineState{display:none}
@media(max-width:700px){.schedule-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 打卡紀錄: 本月彙整 as tiles; the page description behind ⓘ 說明 */
.attendance-console .attendance-report-totals.an-kpis{display:grid;flex:1 1 100%;margin:0;gap:8px;font-size:13px}
.attendance-report-totals.an-kpis .kpi-warn strong{color:#a13e32}
.attendance-report-bar:has(.an-kpis){align-items:stretch}
.page-note{font-size:13px;margin-top:2px}.page-note>summary{cursor:pointer;color:var(--muted);list-style:none;width:max-content}.page-note>summary::-webkit-details-marker{display:none}.page-note>div{margin-top:4px;max-width:70ch}
@media(max-width:700px){.attendance-console .attendance-report-totals.an-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 商品銷售: items left out of the rankings */
.ps-exclude{margin:8px 0 12px;font-size:14px}.ps-exclude>summary{cursor:pointer;color:var(--muted);width:max-content}
.ps-exclude-list{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.ps-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 4px 3px 10px;border-radius:999px;background:#eef3ef;font-size:13px}
.ps-chip button{border:0;background:transparent;cursor:pointer;color:#7a6a5f;min-width:28px;min-height:28px;border-radius:50%}.ps-chip button:hover{background:#dfe8e1}
.ps-exclude-add{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.ps-exclude-add select{min-height:36px;max-width:100%}
.ps-price-edit{white-space:nowrap}.ps-price-edit input{width:5.5em;min-height:34px}.ps-price-edit .btn{min-height:34px;padding:4px 8px;margin-left:4px}.ps-price{border:0;background:none;padding:2px 0;font:inherit;color:inherit;cursor:pointer;text-decoration:underline dotted #9bb5aa;text-underline-offset:3px}.ps-price-set{color:#1f6f5c;font-weight:600}
/* 商品銷售 每月消長: by category or all items, and the order */
.ps-order{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:4px 0 8px}
.ps-seg{display:inline-flex;border:1px solid #d8e1da;border-radius:10px;overflow:hidden}.ps-seg button{border:0;background:#fff;padding:6px 12px;min-height:34px;font:inherit;font-size:13px;color:#4a5a52;cursor:pointer}.ps-seg button+button{border-left:1px solid #d8e1da}.ps-seg button[aria-pressed=true]{background:#2f5a43;color:#fff}
.ps-order .ps-filter{margin:0}.ps-order select{min-height:34px;border:1px solid #d8e1da;border-radius:8px;padding:2px 6px;font:inherit;font-size:13px}
.ps-note{font-size:12px;margin:6px 2px 0}
/* 每月消長: ▲▼ and percentages, rank and ↑↓ each in a fixed slot so the columns line up */
.ps-table td.ps-chg{white-space:nowrap;text-align:center}.ps-table thead th.ps-chg-head{text-align:center}.ps-table td.ps-chg .ps-big{font-weight:inherit;text-decoration:none}.ps-tri{display:inline-block;width:1.2em;text-align:center}.ps-pct{display:inline-block;min-width:4.4em;text-align:right}
.ps-table td.ps-rank{padding-right:0;min-width:2.2em}.ps-table td.ps-move{padding-left:10px;width:3.4em;min-width:3.4em;text-align:left}
.ps-move span{display:inline-block;min-width:2.4em;padding:1px 6px;border-radius:999px;font-size:11px;line-height:1.6;text-align:center}.ps-move .ps-up{background:#fbeceb}.ps-move .ps-down{background:#e8f2ec}
.ps-table th.ps-rank-head{text-align:center}
/* 薪資申報 */
.filing-page .section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.filing-half{display:flex;align-items:center;gap:8px;font-size:14px}.filing-half select{min-height:40px;padding:4px 8px;border:1px solid #d8e1da;border-radius:8px;font:inherit}
.filing-sources{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px;margin:0 0 14px}.filing-source{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;border:1px solid #dce3df;border-radius:8px;background:#fff}.filing-source strong{min-width:3em}.filing-source>span:nth-child(2){flex:1;font-size:13px}.filing-source-actions{display:flex;gap:6px}.filing-source-actions .btn{min-height:34px;padding:4px 10px;font-size:13px;cursor:pointer}
.filing-list-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.filing-status{min-height:1.2em;font-size:13px;color:#355e52}
.filing-list td,.filing-list th{white-space:nowrap}.filing-list td small,.filing-trial small{display:block;font-size:11px;color:#62776b}.filing-list td.filing-warn{background:#fdf6e8}.filing-trial input{width:6.2em;min-height:34px;padding:3px 6px;border:1px solid #d8e1da;border-radius:6px;font:inherit;font-variant-numeric:tabular-nums;text-align:right}.filing-trial input:disabled{background:#f3f5f4;color:#a3aca6}.filing-trial td,.filing-trial th{white-space:nowrap;font-variant-numeric:tabular-nums}.filing-trial .filing-diff{color:#b42318;font-weight:600}
.filing-editor{padding:8px 4px}.filing-editor-row>td{background:#f8faf9}.filing-hint{font-size:12px;margin:6px 0}.filing-person{border:1px solid #dce3df;border-radius:8px;padding:12px 14px;margin:8px 0;background:#fff}
/* 薪資申報: wide tables scroll sideways inside their own box (.main clips overflow); 姓名 and 月份 stay pinned on the left; the open 明細 stays the visible width
   (sticky, 100cqw of the list box) so its 20 columns scroll on their own instead of stretching the month columns. */
.pay-workspace.filing-page{max-width:none}.filing-page .pay-table-wrap{overflow-x:auto;max-width:100%}.filing-list-wrap{container-type:inline-size}.filing-list>tbody>.filing-editor-row>td{padding:0}.filing-editor{position:sticky;left:0;width:100cqw}
.filing-list>thead>tr>th:nth-child(1),.filing-list>tbody>tr:not(.filing-editor-row):not(.filing-group)>td:nth-child(1),.filing-trial>thead>tr>th:first-child,.filing-trial>tbody>tr>td:first-child{position:sticky;left:0;z-index:1}.filing-list>tbody>tr:not(.filing-editor-row):not(.filing-group)>td:nth-child(1){background:var(--bg)}.filing-trial>tbody>tr>td:first-child{background:#f8faf9}
.filing-list>tbody>tr.filing-group>td:nth-child(n){background:#e9f0eb;padding-top:7px;padding-bottom:7px}.filing-list .filing-group strong{font-size:13px;color:#245c46}.filing-list .filing-group small{display:inline;margin-left:8px;color:#62776b;font-size:12px}
/* 薪資申報: amounts right-aligned (owner, 2026-11-16) */
/* 薪資申報 明細: text wraps (the year table is nowrap); 申報表資料 is labelled columns lined up (owner, 2026-11-16) */
.filing-editor{white-space:normal}.filing-editor>.pay-muted{margin:8px 4px}
.filing-person h4{margin:0 0 10px;font-size:15px}.filing-person h5{margin:16px 0 4px;font-size:13px;color:#365448}.filing-person>.pay-muted{margin:8px 0 0}.filing-person .pay-actions{margin-top:14px;display:flex;gap:8px;flex-wrap:wrap}
.filing-person-head{display:flex;flex-wrap:wrap;gap:12px 28px;align-items:flex-end}.filing-field{display:grid;gap:4px;font-size:12px;color:#62776b}.filing-field strong{min-height:34px;display:flex;align-items:center;font-size:14px;color:#20362c;font-variant-numeric:tabular-nums}
.filing-married{display:flex;gap:18px;align-items:center;min-height:34px;font-size:14px;color:#20362c}.filing-married label{display:inline-flex;gap:6px;align-items:center;cursor:pointer}
.filing-form-scroll{overflow-x:auto;max-width:100%}.filing-form-table{width:auto;border-collapse:collapse;font-size:13px}
.filing-list .filing-form-table th,.filing-list .filing-form-table td{background:none;border:0;padding:2px 8px 2px 0;font-size:12px;font-weight:500;color:#62776b;text-align:left;white-space:nowrap}.filing-list .filing-form-table th.num{text-align:right;padding-right:16px}
.filing-person input:not([type=radio]){min-height:34px;padding:3px 8px;border:1px solid #d8e1da;border-radius:6px;font:inherit;font-size:14px;background:#fff;color:#20362c}
.filing-person .w-name{width:8.5em}.filing-person .w-short{width:5em}.filing-person .w-date{width:8.5em}.filing-person .w-id{width:8.5em}.filing-person .w-address{width:22em}.filing-person .w-month{width:7.5em}.filing-person .w-money{width:7.5em;text-align:right;font-variant-numeric:tabular-nums}
.filing-list td.num,.filing-trial td.num,.filing-list>thead>tr>th:nth-child(n+3),.filing-trial>thead>tr>th:nth-child(n+2):not(:last-child){text-align:right}
.filing-pending-link{border:0;padding:0;background:none;font:inherit;color:#245c46;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.filing-pending-names{color:#4d6358}
#filingPrint{display:none}
@media print{
 @page{size:A4 portrait;margin:12mm 12mm}
 body.printing-filing>*:not(#filingPrint){display:none!important}
 body.printing-filing #filingPrint{display:block}
 body.printing-filing{margin:0!important;padding:0!important;background:#fff!important}
 /* the forms print on their own page type: no margin, so the page is the drawn A4 sheet and the browser has no room for its
    header and footer (owner, 2026-11-18). A named page, because the CSP blocks a <style> added at print time. */
 #filingPrint{page:filing}
 @page filing{size:A4 portrait;margin:0}
 #filingPrint img{display:block;width:210mm;height:297mm;page-break-after:always;break-after:page}
 #filingPrint img:last-child{page-break-after:auto;break-after:auto}
 .filing-sheet{page-break-after:always;break-after:page;font-family:"Noto Serif TC","PMingLiU","MingLiU",serif;color:#000;font-size:11pt}
 .filing-sheet:last-child{page-break-after:auto;break-after:auto}
 .filing-sheet h1{font-size:16pt;text-align:center;margin:0 0 8pt;letter-spacing:.1em}.filing-company{text-align:center;font-size:13pt;margin:0 0 4pt;letter-spacing:.2em}
 .filing-sheet table{width:100%;border-collapse:collapse;margin:0 0 6pt}.filing-sheet th,.filing-sheet td{border:1px solid #000;padding:3pt 5pt;font-weight:400;text-align:left;vertical-align:middle}
 .filing-head th{width:22%;white-space:nowrap}.filing-id{letter-spacing:.35em;font-family:monospace;font-size:12pt}
 .filing-deps td{height:16pt}.filing-months th,.filing-months td{text-align:center}.filing-months td.num{text-align:right;font-variant-numeric:tabular-nums}.filing-months td{height:17pt}.filing-total td{font-weight:700}
 .filing-line{display:flex;gap:24pt;margin:6pt 0}
}
.filing-settings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:12px 0}.filing-settings-grid .field small{color:#6b7a72;font-size:12px}.filing-trial .filing-notes td{background:#fdf6e8;color:#8a5208;font-size:12px;white-space:normal}
.filing-tag{display:block;font-size:11px;color:#62776b}.filing-tag.warn{color:#a5640b}.filing-notes p{margin:4px 0;font-size:13px;color:#4d6358}
.filing-row-notes td{background:#fdf6e8;color:#8a5208;font-size:12px;white-space:normal}
.filing-supplement{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px;padding:8px 12px;border-radius:8px;background:#fdf6e8;color:#8a5208;font-size:13px}.filing-saved{margin:0 0 8px;font-size:13px;font-weight:600;color:#2f6b4f}.pay-actions>span.filing-saved{align-self:center;margin:0 auto 0 0;font-size:13px;color:#2f6b4f}.filing-saved.error,.pay-actions>span.filing-saved.error{color:#b42318}
/* the filed name (吳庭佾) in red with the payroll sheet's dotted underline (.pay-amount-button); hovering shows the employee (員工：吳芎穎) in a floating box (owner, 2026-11-18) */.filing-proxy{position:relative;color:#b42318;font-weight:400;border-bottom:1px dotted #729485;cursor:help}.filing-proxy:hover::after,.filing-proxy:focus::after{content:attr(data-employee);position:absolute;left:calc(100% + 8px);top:50%;transform:translateY(-50%);z-index:5;padding:4px 10px;border:1px solid #c9d3cc;border-radius:6px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.12);color:#1f2a24;font-size:13px;white-space:nowrap}.filing-kind-note{font-size:11px}/* (保) green after the kind, 11px so it stays readable on Windows screens; amber stays for 需確認／補報？ (owner, 2026-11-18) */.filing-kind-note.insured{color:#2f6f5f}/* 確認 on a 需確認 month, and the 明細 footer to go back up or close (owner, 2026-11-19) */.filing-row-notes .filing-confirm{margin-left:12px;padding:2px 12px;font-size:12px}/* 設為定額 opens the 定額 table only when needed (owner, 2026-11-18) */.filing-fixed-open{display:flex;align-items:center;gap:10px;margin:14px 0 6px;font-size:13px}/* 標記已申報 month list (owner, 2026-11-18) */.filing-lock-months{display:flex;flex-wrap:wrap;gap:10px 18px;margin:10px 0 12px;font-size:14px}.filing-lock-months label{display:inline-flex;flex-direction:row;align-items:center;gap:6px;width:auto;cursor:pointer}.filing-lock-months label input{display:inline-block;width:auto;margin:0}.filing-lock-done{display:inline-flex;align-items:center;gap:8px;color:#2f6f5f}.filing-lock-done .btn{padding:2px 10px;font-size:12px}/* 完整算式 under 申報設定, and the year's automatic 加給 in 明細 (owner, 2026-11-18) */.filing-formula{margin:16px 0;padding:12px 16px;border:1px solid #dce4df;border-radius:10px;background:#f7faf8}.filing-formula h4{margin:0 0 6px;font-size:15px}.filing-formula h5{margin:10px 0 4px;font-size:13px;color:#2f6f5f}.filing-formula ol{margin:0;padding-left:20px;font-size:13px;line-height:1.7;color:#33413a}.filing-allowance{margin:4px 0 8px;font-size:13px;color:#2f6f5f}.filing-import-warn{margin:8px 0;padding:8px 12px;border-radius:8px;background:#fdecea;color:#b42318;font-size:13px;font-weight:600}.filing-unmatched td{background:#fdecea}.filing-unmatched select{border-color:#b42318}.filing-unmatched small{color:#b42318}

/* 保險設置: one row per 級距, 編輯 opens the row */
.insurance-tier-wrap{overflow-x:auto;margin:8px 0 12px;border:1px solid #dce3de;border-radius:12px;background:#fff}
.ins-bracket-table{width:100%;min-width:560px;border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:14px}
.ins-bracket-table th,.ins-bracket-table td{padding:9px 12px;border-bottom:1px solid #eef1ec;text-align:right;white-space:nowrap}
.ins-bracket-table thead th{background:#f4f8f5;color:#5b6b61;font-size:12px;font-weight:600}
.ins-bracket-table tbody th{text-align:left;font-weight:600;color:#30463a;background:#fff;white-space:normal;min-width:8em}.ins-bracket-table thead th:first-child{text-align:left}
.ins-bracket-table tbody tr:last-child>*{border-bottom:0}.ins-bracket-table .insurance-row-actions{text-align:right;width:1%}
.ins-bracket-table .insurance-row-actions .btn{min-height:30px;padding:3px 12px;font-size:13px}
.ins-bracket-table .insurance-edit-row>td{padding:12px;text-align:left;white-space:normal;background:#fbfcfa}
.ins-bracket-table .insurance-edit-row .insurance-tier-card{margin:0}
.ins-switch-tools{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:12px 0}
.ins-switch-tools label{display:grid;gap:4px;font-size:13px;color:#5b6b61}
.ins-switch-tools select,.ins-switch-tools input{box-sizing:border-box;height:40px;min-height:40px;padding:0 10px;border:1px solid #ccd8d0;border-radius:8px;background:#fff;font:inherit;font-size:15px;color:#27372e}
.ins-switch-tools input{width:7.5em}.ins-switch-tools select{min-width:6.5em}
.ins-switch-tools .btn{height:40px;min-height:40px;padding:0 16px}
.ins-card-title{margin-top:0}.ins-scroll{overflow-x:auto}
.pay-history-paid{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px;padding:12px 16px;border:1px solid #e5d79d;border-radius:12px;background:#fffbe8}.pay-history-paid p{margin:0;font-size:14px;color:#6b5a12}
.pay-month-paid{display:flex;justify-content:flex-end;margin:0 0 12px}

/* Tap-to-pick reasons (reason-chips.ts) */
.reason-chips{border:0;margin:10px 0;padding:0;min-width:0}.reason-chips legend{padding:0;margin:0 0 6px;font-size:13px;font-weight:700;color:#3f4a44}
.reason-chip-list{display:flex;flex-wrap:wrap;gap:6px}.reason-chip{position:relative;display:inline-flex;cursor:pointer;margin:0}
.reason-chip input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.reason-chip span{display:inline-block;padding:6px 12px;border:1px solid #cfd8d1;border-radius:999px;background:#fff;font-size:13px;line-height:1.4;color:#2f3a34;white-space:nowrap}
.reason-chip:hover span{border-color:#8fae9b}.reason-chip input:checked+span{background:#e3f0e7;border-color:#396b59;color:#24513f;font-weight:700}
.reason-chip input:focus-visible+span{outline:2px solid #396b59;outline-offset:2px}.reason-chip input:disabled+span{opacity:.55;cursor:default}
.reason-chip-other{display:block;width:100%;margin-top:8px;padding:8px 10px;border:1px solid #cfd8d1;border-radius:8px;font:inherit}.reason-chip-other[hidden]{display:none}
.reason-chips-missing .reason-chip span{border-color:#d29a9a}
.btn.insurance-record-remove{min-height:0;padding:2px 10px;font-size:.85em;margin-left:6px}
.shift-warning{padding:12px;background:#fff4df;color:#684600;border:1px solid #f0d9a8;border-radius:8px;margin:12px 0}
.workspace-more.align-left[open]>.workspace-more-content{left:0;right:auto}
/* 更多 menu: the three secondary tools share the row evenly and stay inside the panel. */
.workspace-more[open]>.workspace-more-content{min-width:300px}
#page-schedule .workspace-more-content .workspace-secondary-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
#page-schedule .workspace-more-content .workspace-secondary-tools>details>summary{justify-content:center;padding:9px 2px}
/* 報表匯入 progress: every column centred under its heading, five equal columns that fit a phone without cutting off 商品銷售. */
.ps-table.imp-table{min-width:0;width:100%;table-layout:fixed}
.ps-table.imp-table th,.ps-table.imp-table td,.ps-table.imp-table .l,.ps-table.imp-table th[scope=row]{text-align:center;padding:7px 4px}
.ps-table.imp-table th[scope=row]{min-width:0}

/* 薪資申報 (owner, 2026-11-19: 照示範改): one-line rows, ✓ in the month header, dots before the number, name opens 明細 */
.filing-years{display:inline-flex;border:1px solid #d8e1da;border-radius:9px;overflow:hidden;margin-left:12px;vertical-align:middle}.filing-years button{border:0;background:#fff;padding:6px 12px;font:inherit;font-size:14px;color:#4d6358;cursor:pointer;min-height:36px}.filing-years button[aria-pressed="true"]{background:#356b58;color:#fff}.filing-years button:disabled{cursor:default}
.filing-page .section-head h2{display:inline;margin:0}
.filing-chips{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 10px}.filing-chip{border:1px solid #dce3df;background:#f6f8f7;border-radius:999px;padding:3px 11px;font:inherit;font-size:13px;color:#4d6358;cursor:pointer}.filing-chip.static{cursor:default}.filing-chip.warn{background:#fdf3e1;border-color:#f0d9a8;color:#8a5208}.filing-chip[aria-expanded="true"]{border-color:#7fa392}
.filing-chip-names{margin:-4px 0 10px;font-size:13px;color:#4d6358}
.filing-list th.filing-done,.filing-trial .filing-done{color:#2f7a52}
.filing-list td.filing-filed,.filing-trial td.filing-filed{color:#8a968f}
.filing-list>tbody>tr:not(.filing-group):not(.filing-editor-row)>td{padding-top:7px;padding-bottom:7px}
.filing-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px;vertical-align:1px}.filing-dot.sup{background:#e3a008}.filing-dot.warn{background:#d64545}
.filing-legend{display:flex;align-items:center;gap:4px 6px;font-size:12px;color:#7b8781;margin:8px 0 0}.filing-legend .filing-dot+.filing-dot,.filing-legend .filing-dot:not(:first-child){margin-left:12px}
.filing-quiet{font-size:12px;color:#a3aca6}
.filing-name{border:0;background:none;padding:0;font:inherit;font-weight:600;color:#245f8f;cursor:pointer;text-align:left}.filing-name:hover{text-decoration:underline}.filing-name[aria-expanded="true"]{color:#1d4d73}
.filing-list>tbody>tr.filing-open>td{background:#f2f7fb}
.filing-editor{border-left:3px solid #356b58;padding:12px 14px}
.filing-editor-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 10px}.filing-editor-head strong{font-size:16px}.filing-editor-kind{font-size:13px;color:#62776b}
.filing-tabs{display:inline-flex;border:1px solid #d8e1da;border-radius:9px;overflow:hidden}.filing-tabs button{border:0;background:#fff;padding:6px 14px;font:inherit;font-size:13px;color:#4d6358;cursor:pointer}.filing-tabs button[aria-pressed="true"]{background:#356b58;color:#fff}
.filing-trial input{width:5.6em}.filing-trial tr.filing-mod>td:first-child{box-shadow:inset 3px 0 0 #2f6fe4}
.filing-ce{border:0;border-bottom:1px dashed #b9c4be;background:none;padding:0 1px;font:inherit;font-variant-numeric:tabular-nums;color:inherit;cursor:text}
.filing-trial .filing-undo{min-height:30px;padding:2px 10px;font-size:12px}
.filing-editor-foot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-top:10px}.filing-editor-foot>div{display:flex;flex-wrap:wrap;gap:6px}.filing-editor-foot>span{display:inline-flex;align-items:center;gap:10px}
.filing-link{border:0;background:none;padding:0;font:inherit;font-size:13px;color:#245f8f;cursor:pointer}.filing-link:hover{text-decoration:underline}
.filing-editor .filing-person{border:0;padding:0;margin:0;background:none}
.filing-pick-all{display:inline-flex;gap:6px;align-items:center;font-size:14px;margin-bottom:6px}.filing-pick-group{margin:8px 0}.filing-pick-head{display:inline-flex;gap:6px;align-items:center;font-size:13px;color:#62776b}.filing-pick-names{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px}.filing-pick-names label{display:inline-flex;gap:5px;align-items:center;font-size:14px}
/* 明細 spans the full width like the list above, so the 每月金額／申報資料 tabs sit over its right edge (owner, 2026-11-19); input cells are right-aligned (td.num) to stay under their headers */.filing-editor .filing-trial{width:100%}
.filing-pick label{display:inline-flex;flex-direction:row;align-items:center;gap:6px;width:auto;text-align:left}.filing-pick input[type=checkbox]{width:auto;min-height:0;margin:0;display:inline-block}.filing-pick .filing-pick-group{display:block}.filing-pick .pay-actions{justify-content:flex-end}
/* the name is a button (2026-11-19), so keyboard focus on it shows 「員工：本名」 too */
.filing-name:focus-visible .filing-proxy::after{content:attr(data-employee);position:absolute;left:calc(100% + 8px);top:50%;transform:translateY(-50%);z-index:5;padding:4px 10px;border:1px solid #c9d3cc;border-radius:6px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.12);color:#1f2a24;font-size:13px;white-space:nowrap}
/* 薪資申報 (owner, 2026-11-19): a dot shows its status when pointed at; 合計 opens 明細 like the name */
.filing-dot{position:relative;cursor:help}.filing-dot:hover::after,.filing-dot:focus-visible::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);z-index:6;padding:4px 10px;border:1px solid #c9d3cc;border-radius:6px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.12);color:#1f2a24;font-size:12px;font-weight:400;white-space:nowrap}
.filing-total{border:0;background:none;padding:0;font:inherit;font-weight:700;font-variant-numeric:tabular-nums;color:#20362c;cursor:pointer}.filing-total:hover{color:#245f8f;text-decoration:underline}
/* 智能排班 簡化 (owner, 2026-11-20): one type scale — 標題 16、內文 14、小字 12; weights 400 and 700 only.
   The grid (#scheduleMatrix) and 每日人力 keep their own sizes: the owner is used to them. */
#page-schedule :is(p,span,div,button,summary,label,li,a,input,select,small,strong,b,h3,h4,em,i,td,th,legend):not(#scheduleMatrix *):not(#dailyStaffing *){font-size:14px;font-weight:400;letter-spacing:normal}
#page-schedule :is(strong,b,th,h4,.schedule-month-tabs [aria-selected=true]):not(#scheduleMatrix *):not(#dailyStaffing *){font-weight:700}
#page-schedule :is(h3,.schedule-history>summary,#absencePanel>summary,#monthlyStatistics>summary,#shiftSignupAdmin summary,#staffingDetails>summary,#pairingWarnings summary):not(#scheduleMatrix *):not(#dailyStaffing *){font-size:16px;font-weight:700}
#page-schedule :is(.muted,small,.pay-muted,.statistics-help,.attention-heading span,.workspace-group-title,.schedule-help,.schedule-history-hint,#scheduleStepHelp,#deadlineState):not(#scheduleMatrix *):not(#dailyStaffing *){font-size:12px;font-weight:400}
/* 月份 row: tabs and ＋新增月份; one line of 本月概況 under it (was a title, a 1-2-3 bar and four tiles). */
#page-schedule .schedule-month-row{display:flex;align-items:center;gap:12px}
#page-schedule .schedule-month-row>.schedule-month-tabs{flex:1 1 auto;min-width:0;margin:0}
#page-schedule .schedule-month-row>#btnNewMonth{flex:0 0 auto}
#page-schedule .schedule-kpi-line{margin:10px 2px 0;color:#4a5a52}
#page-schedule .schedule-kpi-line[hidden]{display:none}
#page-schedule .schedule-kpi-line .kpi-overdue{color:#b42318;font-weight:700}
#page-schedule .schedule-kpi-line .kpi-warning{color:#b45309;font-weight:700}
#page-schedule .schedule-step-actions>#scheduleMonthOps{display:none}
.workspace-more-content .workspace-month-tools{display:grid;gap:6px;border-top:1px solid #e1e7e2;margin-top:4px;padding-top:8px}
.workspace-more-content .workspace-month-tools #btnRemoveMonth{color:#9d4845}
.workspace-group-title{color:#62776b}
/* 待處理: one row of chips; a chip opens its section underneath, one at a time. */
#page-schedule .schedule-review-card{padding:12px 16px}
#page-schedule .schedule-todo{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#page-schedule .schedule-todo h3{margin:0 4px 0 0}
#page-schedule .schedule-todo-chips{display:flex;flex-wrap:wrap;gap:8px}
#page-schedule .schedule-todo-chip{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:6px 14px;border:1px solid #d8e1da;border-radius:999px;background:#fff;color:#20362c;cursor:pointer}
#page-schedule .schedule-todo-chip span{color:#4a5a52}
#page-schedule .schedule-todo-chip.warn{background:#fdf3e1;border-color:#efd59f}
#page-schedule .schedule-todo-chip.warn span{color:#8a5a00}
#page-schedule .schedule-todo-chip:hover{border-color:#427a5c}
#page-schedule .schedule-todo-chip[aria-pressed=true]{border-color:#427a5c;box-shadow:inset 0 0 0 1px #427a5c}
#page-schedule .schedule-todo-chip:focus-visible{outline:2px solid #4f8f7b;outline-offset:2px}
#page-schedule .schedule-todo-details>[data-todo-section]:not(.todo-open){display:none}
#page-schedule .schedule-todo-details>.todo-open{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
#page-schedule .schedule-review-card #gapPanel :is(.attention-heading,.attention-actions){display:none}
/* 班表工作區: title, then 專注排班・復原・更多 on the same row. */
#page-schedule .schedule-board-heading{flex-wrap:wrap;gap:8px}
#page-schedule .schedule-board-heading>div:first-child{flex:1 1 auto}
#page-schedule .schedule-board-heading h3{margin:0}
#page-schedule .schedule-board-heading>#scheduleConvenience{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin:0;padding:0;border:0}
#page-schedule .schedule-board-heading>#scheduleConvenience .schedule-primary-tools{flex:0 0 auto;margin:0}
#page-schedule .schedule-state-summary[hidden]{display:none}
/* 臨時請假與代班: 待補班 on top, settled records folded (owner, 2026-11-20). */
.absence-done{margin-top:6px}.absence-done>summary{cursor:pointer;color:#486757;padding:8px 0}
.absence-records .history-link{margin:4px 0}
/* 已滿提醒 in the day editor (2026-11-20) */
.day-editor-full{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:10px 0 0;padding:8px 10px;border-left:3px solid #b65343;background:#fff5f1;color:#923c31;font-size:13px;line-height:1.6}.day-editor-full[hidden]{display:none}.cell-menu .day-editor-full button{width:auto;padding:4px 10px;border:1px solid #e2b9b0;border-radius:7px;background:#fff;color:#923c31;font-size:12px;font-weight:700;cursor:pointer}.cell-menu .day-editor-full button:hover{background:#fbe9e4}
/* 臨時請假與代班: the 發布 button sits apart from the last record, on the right (owner, 2026-11-20). */
.absence-panel>[data-next]{display:block;margin:16px 0 0 auto}

/* 出勤分數 (打卡紀錄 page and 出勤設置 → 出勤分數) */
.attendance-scores{padding:16px;border-bottom:1px solid #dce2dd}
.attendance-scores .score-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.attendance-scores .score-head h3{margin:0}
.attendance-scores .table-wrap{max-height:420px;margin:12px 0;overflow:auto}
.score-table{width:100%;border-collapse:collapse}
.score-table th,.score-table td{padding:8px 10px;border-bottom:1px solid #e1e6e2;text-align:center;white-space:nowrap;vertical-align:top}
.score-table thead th{position:sticky;top:0;background:#edf3ee;z-index:1}
.score-table tbody th{text-align:left}
.score-table small{display:block;color:#6b7a72;font-size:12px;font-weight:400}
.score-plus{color:#2f6f5f}
.score-minus{color:#a13e32}
.score-estimate{display:inline-block;margin-left:4px;padding:0 5px;border:1px solid #c9a227;border-radius:4px;color:#7a5d00;background:#fff8dc;font-size:12px;line-height:18px;vertical-align:1px}
.score-settings h4{margin:18px 0 4px}
.score-tiers{border-collapse:collapse;margin:8px 0}
.score-tiers th,.score-tiers td{padding:6px 10px;border-bottom:1px solid #e1e6e2;text-align:center}
.score-tiers input{width:72px;text-align:center}
.score-settings .check{display:flex;gap:8px;align-items:center;margin:12px 0}
.rating-updated{display:block;color:#6b7a72;font-size:12px;font-weight:400}

/* 每月評核 (員工管理) and the shared question form */
.review-admin summary{display:flex;align-items:baseline;gap:12px;cursor:pointer;padding:16px}
.review-admin summary h2{margin:0;font-size:18px}
.review-admin #performanceReviews{padding:0 16px 16px}
.review-admin-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.review-table td .btn.small{margin-left:6px}
.review-table small.review-quote{white-space:normal;max-width:180px}
.review-tag{display:inline-block;margin-top:2px;color:#2f6f5f}
.review-company{margin-top:16px}
.review-company ul{margin:6px 0;padding-left:20px;line-height:1.7}
.review-clear{margin-top:20px;padding-top:12px;border-top:1px solid #e5e9e7}.review-clear h4{margin:0 0 4px}.review-clear .btn.danger{background:#fdecea;color:#a1251b;border-color:#f3c5c0}
.review-dialog{max-width:560px}
.review-form .review-question{border:0;border-top:1px solid #e8ede9;margin:10px 0 0;padding:10px 0 0}
.review-form .review-question legend small{display:block;color:#6b7a72;font-size:13px}
.review-levels{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.review-level{flex:1 1 30%;min-width:88px}
.review-level input{position:absolute;opacity:0;pointer-events:none}
.review-level span{display:block;border:1px solid #cfd9d2;border-radius:10px;padding:8px 6px;text-align:center;font-weight:600;cursor:pointer}
.review-level span small{display:block;font-weight:400;font-size:11px;color:#6b7a72;margin-top:2px}
.review-level input:checked+span{background:#2f6f5f;border-color:#2f6f5f;color:#fff}
.review-level input:checked+span small{color:#e6f1ec}
.review-level input:focus-visible+span{outline:2px solid #2f6f5f;outline-offset:2px}
.review-note{display:block;margin-top:12px}
.review-note span{display:block;font-weight:600;margin-bottom:4px}
.review-note textarea{width:100%;box-sizing:border-box}
.review-question-row{display:grid;grid-template-columns:140px 1fr 88px 96px auto;gap:8px;margin:6px 0}.review-question-row select{border:1px solid #d1d5db;border-radius:8px;padding:6px;background:#fff}
@media (max-width:600px){.review-question-row{grid-template-columns:1fr}}
/* 考勤評分 → 三力總覽 (owner, 2026-11-21): one card per person, bars instead of sliders until 調整 */
.ratings-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:6px}
.segmented{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.segmented button{min-height:38px;padding:6px 16px;border:0;background:transparent;color:var(--text);cursor:pointer;font-weight:700}
.segmented button+button{border-left:1px solid var(--line)}
.segmented button[aria-pressed="true"]{background:var(--green);color:#fff}
.ratings-sort{display:flex;align-items:center;gap:6px;font-size:13px;color:#4b5563}
.ratings-sort select{border:1px solid #d1d5db;border-radius:8px;padding:7px 9px;background:#fff}
.ratings-count{margin-left:auto;color:var(--muted);font-size:13px}
.ratings-legend{margin:6px 0 14px}
.rating-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.rating-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px 16px 12px;display:flex;flex-direction:column;gap:14px;box-shadow:0 1px 3px rgba(0,0,0,.03)}
.rating-card.is-editing{border-color:var(--green);box-shadow:0 0 0 3px rgba(47,111,95,.14)}
.rating-card header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.rating-person{display:flex;align-items:center;gap:8px;min-width:0}
.rating-person h3{margin:0;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rating-person .tag.part{background:#e3efff;color:#245a98}
.rating-avg{text-align:right;line-height:1.05}
.rating-avg strong{display:block;font-size:28px;font-variant-numeric:tabular-nums}
.rating-avg small{color:var(--muted);font-size:11px}
.rating-rows{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.rating-row{display:grid;grid-template-columns:48px minmax(0,1fr) 32px;align-items:center;column-gap:10px;row-gap:3px}
.rating-name{font-size:13px;font-weight:700;color:#3d4a43;cursor:help}
.rating-bar{display:block;width:100%;height:10px;border-radius:5px;overflow:hidden}
.rating-track{fill:#e8ece9}
.tier-a{color:#2f7d62}.tier-b{color:#2f6f8f}.tier-c{color:#9a6a12}.tier-d{color:#b4483a}
.rating-fill.tier-a{fill:#3f9a78}.rating-fill.tier-b{fill:#4a8db0}.rating-fill.tier-c{fill:#d6a13c}.rating-fill.tier-d{fill:#cd6650}
.rating-value{font-size:16px;text-align:right;font-variant-numeric:tabular-nums}
.rating-meta{grid-column:2/4;display:flex;gap:6px;flex-wrap:wrap}
.rating-meta:empty{display:none}
.rating-auto{font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--green-soft);color:var(--green);border:1px solid #c7ddd3}
.rating-suggest{font-size:12px;color:var(--amber)}
.rating-row.is-editing input[type=range]{width:100%;accent-color:var(--green)}
.rating-row.is-editing input[type=range]:disabled{opacity:.45}
.rating-note{grid-column:1/4;color:var(--muted);font-size:12px}
.rating-card footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;border-top:1px solid #eef1ee;padding-top:10px}
.rating-updated-at{margin-right:auto;color:#8a948e;font-size:12px}
.ratings-status:empty{display:none}
.score-month{display:flex;align-items:center;gap:6px;font-size:13px;margin-left:auto}
.score-month select{border:1px solid #d1d5db;border-radius:8px;padding:6px 8px;background:#fff}
#page-ratings .review-admin{padding:16px}
@media(max-width:640px){.rating-grid{grid-template-columns:1fr}.ratings-count{margin-left:0}}
#page-ratings .attendance-scores{border-bottom:0}
body[data-admin-role="normal"] [data-page="ratings"]{display:none!important}
/* 員工管理: 專業力、紀律力、協同力 centred (owner, 2026-11-21) */
#page-employees th.rating-col,#employeeTbody td.rating-col{text-align:center}
/* 評核設定: several 神秘客 per side (owner, 2026-11-21) */
.review-manager-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin:10px 0 6px}
.review-managers{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:0}
.review-managers legend{font-weight:800;font-size:13px;padding:0 4px}
.review-managers legend small{color:var(--muted);font-weight:400}
.review-manager-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:6px 10px;max-height:220px;overflow:auto}
.review-manager{display:flex;align-items:center;gap:6px;font-size:13px;white-space:nowrap}
.review-manager small{color:var(--muted)}
.review-manager input:disabled+*{opacity:.5}
.review-group{margin:14px 0 4px;font-size:14px;color:var(--green)}
.review-settings .review-weight{max-width:360px;margin:10px 0}
.review-settings .review-weight input{width:80px}
/* 評核網址 (owner, 2026-11-22) */
.review-links{display:grid;gap:8px;margin:6px 0}
.review-link{display:grid;grid-template-columns:110px minmax(0,1fr) auto;gap:8px;align-items:center}
.review-link code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#f3f5f3;border:1px solid var(--line);border-radius:6px;padding:6px 8px;font-size:12px}
@media(max-width:600px){.review-link{grid-template-columns:1fr auto}.review-link span{grid-column:1/-1}}

/* 評核等級：一排五個小按鈕 (owner, 2026-11-22) */
.review-levels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin-top:6px}
.review-level{min-width:0}
.review-level span{padding:6px 2px;border-radius:8px;font-size:14px;white-space:nowrap}
.review-question{margin-top:8px;padding-top:8px}
.review-question legend small{font-size:12px}
.review-scale{display:flex;flex-wrap:wrap;gap:2px 12px;margin:4px 0 6px;font-size:12px;color:#6b7a72}
.review-scale b{color:#2f3d36;font-weight:600}

/* 神秘客保密說明 (owner, 2026-11-22) */
.review-secret{display:flex;gap:8px;align-items:flex-start;margin:6px 0 10px;padding:10px 12px;border-radius:10px;background:#eef5f1;border:1px solid #c7ddd3;color:#244a3e;font-size:13px;line-height:1.5}
.review-secret strong{flex:none;padding:1px 8px;border-radius:999px;background:#2f6f5f;color:#fff;font-size:12px}
.review-secret p{margin:0}
/* 定期評核: 專業力 and 協同力 rows per person, no switching (owner, 2026-11-23). */
.review-table tr.review-dim-1>td{border-bottom:1px dashed #e8ede9}
.review-table tbody th[rowspan],.review-table tr.review-dim-2>td{border-bottom:1px solid #d5ddd7}
.review-table td.review-dim{color:#4a5a52;font-weight:700}
.review-table th[rowspan] .btn.small{display:block;margin:8px 0 0}
/* 考勤評分 前三名／後三名 (owner, 2026-11-25): green and red, with the words on a tag beside the name */
.rank-badge{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.5;vertical-align:middle;color:#fff;white-space:nowrap}
.rank-badge.rank-top{background:#2f7d4f}.rank-badge.rank-bottom{background:#b3261e}
th .rank-badge{display:block;width:fit-content;margin:4px 0 0}
.score-table tr.rank-top>*{background:#eaf6ee}.score-table tr.rank-bottom>*{background:#fdeeec}
.rating-card.rank-top{border-color:#2f7d4f;box-shadow:inset 0 0 0 1px #2f7d4f;background:#f4fbf6}
.rating-card.rank-bottom{border-color:#b3261e;box-shadow:inset 0 0 0 1px #b3261e;background:#fff6f5}
/* 更多 › 人工調整紀錄 lines up with the buttons above it (owner, 2026-11-25: its text started a little further in) */
#page-schedule .workspace-secondary-tools .schedule-extra-content>.history-link{padding:8px 12px;min-height:44px}
/* On phones the 更多 buttons use 9px 8px (rule above for .schedule-primary-tools .btn); 人工調整紀錄 is a history-link, so
   it gets the same here, or its text starts 4px further in (owner, 2026-11-25: 「跟發布確認進度的發沒有齊頭」) */
@media(max-width:600px){#page-schedule #scheduleConvenience .schedule-primary-tools .history-link{padding:9px 8px}}

/* 金額欄靠右 (owner, 2026-11-26): 投保負擔、加薪試算 */.pay-table th.num,.pay-table td.num{text-align:right;font-variant-numeric:tabular-nums}
/* 加薪試算 under the insurance overview (owner, 2026-11-26) */.pay-raise-sim{margin-top:16px;padding:12px 16px;border:1px solid #dce4df;border-radius:10px;background:#f7faf8}.pay-raise-sim h4{margin:0 0 8px}.pay-raise-inputs{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:10px}.pay-raise-inputs label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#62776b}.pay-raise-inputs input{width:120px}
.payslip-company-total{display:flex;justify-content:space-between;margin:8px 0 0;padding-top:8px;border-top:1px solid #dce4df;color:#2f6f5f}
.payslip-company-lines{list-style:none;margin:0;padding:0;font-size:14px}.payslip-company-lines li{padding:4px 0;border-bottom:1px solid #edf1ee;font-variant-numeric:tabular-nums}.payslip-company-lines span{white-space:nowrap}.payslip-company-lines .payslip-company-sum{color:#2f6f5f;font-weight:600;border-bottom:0}
/* 補登核准：仍算缺卡／不算缺卡 (owner, 2026-11-26) */
.correction-missing{margin:8px 0;padding:8px 10px;border:1px solid #dce3df;border-radius:8px;background:#f8faf9;display:grid;gap:6px}
.correction-missing p{margin:0;font-size:13px}.correction-missing .correction-evidence{color:#8a5208;font-weight:600}
.correction-missing-options{display:flex;flex-wrap:wrap;gap:6px 18px}.correction-missing-options label{display:inline-flex;gap:6px;align-items:center;font-size:14px;cursor:pointer}
.correction-missing-note{display:grid;gap:4px;font-size:12px;color:#62776b}.correction-missing-note input{min-height:34px;padding:3px 8px;border:1px solid #d8e1da;border-radius:6px;font:inherit;font-size:14px}
.correction-missing-flag{display:flex;gap:6px;align-items:center;margin:6px 0;font-size:14px}
.paper-steps{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:8px 0 10px;padding:0;counter-reset:paper-step}.paper-steps li{counter-increment:paper-step;padding:4px 12px;border-radius:999px;background:#eef3ef;color:#6b7f72;font-size:13px}.paper-steps li::before{content:counter(paper-step) '. '}.paper-steps li.is-done{background:#dfeae2;color:#2f5d4a}.paper-steps li.is-current{background:#2f5d4a;color:#fff;font-weight:600}.paper-status{margin:6px 0;font-weight:600;color:#274b3d}.paper-quota{margin:0 0 10px;font-size:12px;color:#687a6f}.paper-pick{cursor:pointer}.paper-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0}[data-photo-inline] .paper-actions .btn{margin:0}.paper-preview{display:block;max-width:100%;max-height:420px;object-fit:contain;margin:10px 0;border:1px solid #e1e8e3;border-radius:6px}[data-photo-inline] details{margin:8px 0}[data-photo-inline] .btn{margin:4px 6px 4px 0}
.paper-inline-summary{margin:4px 0 10px;font-size:15px;font-weight:600;color:#274b3d}
.paper-name-confirm{margin:10px 0;padding:10px 12px;border:1px solid #f0d9a8;border-radius:8px;background:#fffbeb;color:#5c3d0a}.paper-name-confirm p{margin:0 0 8px}
.paper-review-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px;align-items:start;margin:10px 0}.paper-review-photo{position:sticky;top:8px;max-height:calc(100vh - 16px);overflow:auto;border:1px solid #e1e8e3;border-radius:8px;background:#fff;cursor:zoom-in}.paper-review-photo img{display:block;width:100%;height:auto}.paper-review-photo.is-zoomed{cursor:zoom-out}.paper-review-photo.is-zoomed img{width:220%;max-width:none}.paper-review-table{min-width:0}@media(max-width:900px){.paper-review-split{grid-template-columns:1fr}.paper-review-photo{position:static;max-height:60vh}}
.paper-inline-review .paper-inline-input.paper-uncertain{border-color:#d97706;background:#fffbeb;box-shadow:0 0 0 2px #fde68a}
.pay-inline-discard{margin:0 0 12px;padding:10px 12px;border:1px solid #f0d9a8;border-radius:8px;background:#fffbeb;color:#5c3d0a}.pay-inline-discard p{margin:0 0 8px;font-weight:600}.pay-inline-discard-actions{display:flex;flex-wrap:wrap;gap:8px}.pay-inline-discard .btn{margin:0}
/* 基本計薪：設定收成一行、四個步驟、來源卡片、應付金額小表 (owner, 2026-11-27) */
.pay-settings-fold>summary{display:flex;align-items:center;gap:12px;list-style:none}.pay-settings-fold>summary::-webkit-details-marker{display:none}.pay-settings-fold>summary .pay-settings-summary{flex:1;min-width:0;margin:0;font-size:1em;font-weight:700;color:#345448}.pay-settings-fold>summary .pay-settings-edit{flex-shrink:0;margin:0;padding:6px 12px;border:1px solid #cbd8ce;border-radius:8px;background:#fff;color:#345448;font-size:13px;font-weight:600}.pay-settings-fold[open]>summary .pay-settings-edit{background:#edf3ef}.pay-settings-fold [data-payment-profile]{margin-top:20px;padding:16px 0 0;border:0;border-top:1px solid #e1e8e3;border-radius:0;background:transparent}
.pay-work-quantities .pay-step{margin:0 0 28px}.pay-work-quantities .pay-step>p,.pay-work-quantities .pay-step .pay-grid>p{font-size:13px;color:#607466;margin:4px 0 8px}.pay-step [data-work-piece]:not(:empty){margin-top:10px}.pay-step-head{display:flex;align-items:center;gap:10px;margin:0 0 12px}.pay-work-quantities .pay-step-head h4{margin:0;font-size:15px;color:#24473a}.pay-step-no{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:#e3ece6;color:#345448;font-size:12px;font-weight:700}.pay-step-no.done{background:#4f8f7b;color:#fff}.pay-step-status{margin-left:auto;font-size:12px;color:#64766d;text-align:right}
.pay-source-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}.pay-source-card{display:grid;gap:2px;text-align:left;padding:10px 12px;border:1px solid #d1ded3;border-radius:10px;background:#fff;color:#24473a;cursor:pointer;font:inherit}.pay-source-card strong{font-size:14px}.pay-source-card small{font-size:12px;color:#64766d}.pay-source-card:hover{border-color:#8fb3a2}.pay-source-card[aria-pressed=true]{border:2px solid #4f8f7b;padding:9px 11px;background:#f3f8f5}.pay-source-card[aria-pressed=true] small{color:#2f6b57;font-weight:600}.pay-source-card:disabled{opacity:.55;cursor:not-allowed}
.pay-total-table{width:100%;max-width:420px;border-collapse:collapse;font-size:14px}.pay-total-table th,.pay-total-table td{padding:6px 0;background:transparent;color:inherit;border-bottom:1px solid #e8eee9;font-weight:400;text-align:left;white-space:nowrap}.pay-total-table td{text-align:right;font-variant-numeric:tabular-nums}.pay-total-table .pay-total-sum th,.pay-total-table .pay-total-sum td{font-weight:700;font-size:16px;border-bottom:0;padding-top:10px;color:#24473a}.pay-work-totals{font-size:13px;color:#607466}.pay-work-totals .pay-muted{margin:6px 0 0;font-size:12px}.pay-work-status{margin:0 0 16px;font-size:13px;color:#345448}.pay-work-status:empty{display:none}.pay-work-quantities .pay-work-records>summary{cursor:pointer;color:#64766d;font-size:13px}
/* 計件設定間距 (owner, 2026-11-27: 「間距要調整」) */.pay-settings-fold .pay-piece{margin-top:24px}.pay-settings-fold .pay-piece>.pay-grid+.pay-grid,.pay-settings-fold .pay-piece+.pay-grid{margin-top:18px}.pay-settings-fold [data-pay-piece-basis]{margin:12px 0 0}
/* 人事成本卡：和付款數字分開，看起來不像應付 (owner, 2026-11-27) */.pay-book-metrics.pay-book-metrics-cost{grid-template-columns:repeat(5,minmax(0,1fr))}.pay-book-metrics-cost>div:last-child{background:#f7f9f8;border-style:dashed}.pay-book-metrics span small{font-size:11px;color:#8a978e;margin-left:4px}.pay-book-metrics .pay-amount-button{font:inherit;color:inherit}.pay-amount-popup .pay-cost-split{display:block;font-size:11px;color:#64766d}.pay-labor-cost{margin:10px 0 0;font-size:13px;color:#345448}
@media(max-width:1100px){.pay-book-metrics.pay-book-metrics-cost{grid-template-columns:repeat(2,minmax(0,1fr))}}
