/* RescueDesk styles */
:root {
  --rd-accent: #c8102e;
  --rd-accent-soft: #fde8eb;
  --rd-present: #198754;
  --rd-present-soft: #d1f1dd;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.navbar-brand .bi-shield-plus { font-size: 1.3rem; }

.card { border: 1px solid rgba(0,0,0,.08); }
.card-header { background-color: rgba(0,0,0,.02); font-weight: 600; }

.stat-tile {
  border-left: 4px solid var(--bs-secondary);
  background: white;
}
.stat-tile.accent { border-left-color: var(--rd-accent); }
.stat-tile.ok     { border-left-color: var(--bs-success); }
.stat-tile.warn   { border-left-color: var(--bs-warning); }
.stat-tile.danger { border-left-color: var(--bs-danger); }
.stat-tile .stat-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; }
.stat-tile .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }

.big-action {
  font-size: 1.15rem;
  padding: 1rem 1.25rem;
  width: 100%;
}
.big-clock {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

/* --- weekly schedule grid --- */
.schedule-grid .day-col {
  min-height: 200px;
  background: white;
  border-radius: 0.5rem;
  padding: 0.5rem;
  margin-bottom: .5rem;
  border: 1px solid rgba(0,0,0,.08);
}
.schedule-grid .day-col.today { border-color: var(--rd-accent); box-shadow: 0 0 0 3px var(--rd-accent-soft); }
.schedule-grid .day-col .day-label { font-weight: 700; font-size: .9rem; color: #495057; }
.schedule-grid .shift-pill {
  display: block;
  background: #eef3ff;
  border-left: 3px solid #3d6bf0;
  padding: .4rem .55rem;
  border-radius: .35rem;
  margin-top: .35rem;
  font-size: .82rem;
}
.schedule-grid .shift-pill.mine { background: var(--rd-accent-soft); border-left-color: var(--rd-accent); }
.schedule-grid .shift-pill.swap { background: #fff7e0; border-left-color: #f0a93d; }
.schedule-grid .shift-pill.present {
  background: var(--rd-present-soft);
  border-left-color: var(--rd-present);
}

/* --- schedule builder --- */
.employee-tray { max-height: 70vh; overflow-y: auto; }
.employee-chip {
  display: flex; align-items: center; gap: .5rem;
  cursor: grab;
  user-select: none;
}
.employee-chip:hover { background: #f8f9fa; }
.employee-chip.dragging { opacity: .5; }
.build-day {
  min-height: 220px;
  transition: background .12s, box-shadow .12s;
}
.build-day.drop-target {
  background: var(--rd-present-soft);
  box-shadow: inset 0 0 0 2px var(--rd-present);
}
.build-pill { cursor: pointer; }
.preset-tray .btn.active { background: var(--bs-primary); color: white; }

/* --- monthly schedule grid --- */
.schedule-month { background: white; border-radius: .5rem; padding: .5rem; border: 1px solid rgba(0,0,0,.08); }
.schedule-month .month-header,
.schedule-month .month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.schedule-month .month-dow {
  text-align: center; font-weight: 700; font-size: .8rem; color: #6c757d;
  padding: .25rem 0;
}
.schedule-month .month-cell {
  min-height: 90px;
  background: #f8f9fa;
  border-radius: .25rem;
  padding: .25rem .35rem;
  font-size: .75rem;
}
.schedule-month .month-cell.today { background: var(--rd-accent-soft); }
.schedule-month .month-cell.outside { opacity: .45; }
.schedule-month .month-cell-date { font-weight: 700; }
.schedule-month .month-pill {
  background: #eef3ff;
  border-left: 2px solid #3d6bf0;
  padding: .1rem .25rem;
  border-radius: .25rem;
  margin-top: .15rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.schedule-month .month-pill.mine { background: var(--rd-accent-soft); border-left-color: var(--rd-accent); }

.checklist-row { padding: .5rem .75rem; border-bottom: 1px solid rgba(0,0,0,.05); }
.checklist-row:last-child { border-bottom: none; }
.checklist-row .form-select-sm { max-width: 130px; }

.cred-row.critical { background: #fde8eb; }
.cred-row.warning  { background: #fff7e0; }
.cred-row.expired  { background: #f8d7da; }

.priority-urgent { border-left: 4px solid var(--bs-danger); }
.priority-important { border-left: 4px solid var(--bs-warning); }
.priority-normal { border-left: 4px solid var(--bs-secondary); }

.avatar-circle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #495057; color: white; border-radius: 50%;
  font-weight: 600; font-size: .85rem;
}

.login-card .role-pill {
  font-size: .7rem; padding: .15rem .5rem;
  border-radius: 999px; background: #e9ecef;
}

/* --- signature pad --- */
.signature-pad .signature-canvas-wrap {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: .35rem;
  height: 160px;
  overflow: hidden;
}
.signature-pad canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.signature-pad .signature-baseline {
  position: absolute;
  left: 12px; right: 12px; bottom: 36px;
  border-top: 1px dashed rgba(0,0,0,.25);
  pointer-events: none;
}
.signature-pad .signature-x {
  position: absolute;
  left: 12px; bottom: 28px;
  font-size: 1.1rem; color: rgba(0,0,0,.3);
  pointer-events: none;
}
.signature-display svg {
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: .35rem;
  padding: .25rem;
}
