/* List of Required Modifications (126): scope cards, lines, site photos (req-mods.js). */
.lrm-board [hidden], .lrm-lightbox [hidden] { display: none !important; }
.form-group[data-type="modification_log"], .lrm-board, .lrm-card, .lrm-lines { min-width: 0; }
.lrm-board { display: flex; flex-direction: column; gap: 0.9rem; }
.lrm-toolbar { display: flex; flex-wrap: wrap; gap: 0.35rem; border-bottom: 1px solid var(--border, #e2e8f0); }
.lrm-tab {
  border: 0; background: none; padding: 0.5rem 0.9rem; font: inherit; font-weight: 600;
  color: var(--text-2, #5c6b7e); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px;
}
.lrm-tab.active { color: var(--accent, #1e4d6b); border-bottom-color: var(--accent, #1e4d6b); }
.lrm-photo-count {
  display: inline-block; min-width: 1.3rem; padding: 0 0.35rem; border-radius: 999px; font-size: 0.75rem;
  background: var(--accent-light, #e8f2f7); color: var(--accent, #1e4d6b); text-align: center; font-weight: 600;
}
.lrm-lines { display: flex; flex-direction: column; gap: 0.9rem; }
.lrm-hint {
  background: var(--warn-bg, #fef3c7); color: #78350f; border-radius: 8px; padding: 0.6rem 0.8rem; margin: 0;
}
.lrm-hint .btn-link { font-weight: 600; text-decoration: underline; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.lrm-card {
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: #fff; padding: 0.75rem 0.85rem 0.85rem;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(15, 45, 61, 0.06));
}
.lrm-card-additional { background: #fbfcfd; border-style: dashed; }
.lrm-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.lrm-kicker { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3, #94a3b8); font-weight: 600; }
.lrm-card-title { margin: 0.1rem 0 0.35rem; font-size: 1rem; color: var(--text, #1a2332); }
.lrm-scope-text { font-size: 0.86rem; color: var(--text-2, #5c6b7e); margin: 0 0 0.6rem; }
.lrm-scope-text ul { margin: 0.1rem 0 0.25rem 1.1rem; padding: 0; }
.lrm-scope-acc { margin: 0.2rem 0 0; }
.lrm-scope-acc span { font-weight: 600; }
.lrm-muted { color: var(--text-3, #94a3b8); }
.lrm-table-wrap { overflow-x: auto; }
.lrm-table { width: 100%; min-width: 980px; table-layout: fixed; }
.lrm-table th { font-size: 0.78rem; text-align: left; }
.lrm-table td { vertical-align: top; }
.lrm-table textarea, .lrm-table select { width: 100%; box-sizing: border-box; min-height: 2.1rem; font: inherit; font-size: 0.86rem; }
/* One height per line (req-mods.js syncRowHeights): grown to the tallest box, never scrolls inside. */
.lrm-table textarea { resize: none; overflow: hidden; }
.lrm-c-modification, .lrm-c-description, .lrm-c-reason { width: 14%; }
.lrm-c-area_system { width: 9%; }
.lrm-c-priority { width: 8%; }
.lrm-c-comment { width: 11%; }
.lrm-c-photos { width: 20%; }
.lrm-c-actions { width: 10%; }
.lrm-c-actions { text-align: right; }
.lrm-move { width: 100%; font-size: 0.75rem; margin-bottom: 0.25rem; }
.lrm-badge { font-size: 0.7rem; color: var(--warn, #b45309); background: var(--warn-bg, #fef3c7); border-radius: 6px; padding: 0.15rem 0.3rem; margin-bottom: 0.25rem; text-align: left; }
.lrm-empty td { color: var(--text-3, #94a3b8); font-style: italic; }
.lrm-add { margin-top: 0.5rem; }
/* Photo reel: single row of uniform thumbnails, sideways scroll with snap + touch swipe. */
.lrm-photo-cell { display: flex; align-items: flex-start; gap: 0.4rem; min-width: 0; }
.lrm-c-photos { min-width: 0; }
.lrm-reel {
  display: flex; flex-wrap: nowrap; gap: 0.3rem; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; touch-action: pan-x; padding-bottom: 0.2rem; scrollbar-width: thin;
}
.lrm-reel:empty { display: none; }
.lrm-thumb {
  flex: 0 0 auto; width: 3.4rem; height: 3.4rem; padding: 0; border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px; overflow: hidden; background: #f1f5f9; cursor: zoom-in; scroll-snap-align: start;
}
.lrm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lrm-img-pending { background: linear-gradient(90deg, #f1f5f9, #e2e8f0, #f1f5f9); }
.lrm-img-broken { outline: 1px dashed var(--danger, #dc2626); }
.lrm-uploading { font-size: 0.75rem; color: var(--text-2, #5c6b7e); align-self: center; }
.lrm-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; flex: 0 0 auto; }
.lrm-photo-add, .lrm-photo-cam {
  display: inline-flex; align-items: center; gap: 0.2rem; border: 1px solid var(--border, #e2e8f0); border-radius: 6px;
  padding: 0.2rem 0.45rem; font-size: 0.78rem; cursor: pointer; background: #fff; color: var(--accent, #1e4d6b); font-weight: 600;
}
.lrm-photo-cam { display: none; }
@media (pointer: coarse) { .lrm-photo-cam { display: inline-flex; } }
.lrm-row-flash td { animation: lrm-flash 2s ease-out; }
@keyframes lrm-flash { 0% { background: #fde68a; } 100% { background: transparent; } }
.lrm-library { display: flex; flex-direction: column; gap: 1rem; }
.lrm-lib-group h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.lrm-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
.lrm-lib-tile { margin: 0; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; overflow: hidden; background: #fff; }
.lrm-lib-img { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: #f1f5f9; cursor: zoom-in; }
.lrm-lib-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lrm-lib-tile figcaption { padding: 0.35rem 0.5rem 0.45rem; font-size: 0.78rem; display: flex; flex-direction: column; gap: 0.1rem; }
.lrm-lib-card { color: var(--text-3, #94a3b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrm-lib-goto { text-align: left; color: var(--accent, #1e4d6b); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 0.8rem; }
.lrm-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, 0.86); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.lrm-lb-frame { display: flex; flex-direction: column; gap: 0.5rem; max-width: min(1100px, 100%); max-height: 100%; width: 100%; }
.lrm-lb-top { display: flex; align-items: center; gap: 0.75rem; color: #e2e8f0; font-size: 0.9rem; }
.lrm-lb-caption { flex: 1; font-weight: 600; }
.lrm-lb-close { border: 0; background: none; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lrm-lb-del { background: #fff; color: var(--danger, #dc2626); border-color: #fecaca; }
.lrm-lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.lrm-lb-stage img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 6px; background: #0f172a; min-width: 120px; min-height: 90px; }
.lrm-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 2rem; width: 2.6rem; height: 3.4rem; border-radius: 8px; cursor: pointer; }
.lrm-lb-prev { left: 0.25rem; }
.lrm-lb-next { right: 0.25rem; }
.lrm-lb-name { color: #cbd5e1; font-size: 0.8rem; text-align: center; }
@media (max-width: 720px) {
  .lrm-card { padding: 0.6rem; }
  .lrm-card-head { flex-direction: column; }
  /* Phone: each line becomes a stacked block (label above each field); the photo reel stays one row. */
  .lrm-table { min-width: 0; table-layout: auto; }
  .lrm-table thead { display: none; }
  .lrm-table, .lrm-table tbody, .lrm-table tr.lrm-row, .lrm-table tr.lrm-row > td { display: block; width: auto; }
  .lrm-table tr.lrm-row { border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 0.5rem; margin-bottom: 0.6rem; }
  .lrm-table tr.lrm-row > td { padding: 0.2rem 0; border: 0; }
  .lrm-table tr.lrm-row > td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 600; color: var(--text-2, #5c6b7e); margin-bottom: 0.15rem;
  }
  .lrm-c-actions { display: flex !important; gap: 0.5rem; align-items: center; justify-content: flex-end; }
  .lrm-move { width: auto; flex: 1 1 auto; margin: 0; }
  .lrm-thumb { width: 4.6rem; height: 4.6rem; }
}
