/* Daily diary — extends ops-weekly.css */

.ops-page .ops-header p strong {
  color: var(--brand);
  font-weight: 700;
}

.signed-lock .ops-editor input,
.signed-lock .ops-editor select,
.signed-lock .ops-editor textarea,
.signed-lock .ops-editor button[data-add],
.signed-lock .ops-editor button[data-del] {
  pointer-events: none;
  opacity: 0.85;
}

.signed-lock #btnSave,
.signed-lock #btnSign {
  display: none;
}

.ops-list table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ops-list th, .ops-list td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.ops-list tr.row-click { cursor: pointer; }
.ops-list tr.row-click:hover { background: #f8fafc; }
.ops-list tr.row-mine td:nth-child(2) { font-weight: 600; color: #0f172a; }

.ops-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 10px;
}
.ops-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.ops-check-grid input { width: 16px; height: 16px; flex: 0 0 auto; }

.ops-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.ops-photo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ops-photo-thumb {
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ops-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ops-photo-missing {
  font-size: .75rem;
  color: #64748b;
  padding: 8px;
  text-align: center;
}
.ops-photo-card label {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
}
.ops-photo-card textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  font: inherit;
}
.signed-lock #btnAddPhotoLabel,
.signed-lock #btnFromLibrary,
.signed-lock [data-photo-del] {
  display: none !important;
}

.ops-photo-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #312e81;
  margin-bottom: 2px;
  width: fit-content;
}

.ph-lib-modal {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
}
.ph-lib-modal[hidden] { display: none !important; }
.ph-lib-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55);
}
.ph-lib-card {
  position: relative; z-index: 1;
  width: min(860px, 94vw); max-height: 88vh;
  background: #fff; border-radius: 12px; padding: 16px 18px;
  overflow: auto; box-shadow: 0 16px 48px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 10px;
}
.ph-lib-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ph-lib-head h2 { margin: 0; font-size: 1.05rem; color: var(--brand); }
.ph-lib-x {
  border: none; background: none; font-size: 28px; cursor: pointer; line-height: 1; color: #0f172a;
}
.ph-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  min-height: 120px;
}
.ph-lib-item {
  border: 2px solid #e2e8f0; border-radius: 8px; overflow: hidden;
  cursor: pointer; background: #f8fafc; position: relative;
}
.ph-lib-item.is-selected { border-color: #0C1248; box-shadow: 0 0 0 2px rgba(12,18,72,.2); }
.ph-lib-item.is-disabled { opacity: .45; cursor: not-allowed; }
.ph-lib-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #e2e8f0; }
.ph-lib-item .ph-lib-meta {
  padding: 6px 8px; font-size: .72rem; color: #64748b; line-height: 1.3;
}
.ph-lib-item .ph-lib-check {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 999px;
  background: #0C1248; color: #fff; font-size: 14px; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.ph-lib-item.is-selected .ph-lib-check { display: flex; }
.ph-lib-foot {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px;
}
.ph-lib-empty {
  grid-column: 1 / -1; text-align: center; color: #64748b;
  padding: 28px 12px; border: 1px dashed #e2e8f0; border-radius: 8px;
}
