.admin-collections { color: #233144; max-width: 1320px; margin: 0 auto; }
.collections-heading, .collections-list-heading, .collections-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.collections-heading { margin-bottom: 20px; }
.collections-heading h2 { margin: 4px 0 6px; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.collections-heading p, .collections-basis { margin: 0; color: #64748b; line-height: 1.55; }
.collections-eyebrow { font-size: .72rem; letter-spacing: .12em; font-weight: 800; color: #087f69; }
.collections-actions, .collections-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.collections-button, .collections-dialog-heading button { border: 1px solid #d4dee8; border-radius: 10px; background: #fff; color: #243b53; padding: 10px 13px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; min-height: 42px; }
.collections-button:hover:not(:disabled), .collections-dialog-heading button:hover:not(:disabled) { background: #eff8f5; border-color: #93c7b6; }
.collections-button:disabled, .collections-dialog-heading button:disabled { opacity: .5; cursor: not-allowed; }
.collections-button:focus-visible, .admin-collections input:focus-visible, .admin-collections select:focus-visible, .collections-reports summary:focus-visible { outline: 3px solid #78bda9; outline-offset: 3px; }
.collections-filters { display: grid; grid-template-columns: 1.1fr 1fr 1.15fr 1.4fr 1fr; gap: 12px; background: #fff; border: 1px solid #e1e7ed; border-radius: 16px; padding: 16px; }
.collections-filters label { display: flex; min-width: 0; flex-direction: column; gap: 6px; font-size: .78rem; font-weight: 750; color: #4d6074; }
.collections-filters input, .collections-filters select { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #cfd9e3; border-radius: 8px; padding: 10px; min-height: 42px; background: #fff; color: #243b53; font: inherit; font-weight: 500; }
.collections-basis { padding: 12px 2px; font-size: .82rem; }
.collections-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 4px 0 22px; }
.collections-metrics article { border: 1px solid #dae7df; background: #f4faf7; padding: 18px 22px; border-radius: 16px; display: grid; gap: 7px; }
.collections-metrics article + article { background: #fffaf2; border-color: #efe2ca; }
.collections-metrics span { font-size: .82rem; color: #5c6b7d; }
.collections-metrics strong { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.collections-list { border: 1px solid #dde5ed; border-radius: 16px; background: #fff; overflow: hidden; }
.collections-list-heading { padding: 18px 20px; border-bottom: 1px solid #e8edf2; }
.collections-list h3 { font-size: 1rem; margin: 0; }
.collections-table-scroll { overflow-x: auto; }
.admin-collections table { width: 100%; border-collapse: collapse; }
.admin-collections th { color: #718096; text-transform: uppercase; letter-spacing: .06em; font-size: .67rem; background: #f9fbfc; text-align: left; padding: 12px 20px; }
.admin-collections td { font-size: .85rem; padding: 17px 20px; border-bottom: 1px solid #edf1f5; vertical-align: middle; overflow-wrap: anywhere; }
.admin-collections td small { display: block; color: #718096; font-size: .75rem; margin-top: 5px; }
.collections-balance { font-weight: 800; white-space: nowrap; }
.collections-row-actions { justify-content: flex-end; }
.collections-row-actions button:first-child:not(:last-child) { background: #0c8068; color: white; border-color: #0c8068; }
.collections-pagination { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: #64748b; }
.collections-pagination > div { display: flex; gap: 8px; }
.collections-empty { padding: 28px 20px; color: #64748b; text-align: center; }
.collections-reports { margin-top: 20px; border: 1px solid #e0e7ee; border-radius: 14px; background: #fff; padding: 16px 20px; }
.collections-reports > summary { cursor: pointer; font-weight: 750; color: #42566b; }
.collections-reports > p, .collections-report > p { color: #64748b; font-size: .85rem; line-height: 1.6; }
.collections-report { margin-top: 22px; min-width: 0; }
.collections-report > h3 { font-size: 1rem; }
.collections-notice, .collections-dialog-lock { background: #edf8f2; border-radius: 10px; padding: 12px 16px; color: #226848; font-size: .86rem; }
.collections-notice.is-error, .collections-dialog-lock { color: #92400e; background: #fff7e8; }
.collections-dialog { border: 1px solid #dae4e9; border-radius: 20px; padding: 22px; width: min(920px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); box-sizing: border-box; color: #243b53; box-shadow: 0 24px 90px #1b2e4045; }
.collections-dialog::backdrop { background: #13233499; backdrop-filter: blur(3px); }
.collections-dialog-heading { margin-bottom: 16px; }
.collections-dialog-heading h2 { font-size: 1.15rem; margin: 0; }
.collections-dialog-heading button { flex-shrink: 0; }
.collections-entity-dialog { width: min(1280px, calc(100vw - 32px)); }
.collections-detail-body > [hidden], .collections-dialog-lock[hidden] { display: none !important; }
.collections-contract { background: #f3f7fa; border-radius: 10px; padding: 14px; line-height: 1.7; overflow-wrap: anywhere; font-size: .9rem; }
@media (max-width: 1000px) {
  .collections-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collections-search { grid-column: span 2; }
  .admin-collections th, .admin-collections td { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 640px) {
  .collections-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .collections-heading h2 { font-size: 1.45rem; }
  .collections-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; gap: 12px; }
  .collections-search { grid-column: auto; }
  .collections-filters label:last-child { grid-column: span 2; }
  .collections-metrics { gap: 9px; }
  .collections-metrics article { padding: 14px 12px; }
  .collections-metrics span { font-size: .73rem; min-height: 32px; }
  .collections-metrics strong { font-size: 1.4rem; }
  .collections-list-heading { padding: 14px; flex-wrap: wrap; }
  .admin-collections .collections-list table, .admin-collections .collections-list tbody, .admin-collections .collections-list tr, .admin-collections .collections-list td { display: block; }
  .collections-list thead { display: none; }
  .admin-collections .collections-list tr { padding: 16px; border-bottom: 1px solid #e4eaf0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .admin-collections .collections-list td { padding: 0; border: 0; }
  .collections-list td:first-child { grid-column: 1; }
  .collections-list td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .collections-list td.collections-balance { grid-column: 2; grid-row: 1; }
  .collections-list td:last-child { grid-column: span 2; }
  .collections-row-actions { justify-content: flex-start; }
  .collections-row-actions button { flex: 1; }
  .collections-pagination { padding: 14px; }
  .collections-dialog { padding: 15px; border-radius: 16px; width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .collections-reports { padding: 14px; }
}
