/* ===== Page History Strip ===== */
.page-history-card {
  background: #fff; border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06); margin-bottom: 14px;
}
.ph-header {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.ph-header strong { color: var(--primary-dark); font-size: .92rem; }
.ph-legend { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ph-leg { font-size: .68rem; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.ph-leg-done { background: #d4edda; color: #155724; }
.ph-leg-overdue { background: #f8d7da; color: #721c24; }
.ph-leg-today { background: #cce5ff; color: #004085; }
.ph-leg-locked { background: #e9ecef; color: #495057; }

.ph-strip {
  display: flex; gap: 5px; overflow-x: auto; padding: 4px 0;
  scroll-snap-type: x mandatory;
}
.ph-cell {
  flex: 0 0 auto; min-width: 50px; padding: 6px 4px; border-radius: 10px;
  background: #f8d7da; border: 2px solid transparent;
  text-align: center; cursor: pointer;
  scroll-snap-align: start; transition: all .15s; position: relative;
  font-size: .75rem;
}
.ph-cell:hover { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.ph-cell.ph-done { background: #d4edda; color: #155724; }
.ph-cell.ph-overdue { background: #f8d7da; color: #721c24; }
.ph-cell.ph-today { background: #cce5ff; color: #004085; border-color: #0d6efd; }
.ph-cell.ph-locked { background: #e9ecef; color: #6c757d; opacity: .7; }
.ph-cell.ph-selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,79,138,.2); transform: scale(1.05); }

.ph-num { font-size: 1.05rem; font-weight: 700; line-height: 1; }
.ph-mn { font-size: .58rem; opacity: .8; }
.ph-count {
  background: rgba(0,0,0,.15); border-radius: 8px;
  font-size: .65rem; padding: 1px 4px; margin-top: 2px; display: inline-block;
  font-weight: 600;
}
.ph-lock { position: absolute; top: 2px; right: 4px; font-size: .55rem; color: #888; }

.ph-readonly-banner {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-left: 4px solid #ffc107;
  padding: 8px 14px; border-radius: 8px;
  margin-top: 10px; font-size: .85rem; color: #856404;
  display: flex; align-items: center; gap: 8px;
}
.ph-readonly-banner i { font-size: 1rem; }

/* Locked inputs */
input.readonly-locked, textarea.readonly-locked {
  background: #f8f9fa !important; color: #6c757d !important;
  cursor: not-allowed !important;
}
button.disabled-locked { opacity: .5 !important; cursor: not-allowed !important; }

@media (max-width: 600px) {
  .ph-cell { min-width: 44px; padding: 5px 3px; }
  .ph-num { font-size: .9rem; }
}
