/* Monthly attendance totals: compact and horizontally scrollable on iPhone. */
:is(#view-attendance-v1,#view-roster-v1) .v1-monthly-summary{
  margin:23px 0 20px;padding:19px 18px 16px;
  border:1px solid #d9e3da;background:#f8faf7;border-radius:12px;
  min-width:0;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-head{
  display:flex;flex-wrap:wrap;justify-content:space-between;align-items:start;
  gap:12px;margin-bottom:15px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-head h4{
  font-size:16px;color:#20483b;margin:0 0 6px;font-weight:800;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-head p{
  font-size:12px;margin:0;line-height:1.5;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-badge{
  font-size:11px;font-weight:700;color:#406d57;background:#e8f1e9;
  padding:7px 10px;border-radius:8px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-scroll{
  max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;
  border:1px solid #dce7dd;border-radius:9px;background:white;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{
  border-collapse:separate;border-spacing:0;table-layout:fixed;
  width:100%;min-width:760px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table th,
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td{
  padding:12px 9px;text-align:center;font-size:12px;
  border-bottom:1px solid #e9ede7;border-right:1px solid #edf0ea;
  font-variant-numeric:tabular-nums;letter-spacing:normal;text-transform:none;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th{
  background:#e9f2eb;color:#355649;
  font-size:11px;font-weight:750;line-height:1.5;
  white-space:normal;vertical-align:middle;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:nth-child(1){width:120px}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:nth-child(2){width:115px}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:nth-child(n+3){width:90px}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table .v1-summary-name{
  position:sticky;left:0;z-index:1;
  width:120px;min-width:120px;max-width:120px;
  overflow:hidden;text-align:left;white-space:nowrap;
  background:#fff;font-weight:700;color:#344e44;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:first-child{
  position:sticky;left:0;z-index:3;text-align:left;background:#e9f2eb;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table .v1-summary-number{
  font-size:13px;font-weight:700;color:#365649;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table .v1-summary-zero{
  color:#9caea5;font-weight:500;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table .v1-summary-alert{
  color:#a64532;background:#fff2ec;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table tfoot th,
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table tfoot td{
  background:#dceee2;border-bottom:0;
  font-weight:800;color:#194637;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table tfoot .v1-summary-name{
  z-index:2;background:#dceee2;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table tfoot .v1-summary-alert{
  color:#a3422a;background:#f6e1d8;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-explain{
  margin:12px 0 0;color:#63766a;font-size:11px;line-height:1.7;
}
@media(max-width:720px){
  :is(#view-attendance-v1,#view-roster-v1) .v1-monthly-summary{
    padding:15px 11px 13px;margin-top:19px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{min-width:725px}
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table th,
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td{padding:11px 6px}
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table .v1-summary-name,
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:first-child{
    width:112px;min-width:112px;max-width:112px;
  }
}

/* Per-employee monthly notes, editable in place by Owner only. */
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{min-width:1050px}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:last-child{
  width:285px;min-width:285px;text-align:left;padding-left:12px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td.v1-summary-note-cell{
  width:285px;min-width:285px;max-width:285px;
  padding:8px 10px;text-align:left;vertical-align:middle;white-space:normal;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-readonly{
  white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;
  font-size:12px;color:#40594f;max-height:145px;overflow-y:auto;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-editor{
  display:flex;flex-direction:column;gap:4px;min-width:0;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-input{
  width:100%;min-width:0;min-height:53px;box-sizing:border-box;
  resize:vertical;max-height:155px;
  padding:8px 9px;border:1px solid #d8e4db;border-radius:7px;
  background:#fffefa;color:#274438;font-family:inherit;
  font-size:13px;font-weight:400;line-height:1.4;
  white-space:pre-wrap;overflow-wrap:anywhere;text-align:left;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-input:focus{
  outline:2px solid #77af91;outline-offset:0;border-color:#388266;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-input::placeholder{color:#84968a}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-footer{
  display:flex;justify-content:space-between;align-items:center;gap:7px;min-height:26px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-state{
  flex:1;min-width:0;overflow-wrap:anywhere;
  color:#708579;font-size:10px;line-height:1.35;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-saved{color:#247452}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-dirty{color:#936320}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-error{color:#b03e31}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-save{
  padding:5px 9px;min-height:30px;min-width:66px;
  background:#e5f0e8;border:1px solid #a7ccaf;
  color:#27694c;border-radius:6px;font-size:11px;font-weight:700;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-save:not(:disabled):hover{background:#d4e9da}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-save:disabled{opacity:.42;cursor:default}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-help{
  margin:10px 0 0;color:#5b7668;font-size:11px;line-height:1.6;
}
@media(max-width:720px){
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{min-width:1000px}
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:last-child{
    width:250px;min-width:250px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td.v1-summary-note-cell{
    width:250px;min-width:250px;max-width:250px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-input{
    font-size:16px;min-height:57px;
  }
}

/* Compact note editor: input and save button share one line, never grow row height. */
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{min-width:995px}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:last-child{
  width:230px;min-width:230px;max-width:230px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td.v1-summary-note-cell{
  width:230px;min-width:230px;max-width:230px;
  padding:5px 7px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-editor{
  display:flex;flex-direction:row;align-items:center;
  gap:6px;min-width:0;max-width:100%;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-input{
  flex:1 1 0;width:0;min-width:0;min-height:36px;height:36px;
  max-height:36px;resize:none;overflow-y:auto;
  padding:7px 8px;line-height:20px;box-sizing:border-box;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-footer{
  flex:0 0 82px;display:flex;align-items:center;justify-content:flex-end;
  gap:0;min-width:82px;width:82px;min-height:0;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-save{
  width:82px;min-width:82px;min-height:36px;height:36px;
  padding:5px 3px;white-space:nowrap;font-size:11px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-state{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;
}
@media(max-width:720px){
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{min-width:995px}
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:last-child{
    width:230px;min-width:230px;max-width:230px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td.v1-summary-note-cell{
    width:230px;min-width:230px;max-width:230px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-note-input{
    font-size:16px;min-height:36px;height:36px;max-height:36px;
    padding:5px 7px;
  }
}

/* Equal seven metric columns; give the recovered width to the notes editor. */
/* Desktop: employee 120px, each metric 68px, notes receive remaining >=364px. */
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{
  table-layout:fixed;
  width:100%;
  min-width:960px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table col.v1-summary-col-name{
  width:120px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table col.v1-summary-col-count{
  width:68px;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table col.v1-summary-col-note{
  width:auto;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:nth-child(n+2):nth-child(-n+8),
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table tbody td:nth-child(n+2):nth-child(-n+8){
  box-sizing:border-box;
  width:68px;
  min-width:68px;
  max-width:68px;
  padding-left:4px;
  padding-right:4px;
  text-align:center;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:nth-child(n+2):nth-child(-n+8){
  font-size:10.5px;
  line-height:1.35;
}
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:last-child,
:is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td.v1-summary-note-cell{
  box-sizing:border-box;
  width:auto;
  min-width:355px;
  max-width:none;
}
@media(max-width:720px){
  /* Mobile: 7 x 64px, employee 112px, notes >=380px (horizontal scrolling). */
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table{
    min-width:940px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table col.v1-summary-col-name{
    width:112px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table col.v1-summary-col-count{
    width:64px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:nth-child(n+2):nth-child(-n+8),
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table tbody td:nth-child(n+2):nth-child(-n+8){
    width:64px;
    min-width:64px;
    max-width:64px;
    padding-left:3px;
    padding-right:3px;
  }
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table thead th:last-child,
  :is(#view-attendance-v1,#view-roster-v1) .v1-summary-table td.v1-summary-note-cell{
    width:auto;
    min-width:375px;
    max-width:none;
  }
}

/* Roster-only unavailable metrics: no absence/late can be inferred from a shift plan. */
#view-roster-v1 .v1-summary-not-applicable {
  color:#9aaca3;font-weight:500;background:#f5f7f5;cursor:help;
}
