/* Representations styles for PETATS */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.5rem; }
.rep-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 16px); padding: 1.5rem; text-decoration: none; color: inherit;
  transition: transform .25s, box-shadow .25s, border-color .25s; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}
.rep-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md, 0 8px 24px rgba(11,31,75,.09)); border-color: #cbd5e1; color: inherit; }

.rep-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .85rem; font-size: .82rem; }
.rep-card__date { color: var(--muted, #64748b); font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.rep-card__title { font-size: 1.18rem; font-weight: 700; line-height: 1.4; color: var(--ink, #0b1f4b); margin: 0 0 .5rem; }
.rep-card__ref { font-family: monospace; font-size: .78rem; font-weight: 600; color: #475569; background: #f1f5f9; padding: .2rem .55rem; border-radius: 6px; display: inline-block; margin-bottom: .6rem; width: fit-content; }
.rep-card__to { font-size: .88rem; color: #334155; margin-bottom: .75rem; display: flex; align-items: flex-start; gap: .4rem; }
.rep-card__to strong { color: var(--ink, #0b1f4b); }
.rep-card__excerpt { font-size: .92rem; color: #64748b; line-height: 1.5; margin-bottom: 1.2rem; flex-grow: 1; }

.rep-card__footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f1f5f9; padding-top: .85rem; margin-top: auto; font-size: .84rem; font-weight: 600; }
.rep-card__file-badge { display: inline-flex; align-items: center; gap: .4rem; color: #334155; }
.rep-card__file-badge.is-pdf i { color: #dc2626; font-size: 1.15rem; }
.rep-card__file-badge.is-img i { color: #2563eb; font-size: 1.15rem; }
.rep-card__cta { color: var(--brand, #2457f5); display: inline-flex; align-items: center; gap: .3rem; }

/* Status Badges */
.badge-status { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.badge-status--submitted { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-status--in_review { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-status--resolved { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-status--follow_up { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }

/* Category Tag */
.badge-cat { font-size: .75rem; font-weight: 700; color: #0369a1; background: #e0f2fe; padding: .2rem .55rem; border-radius: 6px; }

/* Detail Page */
.rep-detail-card { background: #fff; border-radius: 16px; border: 1px solid var(--line, #e2e8f0); box-shadow: var(--shadow-sm); padding: 2rem; margin-bottom: 2rem; }
.rep-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem 1.5rem; padding: 1.25rem 1.5rem; background: #f8fafc; border-radius: 12px; margin-bottom: 2rem; border: 1px solid #e2e8f0; }
.rep-meta-item dt { font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.rep-meta-item dd { font-size: .95rem; font-weight: 600; color: #0b1f4b; margin: 0; }

.rep-content { font-size: 1.05rem; line-height: 1.7; color: #1e293b; margin-bottom: 2.5rem; }
.rep-content p { margin-bottom: 1.25rem; }

/* Attachment Viewer */
.rep-viewer { background: #f8fafc; border-radius: 14px; border: 1px solid #cbd5e1; padding: 1.5rem; margin-top: 2rem; }
.rep-viewer__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid #e2e8f0; }
.rep-viewer__head h3 { font-size: 1.15rem; font-weight: 700; margin: 0; display: inline-flex; align-items: center; gap: .5rem; }
.rep-viewer__actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.rep-viewer__frame { width: 100%; min-height: 650px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.rep-viewer__img-box { text-align: center; background: #0b1f4b; border-radius: 8px; padding: 1rem; overflow: hidden; }
.rep-viewer__img { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.25); }

@media (max-width: 767.98px) {
  .rep-detail-card { padding: 1.25rem; }
  .rep-viewer { padding: 1rem; }
  .rep-viewer__frame { min-height: 420px; }
}
