/* ===== Cleaning 30-day Grid ===== */
.cleaning-30-grid { display: grid; gap: 10px; }
.c30-day {
  background: #fff; border-radius: 12px; padding: 12px 14px;
  border-left: 5px solid #adb5bd; box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: all .15s;
}
.c30-day.day-done { border-left-color: #28a745; background: linear-gradient(90deg, #f0fdf4, #fff); }
.c30-day.day-partial { border-left-color: #ffc107; background: linear-gradient(90deg, #fffbeb, #fff); }
.c30-day.day-missed { border-left-color: #dc3545; background: linear-gradient(90deg, #fff5f5, #fff); }
.c30-day.day-today { border-left-color: #0d6efd; background: linear-gradient(90deg, #f0f7ff, #fff); border-left-width: 6px; }
.c30-day.day-locked { border-left-color: #adb5bd; opacity: .7; background: #f8f9fa; }
.c30-head {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed #dee2e6;
}
.c30-date { font-size: 1rem; font-weight: 600; }
.c30-date strong { font-size: 1.2rem; color: var(--primary-dark); }
.c30-progress { display: flex; gap: 6px; }
.c30-shift-tag {
  font-size: .75rem; padding: 3px 10px; border-radius: 10px; font-weight: 500;
}
.c30-shift-tag.c30-shift-done { background: #d4edda; color: #155724; }
.c30-shift-tag.c30-shift-partial { background: #fff3cd; color: #856404; }
.c30-shift-tag.c30-shift-missed { background: #f8d7da; color: #721c24; }

.c30-shifts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.c30-shift { background: #f8f9fa; border-radius: 8px; padding: 10px; }
.c30-shift-title { font-weight: 600; font-size: .85rem; margin-bottom: 8px; color: var(--primary-dark); }
.c30-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px; margin-bottom: 8px;
}
.c30-item {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 8px; border-radius: 6px; background: #fff;
  transition: background .12s; font-size: .82rem;
}
.c30-item:hover:not(.locked) { background: #e9ecef; }
.c30-item.locked { opacity: .6; cursor: not-allowed; }
.c30-item input { cursor: pointer; }
.c30-item input:checked + span { font-weight: 600; color: #155724; }
.c30-sign input { font-size: .85rem; }
.c30-ts { font-size: .7rem; color: #888; margin-top: 8px; padding-top: 6px; border-top: 1px dashed #dee2e6; text-align: right; }
.c30-ts i { margin-right: 3px; }
.b-ts { font-size: .72rem; color: #888; margin-top: 4px; }
.b-ts i { margin-right: 3px; }

@media (max-width: 600px) {
  .c30-shifts { grid-template-columns: 1fr; }
  .c30-items { grid-template-columns: 1fr 1fr; }
}

/* ===== Borrow improvements ===== */
.bsc { background: #fff; border-radius: 12px; padding: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.05); border-left: 4px solid #adb5bd; }
.bsc.bsc-primary { border-left-color: #0d6efd; background: linear-gradient(135deg, #f0f7ff, #fff); }
.bsc.bsc-info { border-left-color: #17a2b8; background: linear-gradient(135deg, #e0f7fa, #fff); }
.bsc.bsc-warning { border-left-color: #ffc107; background: linear-gradient(135deg, #fffbeb, #fff); }
.bsc.bsc-danger { border-left-color: #dc3545; background: linear-gradient(135deg, #fff5f5, #fff); }
.bsc.bsc-success { border-left-color: #28a745; background: linear-gradient(135deg, #f0fdf4, #fff); }
.bsc-n { font-size: 1.8rem; font-weight: 700; color: var(--primary-dark); line-height: 1; }
.bsc-l { font-size: .78rem; color: #555; margin-top: 4px; }

.borrow-card {
  background: #fff; border-radius: 12px; padding: 14px;
  border-left: 5px solid #adb5bd; box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 10px;
}
.borrow-card.b-urg-overdue { border-left-color: #dc3545; background: linear-gradient(90deg, #fff5f5, #fff); }
.borrow-card.b-urg-due { border-left-color: #ffc107; background: linear-gradient(90deg, #fffbeb, #fff); }
.borrow-card.b-urg-today { border-left-color: #0d6efd; background: linear-gradient(90deg, #f0f7ff, #fff); }
.borrow-card.b-urg-returned { border-left-color: #28a745; opacity: .85; }
.b-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.b-date { font-weight: 600; color: var(--primary-dark); }
.b-urgency { font-size: .8rem; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.b-urg-overdue .b-urgency { background: #dc3545; color: #fff; animation: pulse-urg 1.5s infinite; }
.b-urg-due .b-urgency { background: #ffc107; color: #333; }
.b-urg-today .b-urgency { background: #0d6efd; color: #fff; }
.b-urg-returned .b-urgency { background: #d4edda; color: #155724; }
@keyframes pulse-urg { 0%,100% { box-shadow: 0 0 0 0 rgba(220,53,69,.5); } 50% { box-shadow: 0 0 0 8px rgba(220,53,69,0); } }
.b-body { font-size: .9rem; }
.b-house { margin-bottom: 6px; }
.b-items { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.b-chip { background: #e9ecef; color: #495057; padding: 2px 9px; border-radius: 12px; font-size: .75rem; font-weight: 500; }
.b-chip.b-total { background: var(--primary); color: #fff; }
.b-people { font-size: .85rem; color: #555; }
.b-notes { margin-top: 4px; }
.b-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f1f3f5; }

/* ===== Period Detail ===== */
.period-detail-header { background: linear-gradient(135deg, #fff, #f8f9fa); }
.pd-stat { background: #fff; border-radius: 10px; padding: 10px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.pd-stat-n { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.pd-stat-l { font-size: .75rem; color: #666; margin-top: 2px; }

.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.todo-card {
  background: #fff; border-radius: 12px; padding: 12px;
  display: grid; grid-template-columns: 44px 1fr 16px; gap: 10px; align-items: center;
  border-left: 4px solid #adb5bd; box-shadow: 0 1px 6px rgba(0,0,0,.05);
  cursor: pointer; transition: all .15s;
}
.todo-card:hover { transform: translateX(4px); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.todo-card.done { border-left-color: #28a745; background: linear-gradient(90deg, #f0fdf4, #fff); }
.todo-card.partial { border-left-color: #ffc107; }
.todo-card.missed { border-left-color: #dc3545; background: linear-gradient(90deg, #fff5f5, #fff); }
.todo-card.unknown { border-left-color: #6c757d; }
.todo-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.todo-card.done .todo-icon { background: #28a745; }
.todo-card.partial .todo-icon { background: #ffc107; color: #333; }
.todo-card.missed .todo-icon { background: #dc3545; }
.todo-name { font-weight: 600; font-size: .92rem; color: var(--primary-dark); margin-bottom: 4px; }
.todo-prog { display: flex; align-items: center; gap: 8px; }
.todo-prog-bar { flex: 1; background: #e9ecef; height: 8px; border-radius: 4px; overflow: hidden; }
.todo-prog-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s; }
.todo-card.done .todo-prog-fill { background: linear-gradient(90deg, #28a745, #20c997); }
.todo-card.missed .todo-prog-fill { background: #dc3545; }
.todo-prog-text { font-size: .75rem; color: #555; white-space: nowrap; }
.todo-hint { font-size: .8rem; color: #888; }
.todo-warn { font-size: .72rem; color: #dc3545; margin-top: 4px; font-weight: 500; }
.todo-arrow { color: #aaa; }

.missing-dates { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.missing-chip {
  background: #fff3cd; color: #856404; padding: 3px 9px; border-radius: 10px;
  font-size: .75rem; font-weight: 500; cursor: pointer; transition: all .12s;
}
.missing-chip:hover { background: #ffc107; color: #fff; }

.pc-hint { font-size: .7rem; color: #555; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #dee2e6; }
.pc-hint i { color: var(--primary); }
