.sr-body { background: #f4f6f8; }
.deadline-bar {
  background: #1f4e78;
  color: #fff;
  margin: 0 20px 14px;
  padding: 12px 18px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.deadline-bar.hidden { display: none; }
.deadline-bar.urgent { background: #a03020; }
.deadline-bar.warning { background: #b86a0a; }
.deadline-bar.passed { background: #555; }
.deadline-bar.unset { background: #6c757d; }
.db-label { font-weight: 600; }
.db-countdown {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
  font-size: 16px;
  flex: 1;
}
.db-admin {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.db-admin label { font-size: 12px; opacity: 0.9; }
.db-admin input[type=datetime-local] {
  padding: 5px 8px;
  border-radius: 4px;
  border: none;
  font-family: inherit;
}
.sr-intro {
  background: #fff;
  margin: 0 20px 14px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid #e3e6ea;
  font-size: 13px;
  color: #555;
}
#sr-content {
  padding: 0 20px 20px;
}
.sr-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  background: #fff;
}
.sr-table th, .sr-table td {
  border: 1px solid #d8dbe0;
  padding: 4px 4px;
  text-align: center;
  font-size: 12px;
  vertical-align: middle;
}
.sr-table th {
  background: #f0f3f6;
  font-weight: 600;
}
.sr-table th.dow-mon, .sr-table th.dow-wed, .sr-table th.dow-fri, .sr-table th.dow-sun {
  background: #fff200;
}
.sr-table th.dow-sat { background: #cfe2f3; }
.sr-table .date-sun { color: #c00; }
.sr-table .date-sat { color: #1f4e78; }
.sr-table .name-cell { text-align: left; padding-left: 8px; font-weight: 500; }
.sr-cell {
  cursor: pointer;
  min-height: 38px;
  height: 38px;
}
.sr-cell:hover { background: #f5f8fa; }
.sr-cell .sr-content {
  font-weight: 600;
}
.sr-cell.type-any { background: #d6ecdd; }
.sr-cell.type-any .sr-content { color: #1e7a3a; }
.sr-cell.type-ok { background: #e8f0f9; }
.sr-cell.type-ok .sr-content { color: #1f4e78; font-size: 11px; }
.sr-cell.type-ng { background: #fde2e0; }
.sr-cell.type-ng .sr-content { color: #b3261e; }
.sr-cell.no-day { background: #f7f7f7; cursor: default; }
.sr-cell.no-day:hover { background: #f7f7f7; }
.apply-btn {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  padding: 2px 4px;
  border: 1px solid #1f4f5b;
  background: #1f4f5b;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.apply-btn:hover { background: #163942; }

.sr-type-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.type-btn {
  padding: 10px;
  justify-content: center;
  border: 1px solid #cfd4da;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}
.type-btn.active[data-type=any] { background: #1e7a3a; color: #fff; border-color: #1e7a3a; }
.type-btn.active[data-type=ok] { background: #1f4e78; color: #fff; border-color: #1f4e78; }
.type-btn.active[data-type=ng] { background: #b3261e; color: #fff; border-color: #b3261e; }

.memo-section {
  background: #fff;
  margin: 0 20px 30px;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #e3e6ea;
}
.memo-section textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 8px;
  resize: vertical;
}

.section-h {
  font-size: 14px; font-weight: 600;
  margin: 16px 0 8px;
}
.template-chips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: #f4f6f8; border-radius: 6px; padding: 8px 10px;
  margin-bottom: 12px;
}
.template-chips .tpl-label { font-size: 12px; color: #666; margin-right: 4px; }
.template-chips .tpl-chip {
  border: 1px solid #4a86b3; background: #fff; color: #1f4e78;
  border-radius: 14px; padding: 4px 10px; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.template-chips .tpl-chip:hover { background: #e8f0f9; }
.template-chips .tpl-chip-del {
  border: none; background: transparent; color: #888;
  cursor: pointer; font-size: 14px; padding: 0 4px;
  font-family: inherit;
}
.template-chips .tpl-chip-del:hover { color: #b3261e; }

/* Stats */
.sr-stats {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.stat-chip {
  background: #fff;
  border: 1px solid #cfd4da;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 12px;
  color: #555;
}
.stat-chip strong { color: #1f4f5b; margin: 0 4px; }
.stat-chip.ng strong { color: #b3261e; }
.stat-chip.missing strong { color: #a05c00; }

/* View tabs */
.view-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 20px 6px;
  border-bottom: 1px solid #e3e6ea;
}
.view-tab {
  background: none;
  border: none;
  padding: 9px 18px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.view-tab.active {
  color: #1f4f5b;
  border-bottom-color: #1f4f5b;
  font-weight: 600;
}

/* Sub-pickers (week/day) */
.sub-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 20px 10px;
}
.picker-label {
  font-size: 14px; font-weight: 600;
  min-width: 200px; text-align: center;
}
.picker-input {
  padding: 6px 10px;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  font-family: inherit;
}

/* Day view */
.day-view {
  background: #fff;
  margin: 0 20px 20px;
  padding: 18px 22px;
  border-radius: 8px;
  border: 1px solid #e3e6ea;
}
.day-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.day-view-title {
  font-size: 16px;
  font-weight: 600;
}
.day-view-actions {
  display: flex; gap: 8px;
}
.day-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.day-table th, .day-table td {
  border: 1px solid #d8dbe0;
  padding: 8px 12px;
  text-align: left;
}
.day-table th {
  background: #f0f3f6;
  font-weight: 600;
  text-align: center;
}
.day-table td.center { text-align: center; }
.req-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.req-badge.ok { background: #d6e4f4; color: #1f4e78; }
.req-badge.any { background: #d6ecdd; color: #1e7a3a; }
.req-badge.ng { background: #fde2e0; color: #b3261e; }
.req-time {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 600;
}
.shift-state {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}
.shift-state.has {
  background: #fff8e0; color: #a05c00;
}
.shift-state.none {
  background: #f0f3f6; color: #666;
}
.apply-btn-sm {
  background: #1f4f5b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.apply-btn-sm:hover { background: #163942; }
.apply-btn-sm:disabled {
  background: #ccc; cursor: not-allowed;
}
.apply-btn-sm.ghost {
  background: #fff;
  border: 1px solid #1f4f5b;
  color: #1f4f5b;
}
.apply-btn-sm.ghost:hover { background: #f0f5f6; }
.bulk-actions {
  margin-top: 12px;
  text-align: right;
}

/* Week view */
.week-view {
  background: #fff;
  margin: 0 20px 20px;
  padding: 18px 22px;
  border-radius: 8px;
  border: 1px solid #e3e6ea;
}
.week-table-2 {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.week-table-2 th, .week-table-2 td {
  border: 1px solid #d8dbe0;
  padding: 6px 4px;
  text-align: center;
  vertical-align: top;
}
.week-table-2 th {
  background: #f0f3f6;
  font-weight: 600;
}
.week-table-2 th.dow-mon, .week-table-2 th.dow-wed,
.week-table-2 th.dow-fri, .week-table-2 th.dow-sun { background: #fff200; }
.week-table-2 th.dow-sat { background: #cfe2f3; }
.week-table-2 .name-cell { text-align: left; padding: 6px 8px; font-weight: 500; width: 90px; }
.week-table-2 .no-day { background: #f7f7f7; }
.week-table-2 .req-cell {
  cursor: default;
  min-height: 60px;
  padding: 4px 2px;
}
.week-cell-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  font-size: 11px;
}
.week-cell-content .req-text {
  font-weight: 600;
}
.week-cell-content .shift-tag {
  background: #fff8e0; color: #a05c00;
  padding: 1px 5px; border-radius: 8px;
  font-size: 10px;
}
.week-cell-content .apply-mini {
  background: #1f4f5b;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 10px;
  font-family: inherit;
}
.week-cell-content .apply-mini:hover { background: #163942; }
.week-cell-content .apply-mini.ghost {
  background: #fff;
  border: 1px solid #1f4f5b;
  color: #1f4f5b;
}
.empty-day {
  text-align: center;
  padding: 28px 0;
  color: #888;
  font-size: 13px;
}
