#pamDialog .pd-summary,#pamDialog .pd-documents {
  background:#fff;border:1px solid #ccdbd3;border-radius:14px;margin:0 0 14px;padding:14px;
}
#pamDialog .pd-summary>div,#pamDialog .pd-meta {
  display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;
}
#pamDialog .pd-summary h3,#pamDialog .pd-documents h3 {margin:0;color:#142822;font-size:1rem}
#pamDialog .pd-summary p {margin:12px 0;color:#0c513f}
#pamDialog .pd-summary p strong {font-size:clamp(1.4rem,5vw,2rem);font-variant-numeric:tabular-nums}
#pamDialog .pd-summary small,#pamDialog .pd-meta,#pamDialog .pd-documents small {color:#486158;font-size:.84rem}
#pamDialog .pd-summary>small {display:block;margin-top:8px}
#pamDialog .pd-meta {border-top:1px solid #dbe6df;padding-top:10px}
#pamDialog .pd-status {background:#ffedbd;color:#724000;border-radius:8px;padding:5px 9px;font-size:.76rem;font-weight:700}
#pamDialog .pd-status.paid {background:#dbeee1;color:#0c513f}
#pamDialog .pd-documents {padding:0}
#pamDialog .pd-documents section {padding:12px}
#pamDialog .pd-documents section+section {border-top:1px solid #dbe6df}
#pamDialog .pd-documents h3,#pamDialog .pd-buttons button {display:flex;align-items:center;gap:7px}
#pamDialog .pd-documents svg {width:18px;height:18px;flex:none}
#pamDialog .pd-buttons {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:8px}
#pamDialog .pd-buttons button,.pd-dialog button,#pamDialog .pd-wide {
  border:1px solid #b0cbbd;background:white;color:#0c513f;border-radius:8px;padding:7px 10px;min-height:40px;font-weight:700;
}
#pamDialog .pd-buttons button {font-size:.79rem;justify-content:center}
#pamDialog .pd-buttons .pd-download {background:#e8f1eb;border-color:#e8f1eb}
#pamDialog button.pd-primary,.pd-dialog button.pd-primary {background:#0c513f;color:white;border-color:#0c513f}
#pamDialog .pd-wide {display:block;width:100%;margin:12px 0}
#pamDialog #pamPaymentTab[hidden],#pamDialog #pamInvoiceTab[hidden],#pamDialog #pamContext[hidden] {display:none!important}
#pamDialog .pam-tabs:has(#pamPaymentTab[hidden]):has(#pamInvoiceTab[hidden]) {display:none}
#paymentDocumentsNav[hidden] {display:none!important}
#accountContent .wf-card-buttons .pd-list-send {background:#0c513f;color:white;border-color:#0c513f}
#accountContent .wf-card-buttons.pd-single-action {grid-template-columns:minmax(0,1fr)}
.pd-dialog {width:min(94vw,450px);max-height:92dvh;overflow:auto;border:1px solid #cddbd3;border-radius:16px;padding:16px;background:#fff;color:#142822}
.pd-dialog::backdrop {background:#123b30a1}
.pd-dialog header,.pd-dialog footer {display:flex;align-items:center;justify-content:space-between;gap:8px}
.pd-dialog h3 {margin:0}
.pd-dialog .pd-fields {display:grid;gap:12px;margin:14px 0}
.pd-dialog label {display:grid;gap:5px;font-size:.88rem;font-weight:700}
.pd-dialog input,.pd-dialog select {width:100%;min-width:0;border:1px solid #ccdcd4;border-radius:8px;padding:9px;background:white;color:#142822;font:inherit}
.pd-dialog dl {display:grid;grid-template-columns:1fr auto;gap:7px 14px;margin:0;padding:10px;background:#f3f8f5;border-radius:8px}
.pd-dialog dd {margin:0;font-weight:700}
.pd-dialog footer button {flex:1}
.pd-dialog [role=status] {font-size:.85rem;color:#794600}
.pd-metric strong {overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.pd-metric:first-child strong {color:#963329}
.pd-metric:nth-child(2) strong {color:#805100}
.pd-metric:last-child strong {color:#0c513f}
.pd-paid-card {display:grid;gap:7px;border:1px solid #ccdbd3;background:white;border-radius:14px;padding:13px;margin:0 0 12px}
.pd-paid-card>div,.pd-paid-card button {display:flex;align-items:center;justify-content:space-between;gap:6px}
.pd-paid-card>div span {padding:3px 9px;border-radius:8px;background:#dbeee1;color:#0c513f;font-size:.78rem;font-weight:700}
.pd-paid-card b {font-size:1.35rem;color:#0c513f}
.pd-paid-card small {color:#486158}
.pd-paid-card button {padding:8px 10px;border:1px solid #a9c7b9;border-radius:8px;background:white;color:#0c513f;font-weight:700}

.pd-official-invoice .pd-fields { display:grid; gap:9px; }
.pd-official-invoice h4, .pd-official-invoice h5, .pd-official-invoice p { margin:0; }
.pd-official-invoice h4 { font-size:1.05rem; }
.pd-official-invoice h5 { font-size:1rem; }
.pd-official-invoice [data-invoice-note]:not([hidden]) { display:grid; gap:7px; }
.pd-official-invoice [data-invoice-note] label { display:flex; align-items:center; }
.pd-official-invoice [data-invoice-note] input { width:auto; flex:none; }
.pd-official-invoice [data-invoice-note] textarea { width:100%; box-sizing:border-box; resize:vertical; padding:8px; border:1px solid #ccdcd4; border-radius:8px; font:inherit; }
.pd-official-invoice article { margin:0 0 8px; padding:10px; border:1px solid #d9e7df; border-radius:12px; background:white; }
.pd-invoice-field { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:5px 0; }
.pd-invoice-field span { min-width:0; overflow-wrap:anywhere; }
.pd-invoice-field small, .pd-invoice-field strong { display:block; }
.pd-invoice-field button { flex:none; padding:6px 9px; }
.pd-official-invoice footer a { flex:1; text-align:center; text-decoration:none; padding:12px; border-radius:10px; background:#0c513f; color:white; font-weight:700; }
#pamDialog .pd-documents h3 .pd-gib-link { margin-inline-start:auto; font-size:.82rem; color:#0c513f; white-space:nowrap; padding:6px; }
.pd-invoice-viewer { width:min(96vw,800px); }
.pd-invoice-viewer [data-invoice-preview] { margin:10px 0; }
.pd-invoice-viewer canvas, .pd-invoice-viewer img { display:block; max-width:100%; height:auto; margin:0 auto 8px; }

#pamDialog .pd-summary { margin-bottom:9px; padding:12px; }
#pamDialog .pd-summary p { margin:7px 0; }
#pamDialog .pd-meta { padding-top:7px; }
#pamDialog .pd-documents { display:grid; gap:8px; border:0; background:transparent; margin-bottom:8px; }
#pamDialog .pd-documents section { padding:9px; background:white; border:1px solid #ccdbd3; border-radius:12px; min-width:0; }
#pamDialog .pd-documents section:first-child .pd-buttons button { flex:1; }
#pamDialog .pd-documents h3.pd-invoice-heading { justify-content:space-between; gap:4px; }
#pamDialog .pd-invoice-tools { display:flex; gap:5px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
#pamDialog .pd-invoice-tools button, #pamDialog .pd-invoice-tools .pd-gib-link { font:inherit; font-size:clamp(.7rem,2.8vw,.83rem); font-weight:700; color:#0c513f; text-decoration:underline; background:none; border:0; padding:6px 2px; min-height:32px; margin:0; white-space:nowrap; cursor:pointer; }
#pamDialog .pd-invoice-tools .pd-gib-link { display:inline-flex; align-items:center; box-sizing:border-box; }
#pamDialog .pd-file-card { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:5px; padding:7px; border:1px solid #d9e7df; border-radius:10px; margin-top:6px; }
#pamDialog .pd-file-card h4 { display:grid; gap:2px; margin:0; font-size:.92rem; }
#pamDialog .pd-file-card h4>span { display:flex; gap:5px; align-items:center; }
#pamDialog .pd-file-card .pd-buttons { margin:0; flex:0 1 auto; }
#pamDialog .pd-file-card .pd-buttons:empty { display:none; }
#pamDialog .pd-file-card .pd-buttons button { min-height:36px; }
#pamDialog .pd-invoice-file.has-file { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; }
#pamDialog .pd-invoice-file.has-file h4 { display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
#pamDialog .pd-invoice-file.has-file .pd-buttons { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:5px; }
#pamDialog .pd-invoice-file.has-file .pd-buttons button { min-width:0; padding:5px 2px; gap:3px; white-space:nowrap; }
#pamDialog .pd-invoice-file.has-file .pd-buttons svg { width:14px; height:14px; }
#pamDialog .pd-file-card h4 svg { width:18px; height:18px; }
#pamDialog .pd-file-badge { background:#dcf5e4; color:#15533a; padding:3px 7px; border-radius:16px; }
#pamDialog .pd-file-badge.pd-unsigned { background:#ffedc8; color:#735012; }
#pamDialog .pd-receipt-card > .pd-file-card { margin:0; padding:0; border:0; }

#pamDialog .pd-documents section:first-child .pd-buttons { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
#pamDialog .pd-documents section:first-child .pd-buttons button { padding-inline:2px; gap:3px; white-space:nowrap; font-size:clamp(.66rem,2.8vw,.79rem); }
#pamDialog .pd-documents section:first-child .pd-buttons svg { width:14px; height:14px; }
.pd-image-export [data-image-pages] { display:grid; gap:7px; }
.pd-image-export [data-image-pages] a { color:#0c513f; border:1px solid #b0cbbd; border-radius:8px; padding:9px; text-align:center; }
.pd-image-export [data-image-share] { color:white; background:#0c513f; }
.pd-image-export [data-image-share][hidden] { display:none; }

.wf-document-indicators { display:flex; justify-content:flex-end; gap:3px; margin-top:3px; }
.wf-document-indicators span { display:grid; place-items:center; width:20px; height:20px; border-radius:50%; }
.wf-document-indicators svg { display:block; width:13px; height:13px; }
.wf-document-indicators .is-pending { color:#942638; background:#fbe7ea; }
.wf-document-indicators .is-complete { color:#12613e; background:#ddf2e4; }
.wf-document-indicators .is-unknown { color:#5d6a64; background:#edf1ef; }

#cashAccountDialog.fa-bank { background:#edf6f0!important; }
#cashAccountDialog.fa-bank .cash-dialog-head { display:grid; grid-template-columns:36px minmax(0,1fr) 36px; text-align:center; padding:10px 12px; }
#cashAccountDialog.fa-bank .cash-dialog-head h2 { margin:0; font-size:20px; }
#cashAccountDialog.fa-bank #cashAccountRegion { display:none; }
#cashAccountDialog.fa-bank .cash-dialog-body { padding:12px; }
#cashAccountDialog.fa-bank .cm-balance { background:white; padding:13px; margin:0; border:1px solid #bad7c5; border-radius:13px; }
#cashAccountDialog.fa-bank .cm-balance h3 { margin:0 0 10px; font-size:17px; }
#cashAccountDialog.fa-bank .bank-balance-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#cashAccountDialog.fa-bank .bank-balance-grid > div { min-width:0; }
#cashAccountDialog.fa-bank .bank-balance-grid > div+div { border-left:1px solid #d5e4d9; padding-left:9px; }
#cashAccountDialog.fa-bank .bank-balance-grid small { display:block; color:#4f6058; }
#cashAccountDialog.fa-bank .bank-balance-grid strong { display:block; padding:2px 0 0; font-size:clamp(15px,5vw,24px); overflow-wrap:anywhere; }
.bank-filters[hidden],.bank-more[hidden] { display:none!important; }
.bank-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; margin:12px 0 8px; }
.bank-filters button { display:flex; justify-content:center; align-items:center; gap:3px; padding:0 1px; min-height:37px; border:1px solid #bad7c5; border-radius:8px; font-size:clamp(11px,3.1vw,14px); font-weight:700; color:#114932; background:white; }
.bank-filters button[aria-pressed="true"] { color:white; background:#07513a; border-color:#07513a; }
.bank-filters svg { width:15px; height:15px; flex:none; }
.bank-more { margin:0 0 10px; font-size:12px; color:#365f4c; }
.bank-more summary { cursor:pointer; padding:4px 0; }
#cashAccountDialog.fa-bank #cashHistoryRows { display:block; border:1px solid #bad7c5; border-radius:12px; background:white; padding:0 9px; }
#cashAccountDialog.fa-bank #cashHistoryRows .cm-row { margin:0; padding:10px 0; border:0; border-radius:0; box-shadow:none; background:transparent; }
#cashAccountDialog.fa-bank #cashHistoryRows .cm-row+.cm-row { border-top:1px solid #d4e5da; }
#cashAccountDialog.fa-bank .cm-row-main { display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:6px; align-items:center; }
#cashAccountDialog.fa-bank .cm-row-main strong { max-width:none; font-size:clamp(12px,3.7vw,16px); white-space:nowrap; }
#cashAccountDialog.fa-bank .cm-row-label h4 { line-height:1.2; overflow-wrap:anywhere; }
#cashAccountDialog.fa-bank .cm-row-label small { font-size:11px; }
.bank-movement-icon { display:grid; place-items:center; width:30px; height:30px; color:#116136; background:#dff3e4; border-radius:50%; }
.bank-movement-icon svg { width:16px; height:16px; }
.bank-movement-icon.bank-expense { color:#a72535; background:#fae4e6; }
@media (max-width:650px) {
  #cashAccountDialog.fa-bank { width:100%!important; max-width:100%!important; height:100dvh!important; max-height:100dvh!important; margin:0!important; border-radius:0!important; }
}

#managerAccountDialog .et-income-balance { position:relative; }
#managerAccountDialog .et-income-balance > .sm-cash > summary { min-height:151px; padding-bottom:61px; }
#managerAccountDialog .et-income-button {
 position:absolute; inset:100px 14px auto; min-height:37px; border:1px solid #ffffffa0;
 border-radius:9px; background:#ffffff13; color:#fff; font:inherit; font-weight:700; cursor:pointer;
}
#managerAccountDialog .et-income-button:focus-visible { outline:2px solid white; outline-offset:2px; }

#cashAccountDialog.fm-cash #cashHistoryRows .fm-record-detail summary { width:max-content; max-width:100%; margin-inline-start:auto; }
#cashAccountDialog.fm-cash #cashHistoryRows .fm-lender { font-weight:650; white-space:normal; overflow-wrap:anywhere; }
#cashAccountDialog.fm-cash #cashHistoryRows .fm-record-text p:empty { display:none; }

#adminMediaHandoff [data-handoff-status]{color:#a82437;font-weight:700;margin:.4rem 0}#adminMediaHandoff [data-handoff-status]:empty{display:none}#adminMediaHandoff button[hidden]{display:none!important}#adminMediaHandoff button{margin-block:4px}

#adminMediaBulkTools[hidden] { display: none; }
#adminMediaBulkTools { margin: 0 0 .65rem; }
.admin-media-bulk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.admin-media-bulk-actions b { padding: .25rem; }
.admin-media-bulk-actions button { padding: .45rem .65rem; }
#adminMediaBulkTools p { margin: .35rem 0; }
#adminMediaBulkTools p:empty { display: none; }
.amc-info .admin-media-select { display: inline-flex; align-items: center; gap: .35rem; width: fit-content; padding: .15rem 0; }
.amc-info .admin-media-select input { width: auto; margin: 0; }
.amc-info .admin-media-delivered-text { color: #a62535; font-weight: 700; }

#adminMediaBulkTools[hidden], .amd-active [hidden] { display: none; }
#amdDrawerTitle { display: none; }
#panelDrawer:has(#completedView.amd-active:not(.hidden)) > .drawer-head { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; align-items: center; }
#panelDrawer:has(#completedView.amd-active:not(.hidden)) > .drawer-head > #amdDrawerTitle { display: block; grid-area: 1 / 2; margin: 0; text-align: center; font-size: clamp(1rem,4.5vw,1.35rem); line-height: 1.2; color: #fff; }
#panelDrawer:has(#completedView.amd-active:not(.hidden)) > .drawer-head > #panelBack { grid-area: 1 / 1; }
#panelDrawer:has(#completedView.amd-active:not(.hidden)) > .drawer-head > #panelClose { grid-area: 1 / 3; }
#completedView.amd-active > h2 { display: none; }
#completedView:not(.amd-active) #amdOrgPicker { display: none; }
.amd-active #amcFilter { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: stretch; gap: .45rem; }
.amd-active #amcFilter > :has(#amcName) { order: -1; }
.amd-active #amcFilter > div > label, .amd-active #amcOrg { display: none; }
.amd-active #amcName, .amd-active #amdOrgPicker > summary { min-height: 2.65rem; min-width: 0; width: 100%; box-sizing: border-box; }
.amd-active #amcSortToggle { min-height: 2.65rem; }
.amd-active #amdOrgPicker { position: relative; min-width: 0; }
.amd-active #amdOrgPicker > summary { display: flex; align-items: center; gap: .3rem; overflow: hidden; white-space: nowrap; border: 1px solid #bdcfc6; border-radius: .55rem; background: white; padding: .4rem .55rem; cursor: pointer; font-size: .86rem; }
.amd-active #amdOrgPicker > summary::after { content: '⌄'; margin-inline-start: auto; }
.amd-org-panel { position: absolute; z-index: 5; width: max(100%, 12rem); right: 0; background: white; border: 1px solid #becfc5; padding: .45rem; border-radius: .55rem; box-shadow: 0 6px 18px #203d2e22; }
.amd-org-panel input { width: 100%; }
.amd-org-results { max-height: 15rem; overflow: auto; }
.amd-org-results button { display: block; width: 100%; padding: .55rem; text-align: left; background: white; color: #173b31; }
.amd-org-results button:hover, .amd-org-results button:focus-visible { background: #e6f2ea; }
.amd-active #adminMediaBulkTools { margin-block: .6rem .35rem; }
.amd-active .admin-media-bulk-actions, .amd-card-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .35rem; }
.amd-active .admin-media-bulk-actions > *, .amd-card-actions button { display: flex; align-items: center; justify-content: center; gap: .25rem; min-width: 0; min-height: 2.5rem; padding: .25rem .15rem; white-space: nowrap; border-radius: .55rem; font-weight: 700; font-size: clamp(.62rem, 2.55vw, .875rem); }
.amd-active .admin-media-bulk-actions label, .amd-card-actions button { background: #fff; color: #13523f; border: 1px solid #669785; }
.amd-card-actions > div { min-width: 0; }
.amd-card-actions button { width: 100%; }
.amd-active .admin-media-bulk-actions button[data-admin-bulk="download"] { background: #dceee3; color: #13523f; }
.amd-active .admin-media-bulk-actions button[data-admin-bulk="whatsapp"] { background: #096044; color: #fff; }
.amd-active .admin-media-bulk-actions input, .amd-brand input { width: 1.12rem; height: 1.12rem; margin: 0; accent-color: #106748; }
.amd-active .admin-media-bulk-actions svg, .amd-card-actions svg, .amd-file-download svg, .amd-play svg { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; }
.amd-active #adminMediaBulkTools p, .amd-card-status { margin: .25rem 0; font-size: .78rem; }
.amd-active #adminMediaBulkTools p:empty, .amd-card-status:empty { display: none; }
.amd-card-status button { display: block; margin-top: .3rem; }
.amd-active #completedRows .amc-card { box-sizing: border-box; display: block; padding: .55rem; border: 1px solid #cfddd5; border-radius: .75rem; background: #fff; }
.amd-card-head { display: grid; grid-template-columns: 2.45rem minmax(0,1fr) auto; align-items: start; gap: .5rem; margin-bottom: .5rem; }
.amd-brand, .amd-meta { display: grid; justify-items: center; align-content: start; gap: .16rem; }
.amd-brand { gap: .28rem; }
.amd-brand img, .amd-brand span { width: 2.4rem; height: 2.4rem; object-fit: contain; border-radius: .4rem; background: #ecf3ee; display: grid; place-items: center; color: #13523f; font-weight: 700; }
.amd-identity { display: grid; gap: .12rem; line-height: 1.2; overflow-wrap: anywhere; align-self: start; color: #182e27; }
.amd-identity b { color: #12543e; font-size: clamp(.78rem,3.3vw,1.04rem); }
.amd-identity strong { font-size: clamp(.82rem,3.6vw,1.08rem); }
.amd-identity span { font-size: clamp(.67rem,2.75vw,.9rem); }
.amd-meta button { font: inherit; font-size: .72rem; font-weight: 700; line-height: 1.2; padding: .12rem .44rem; min-height: 0; border: 1px solid #669785; border-radius: .35rem; background: white; color: #13523f; }
.amd-meta b { font-size: .72rem; color: #13523f; background: #e1efe4; border-radius: .4rem; padding-inline: .35rem; }
.amd-meta small { color: #4a5a55; font-size: .65rem; line-height: 1.05; white-space: nowrap; }
.amd-strip { display: flex; overflow-x: auto; gap: .3rem; padding-bottom: .25rem; min-height: 3rem; }
.amd-tile { position: relative; flex: 0 0 calc((100% - .9rem)/4); aspect-ratio: 1.13; min-width: 3.45rem; overflow: hidden; border-radius: .5rem; background: #e5ede9; }
.amd-tile > [data-amd-preview], .amd-thumb { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; background: #e5ede9; color: #355d50; font-size: .73rem; }
.amd-thumb img, .amd-thumb video { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; pointer-events: none; }
.amd-play, .amd-file-download, .amd-duration { position: absolute; color: white; background: #142820d9; }
.amd-play { left: 50%; top: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; padding: .25rem; border-radius: 50%; }
.amd-tile .amd-file-download { top: .2rem; right: .2rem; display: grid; place-items: center; border: 0; padding: .15rem; border-radius: .3rem; }
.amd-duration { right: .2rem; bottom: .2rem; border-radius: .23rem; padding: .05rem .23rem; line-height: 1.15; font-size: .65rem; }
.amd-card-actions { margin-top: .35rem; }
.amd-active .admin-media-delivered-text { display: block; margin: .2rem 0 0; color: #a62535; font-size: .7rem; font-weight: 700; text-align: center; }
.amd-active .admin-media-delivered-text:empty { display: none; }
#amdPreviewTools[hidden] { display: none; }
#amdPreviewTools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .4rem; padding: .45rem .7rem; }
#amdPreviewTools span { flex: 1 1 100%; font-size: .75rem; overflow-wrap: anywhere; }
#amdPreviewTools button, .amd-caption button { font-size: .8rem; padding: .35rem .65rem; }
.amd-caption { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-block: .35rem; }
.amd-caption summary { cursor: pointer; }
.amd-caption textarea { display: block; width: min(18rem,65vw); max-width: 100%; }
.amd-whatsapp-guide { margin: .35rem 0; line-height: 1.4; }
.amd-file-retry button { display: block; margin-block: .25rem; max-width: 100%; overflow-wrap: anywhere; }

.amd-identity .amd-reference {display:flex;align-items:center;flex-wrap:wrap;column-gap:.25em;color:#4a5a55;font-size:clamp(.61rem,2.5vw,.75rem);font-variant-numeric:tabular-nums}
.amd-reference span {font-size:inherit;white-space:nowrap}
.amd-reference span+span::before {content:"·";margin-right:.25em}
.amd-meta .amd-counts {display:flex;gap:.55rem;padding:.18rem .15rem 0}
.amd-meta .amd-count {position:relative;display:inline-flex;color:#13523f}
.amd-count svg {width:1.12rem;height:1.12rem}
.amd-count b {position:absolute;right:-.18rem;top:-.25rem;min-width:.7rem;padding:0 .12rem;border-radius:1rem;background:#146747;color:white;font-size:.58rem;line-height:.75rem;text-align:center;box-shadow:0 0 0 1px white}
#cgFiles h3 small {display:inline-block;margin-left:.25em;padding:0 .43em;border-radius:1rem;background:#d0e5d6;color:#144c39;font-size:.8em}

.amd-meta button.amd-count {padding:0;border:0;background:transparent;min-height:1.3rem}
.amd-meta button.amd-count:focus-visible {outline:2px solid #147456;outline-offset:4px}
#completedGallery {width:min(calc(100vw - 20px),580px);max-height:calc(100dvh - 36px);border-radius:15px;background:#fff;color:#142c25;box-shadow:0 14px 48px #102d2550}
#completedGallery::backdrop {background:#102d2596}
#completedGallery header {grid-template-columns:44px minmax(0,1fr) 44px;min-height:48px;padding:0 8px;background:#0c513e}
#completedGallery h2 {grid-column:2;font-size:clamp(1rem,4.5vw,1.27rem)}
#completedGallery header button {grid-column:3;color:#fff}
#completedGallery .cg-scroll {padding:0 10px;flex:0 1 auto}
#completedGallery .cg-record,#completedGallery .cg-tools {margin:0;padding:.65rem .32rem;gap:.5rem;border-radius:0;border-bottom:1px solid #d5e3da;background:#fff}
#completedGallery .cg-record {display:flex;flex-direction:row;justify-content:space-between;align-items:center}
#completedGallery .cg-record div {display:grid;gap:.2rem;overflow-wrap:anywhere}
#completedGallery .cg-record strong {font-size:clamp(.91rem,4vw,1.12rem);line-height:1.15}
#completedGallery .cg-record small {font-size:.82rem;color:#52645d}
#completedGallery .cg-reference {flex:none;white-space:nowrap;color:#0b523e;font-size:.9rem}
#completedGallery .cg-tools {font-size:.85rem}
#completedGallery label {font-weight:600}
#completedGallery input[type=checkbox] {width:20px;height:20px;margin:0;accent-color:#0c5943}
#cgFiles details {padding:.32rem 0;border-bottom:1px solid #d5e3da;background:#fff}
#cgFiles summary {display:flex;align-items:center;gap:.5rem;min-height:35px;padding:.2rem .32rem;cursor:pointer;list-style:none}
#cgFiles summary::-webkit-details-marker {display:none}
#cgFiles .cg-section-icon {display:grid;place-items:center;width:25px;height:25px;border-radius:5px;background:#deeee2;color:#0c513e}
#cgFiles .cg-section-icon svg {width:17px;height:17px}
#cgFiles h3 {display:flex;align-items:center;gap:.38rem;padding:0;background:none;font-size:.97rem}
#cgFiles .cg-chevron {width:20px;height:20px;margin-left:auto;color:#0c513e}
#cgFiles details:not([open]) .cg-chevron {transform:rotate(-90deg)}
#cgFiles article {padding:.27rem .36rem;gap:.55rem;border:0;border-radius:7px;min-height:50px}
#cgFiles article+article {margin-top:2px}
#cgFiles .cg-selected {background:#e2efe4}
#cgFiles .cg-preview {gap:.55rem;font-size:.86rem}
#cgFiles .cg-thumb {width:clamp(75px,27vw,114px);height:clamp(42px,15vw,62px)}
#cgFiles .cg-thumb :is(img,video) {z-index:0}
#cgFiles .cg-play {position:relative;z-index:1;display:grid;place-items:center;width:25px;height:25px;padding-left:1px;border-radius:50%;background:#11251acf;color:#fff;font:700 12px/1 system-ui,sans-serif}
#cgFiles .cg-duration {z-index:1}
#cgFiles .cg-trash {min-height:30px;padding:.2rem .36rem}
#completedGallery footer {display:grid;grid-template-columns:1fr 1.18fr;gap:7px;padding:8px 10px}
#completedGallery footer button {min-width:0;padding:.35rem .2rem;border-color:#196047;font-size:clamp(.78rem,3.6vw,.95rem)}
#completedGallery #cgRemove {background:#a91425;border-color:#a91425}
@media(max-width:600px) {
  #completedGallery[open] {height:auto;max-height:calc(100dvh - 36px);border-radius:15px}
}

.amd-active .admin-media-bulk-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
