.managed-file-dialog { width: min(1040px, calc(100vw - 32px)); }
.managed-file-dialog .modal-body { min-width: 0; overflow-x: hidden; }
.managed-file-center { min-width: 0; display: grid; gap: 14px; }
.managed-file-center > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--emerald) 22%, var(--line-soft)); border-radius: 13px; background: linear-gradient(135deg, color-mix(in srgb, var(--emerald-soft) 55%, var(--surface)), var(--surface)); }
.managed-file-center > header strong, .managed-file-center > header small { display: block; }
.managed-file-center > header strong { color: var(--text); font-size: 15px; }
.managed-file-center > header small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.managed-file-center > header b { flex: 0 0 auto; padding: 6px 10px; color: var(--emerald-dark); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 999px; font-size: 11px; }
.managed-file-filters { display: grid; grid-template-columns: minmax(190px, 1.5fr) minmax(135px, .7fr) minmax(135px, .65fr) minmax(135px, .65fr) auto; align-items: end; gap: 9px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--row-bg); }
.managed-file-filters label { min-width: 0; display: grid; gap: 5px; }
.managed-file-filters label > span { color: var(--muted); font-size: 10px; }
.managed-file-filters input, .managed-file-filters select { width: 100%; min-width: 0; min-height: 40px; }
.managed-file-filter-actions { display: flex; gap: 6px; }
.managed-file-filter-actions button { min-height: 40px; padding: 7px 11px; white-space: nowrap; }
.managed-file-results { min-height: 210px; display: grid; align-content: start; gap: 8px; }
.managed-file-card { min-width: 0; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.managed-file-card:hover { border-color: color-mix(in srgb, var(--emerald) 42%, var(--line-soft)); box-shadow: 0 7px 18px rgba(15, 39, 58, .07); transform: translateY(-1px); }
.managed-file-kind { width: 50px; height: 50px; display: grid; place-items: center; color: #fff; background: #64748b; border-radius: 12px; direction: ltr; font: 800 10px/1 Arial, sans-serif; letter-spacing: .03em; }
.managed-file-kind.type-image { background: linear-gradient(145deg, #0d9488, #14b8a6); }
.managed-file-kind.type-pdf { background: linear-gradient(145deg, #b42318, #e45145); }
.managed-file-kind.type-excel { background: linear-gradient(145deg, #08783e, #16a05d); }
.managed-file-kind.type-word { background: linear-gradient(145deg, #1759a6, #3b82d0); }
.managed-file-copy { min-width: 0; display: grid; gap: 4px; }
.managed-file-copy > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 12px; }
.managed-file-copy > span { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.managed-file-copy > span b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: 10px; }
.managed-file-copy > span small, .managed-file-copy > small { color: var(--muted); font-size: 9px; }
.managed-file-copy p { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.managed-file-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.managed-file-actions button, .managed-file-actions a { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; font-size: 9px; text-decoration: none; white-space: nowrap; }
.managed-file-pagination { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.managed-file-pagination span { color: var(--muted); font-size: 10px; }
.managed-file-pagination button { min-height: 32px; padding: 5px 10px; }
@media (max-width: 820px) {
  .managed-file-filters { grid-template-columns: 1fr 1fr; }
  .managed-file-search, .managed-file-filter-actions { grid-column: 1 / -1; }
  .managed-file-filter-actions { justify-content: flex-end; }
  .managed-file-card { grid-template-columns: 44px minmax(0, 1fr); }
  .managed-file-kind { width: 42px; height: 42px; border-radius: 10px; }
  .managed-file-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 520px) {
  .managed-file-dialog { width: 100%; }
  .managed-file-center > header { align-items: flex-start; padding: 11px; }
  .managed-file-filters { grid-template-columns: 1fr; padding: 9px; }
  .managed-file-search, .managed-file-filter-actions { grid-column: auto; }
  .managed-file-filter-actions > * { flex: 1; }
  .managed-file-card { gap: 9px; padding: 9px; }
  .managed-file-actions > * { flex: 1; }
}
