:root { color-scheme: light; font: 1rem/1.6 system-ui, sans-serif; color: #20382e; background: #f4f2e9; }
body { margin: 0; padding: 1.5rem; }
main { max-width: 42rem; margin: 8vh auto; }
h1 { font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1.1; }
.label { font-weight: 700; color: #6b4823; }
a { display: inline-block; padding: .75rem 1rem; background: #20382e; color: white; border-radius: .35rem; }
a:focus-visible { outline: 3px solid #a44d14; outline-offset: 4px; }
small { display: block; margin-top: 2rem; }
label { display: block; font-weight: 600; margin-top: 1rem; }
input { display: block; box-sizing: border-box; width: 100%; max-width: 30rem; padding: .75rem; font: inherit; border: 1px solid #6b776e; border-radius: .35rem; }
button { margin-top: 1.25rem; padding: .75rem 1rem; border: 0; border-radius: .35rem; font: inherit; background: #20382e; color: white; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid #a44d14; outline-offset: 4px; }
#message { min-height: 1.6em; }
nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
nav a[aria-current="page"] { background: #6b4823; }
.administrators-list { display: grid; gap: 1rem; }
.administrator-card { background: white; border: 1px solid #b9c1b9; border-radius: .5rem; padding: 1rem; overflow-wrap: anywhere; }
.administrator-card h3 { margin: 0 0 .75rem; }
.administrator-card dl { margin: 0; }
.administrator-card dt { font-weight: 600; }
.administrator-card dd { margin: 0 0 .5rem; }
#create-admin-form { margin-top: 1rem; padding: 1rem; border: 1px solid #b9c1b9; border-radius: .5rem; }
#password-help { max-width: 30rem; font-size: .9rem; }
@media (min-width: 42rem) {
  .administrator-card dl { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .5rem 1rem; }
  .administrator-card dd { margin: 0; }
}

select { display: block; box-sizing: border-box; width: 100%; max-width: 30rem; padding: .75rem; font: inherit; border-radius: .35rem; }
[hidden] { display: none !important; }
#records, #associated, #link-panel { margin-top: 1.5rem; }
#link-panel { padding: 1rem; border: 2px solid #6b4823; border-radius: .5rem; }
#registry-message { overflow-wrap: anywhere; }
button + button { margin-left: .4rem; }

#upload-area progress { width: 100%; accent-color: #20382e; }
#upload-area { margin-top: 2rem; }
#upload-message { overflow-wrap: anywhere; }
#upload-list { margin-top: 1rem; }
.upload-row-actions { display: flex; flex-wrap: wrap; gap: .5rem; }


.operations-page { max-width: 79rem; margin: 3rem auto; }
.operations-page h1 { margin: 1.4rem 0; }
.operations-page button { margin: 0; padding: .45rem .8rem; }
.operations-page button:disabled { cursor: default; }
.operations-page select { max-width: none; padding: .4rem; }
.materials-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); align-items: end; gap: .65rem; }
.materials-filters label { margin: 0; }
.materials-actions { margin-top: 1rem; }
.compact-actions, .storage-heading, .admin-session { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.storage-heading { justify-content: space-between; }
.admin-session { padding-block: .5rem; border-bottom: 1px solid #b9c1b9; }
#selection, .operations-page #message { margin: .4rem 0; min-height: 0; overflow-wrap: anywhere; }
.operations-page #message:empty, #storage-message:empty, #confirmation-status:empty { display: none; }
.table-scroll { overflow-x: auto; margin: .75rem 0; border: 1px solid #b9c1b9; border-radius: .5rem; background: #fff; }
.table-scroll:focus-visible, #confirmation-files:focus-visible { outline: 3px solid #a44d14; outline-offset: 2px; }
.materials-table { width: 100%; min-width: 56rem; border-collapse: collapse; text-align: left; }
.materials-table #records { margin: 0; }
.materials-table th, .materials-table td { padding: .4rem .55rem; border-bottom: 1px solid #dce0d9; overflow-wrap: anywhere; }
.materials-table thead { background: #e7ece3; }
.materials-table tbody tr:last-child > * { border-bottom: none; }
.materials-table tbody tr:nth-child(even) { background: #f7f8f4; }
.materials-table thead th:first-child { white-space: nowrap; }
.materials-table th.file-name { min-width: 9rem; max-width: 18rem; }
.materials-table .file-name-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.materials-table td:nth-child(7), .materials-table td:nth-child(8) { white-space: nowrap; }
.materials-table input[type=checkbox], .check-label input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: #20382e; flex: 0 0 auto; }
.operations-page .info-button { padding: .2rem .5rem; font-size: 1.2rem; line-height: 1.2; background: transparent; color: #20382e; }
.operations-page .danger { background: #992d26; }
.operations-page dialog { box-sizing: border-box; width: min(37rem, calc(100vw - 1.5rem)); max-height: calc(100% - 1.5rem); overflow: auto; border: 1px solid #b9c1b9; border-radius: .7rem; padding: clamp(1rem, 4vw, 1.6rem); background: #fff; color: inherit; box-shadow: 0 1rem 3rem #14271e44; }
dialog::backdrop { background: #14271eaa; }
html:has(.operations-page) { scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
.operations-page dialog h2 { margin-top: 0; line-height: 1.2; }
#confirmation-files { max-height: 25vh; overflow: auto; padding-inline-start: 1.5rem; overflow-wrap: anywhere; }
.check-label { display: flex; gap: .65rem; align-items: baseline; margin-bottom: 1rem; }
.metadata { display: grid; grid-template-columns: minmax(6rem, 1fr) 2fr; gap: .35rem 1rem; overflow-wrap: anywhere; }
.metadata dt { font-weight: 600; }
.metadata dd, .storage-kpis dd { margin: 0; }
.storage-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .7rem; }
.storage-kpis > div, .storage-panel { background: #fff; border: 1px solid #b9c1b9; border-radius: .5rem; padding: .8rem 1rem; }
.storage-kpis dd { font-size: 1.5rem; font-weight: 700; }
.storage-panel label { margin-top: 0; }
.storage-panel progress { width: 100%; accent-color: #346249; }
.storage-alert { padding: .6rem .8rem; background: #f9ebd7; border: 1px solid #91400f; color: #622b10; border-radius: .4rem; }
@media (max-width: 42rem) {
  body:has(.operations-page) { padding: .85rem; }
  .operations-page { margin: 1.2rem auto; }
  .operations-page nav a { padding: .45rem .65rem; }
  .operations-page .metadata { grid-template-columns: 1fr; }
  .operations-page .metadata dd { margin-bottom: .35rem; }
}

.icon-toolbar, .icon-group { display: flex; align-items: center; gap: .25rem; }
.icon-toolbar { flex-wrap: wrap; gap: .25rem .55rem; }
.icon-toolbar .icon-group + .icon-group { border-inline-start: 1px solid #b9c1b9; padding-inline-start: .55rem; }
.icon-button svg, .media-type svg, .upload-success-icon { width: 1.28rem; height: 1.28rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button, .operations-page .icon-button { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .07rem; padding: .25rem; min-width: 2.75rem; min-height: 2.75rem; margin: 0; line-height: 1; }
.icon-button + .icon-button { margin-inline-start: 0; }
.icon-button:not(:disabled):hover { filter: brightness(1.18); }
.icon-button:disabled { opacity: .42; cursor: default; }
.icon-caption { font-size: .65rem; }
.icon-button[data-tooltip]:focus-visible::after, .icon-button[data-tooltip]:hover::after {
  content: attr(data-tooltip); position: absolute; z-index: 2; top: calc(100% + .28rem); left: 0;
  width: max-content; max-width: 12rem; padding: .28rem .5rem; border-radius: .3rem;
  background: #20382e; color: white; font-size: .78rem; line-height: 1.25; pointer-events: none;
}
.icon-group:last-child .icon-button::after { left: auto; right: 0; }
.icon-button.whatsapp { background: #1d683c; }
.icon-button.danger { background: #992d26; }
.operations-page .info-button, .operations-page .copy-detail { color: #20382e; background: transparent; }
.info-button .icon-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.copy-detail { vertical-align: middle; }
#clipboard-status:empty { display: none; }
.media-type { display: inline-flex; gap: .24rem; align-items: center; white-space: nowrap; }
.media-type.compact-type { display: none; }
.materials-table { min-width: 0; }
#confirmation-files { max-height: min(25dvh, 14rem); }
@media (max-width: 62rem) { .materials-table .received-col { display: none; } }
@media (max-width: 52rem) { .materials-table .leader-col { display: none; } }
@media (max-width: 45rem) { .materials-table .trip-col { display: none; } }
@media (max-width: 36rem) {
  .icon-toolbar { gap: .25rem; }
  .icon-toolbar .icon-group + .icon-group { padding-inline-start: .25rem; }
  .materials-table { font-size: .84rem; }
  .materials-table th, .materials-table td { padding: .26rem .21rem; }
  .materials-table th.file-name { min-width: 0; }
  .materials-table .file-type-col { display: none; }
  .materials-table .media-type.compact-type { display: inline-flex; font-size: .72rem; color: #375e4c; }
  .compact-type svg { width: .92rem; height: .92rem; }
  .materials-table th:nth-child(1), .materials-table th:nth-child(2) { width: 2.75rem; text-align: center; }
  .materials-table td:nth-child(1) input { margin: auto; }
  .materials-table td:nth-child(7) { min-width: 3.35rem; white-space: normal; }
  .materials-table td:last-child { min-width: 4.1rem; }
}
@media (hover: none) { .icon-button[data-tooltip]::after { display: none; } }
.upload-success-icon { color: #257448; width: 2.3rem; height: 2.3rem; }
#upload-completion { box-sizing: border-box; width: min(32rem, calc(100vw - 1.5rem)); max-height: calc(100% - 1.5rem); border: 1px solid #b9c1b9; border-radius: .7rem; padding: 1.2rem; background: #fff; color: inherit; }
