/* File-card motion from the supplied reference, using Artery's palette. */
.au-shelf { position: fixed; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); width: min(400px, calc(100vw - 32px)); max-height: 45dvh; overflow-y: auto; display: grid; gap: 10px; padding: 4px; z-index: 10010; pointer-events: none; }
.au-shelf:empty { display: none; }
.au-card { --au-progress: 0; position: relative; isolation: isolate; overflow: hidden; border-radius: 16px; padding: 18px; background: var(--surface); color: var(--text); font-family: var(--font-body); box-shadow: 0 6px 28px var(--border-med); pointer-events: auto; animation: au-enter 300ms var(--ease-spring) both; }
.au-wash { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, transparent, var(--green-dim)); transform: scaleX(var(--au-progress)); transform-origin: left; transition: transform 480ms var(--ease), opacity 450ms ease; border-right: 1px solid var(--green-dim); }
.au-row { display: flex; align-items: center; gap: 14px; min-height: 42px; }
.au-file { flex: 0 0 34px; height: 42px; display: grid; place-content: end center; padding-bottom: 7px; position: relative; clip-path: polygon(0 0, 70% 0, 100% 24%, 100% 100%, 0 100%); border-radius: 5px; background: var(--green); color: var(--ticker-fg); font-size: 9px; font-weight: 700; }
.au-file::before { content: ''; position: absolute; width: 11px; height: 9px; left: 7px; top: 8px; background: repeating-linear-gradient(0deg, var(--ticker-fg) 0 1px, transparent 1px 4px); opacity: .85; }
.au-copy { flex: 1; min-width: 0; }
.au-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.5; font-weight: 650; }
.au-meta { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 4px; font-size: 12px; line-height: 1.5; }
.au-status { color: var(--text-2); }
.au-detail { color: var(--text-2); font-variant-numeric: tabular-nums; }
.au-dismiss { align-self: flex-start; }
.au-dismiss[hidden], .au-message[hidden] { display: none; }
.au-dismiss:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.au-track-wrap { height: 5px; overflow: hidden; margin-top: 14px; transition: height 400ms ease, margin-top 400ms ease, opacity 300ms ease; }
.au-track { height: 5px; min-height: 0; overflow: hidden; border-radius: 5px; background: var(--border); }
.au-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-dim), var(--green)); transform: scaleX(var(--au-progress)); transform-origin: left; transition: transform 480ms var(--ease); }
.au-card[data-state="working"] .au-fill { width: 35%; transform: none; animation: au-wait 1.6s ease-in-out infinite; }
.au-card[data-state="complete"] .au-track-wrap, .au-card[data-state="skipped"] .au-track-wrap, .au-card[data-state="error"] .au-track-wrap { height: 0; margin-top: 0; opacity: 0; }
.au-card[data-state="working"] .au-wash { opacity: 0; }
.au-card[data-state="complete"] .au-wash, .au-card[data-state="skipped"] .au-wash, .au-card[data-state="error"] .au-wash { opacity: 0; }
.au-card[data-state="complete"] .au-status::before { content: '✓'; display: inline-grid; place-content: center; width: 14px; height: 14px; margin-right: 5px; border-radius: 50%; color: var(--ticker-fg); background: var(--green); font-size: 10px; animation: au-check 300ms var(--ease-spring) both; }
.au-card[data-state="error"] .au-status { color: var(--text); }
.au-card[data-state="skipped"] .au-status { color: var(--text-2); }
.au-message { margin-top: 10px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; color: var(--text-2); }
@keyframes au-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes au-wait { from { transform: translateX(-110%); } to { transform: translateX(390%); } }
@keyframes au-check { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .au-card, .au-card *, .au-card *::before { animation: none !important; transition: none !important; } .au-card[data-state="working"] .au-fill { transform: translateX(95%); } }

/* Branded statement/contract picker and progress window. Native dialog owns
   focus containment, Escape semantics and the top layer. */
.au-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 28px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); color: var(--text); font-family: var(--font-body); overflow-y: auto; box-shadow: 0 24px 90px var(--border-med); }
.au-dialog[open] { animation: au-enter 240ms var(--ease-spring) both; }
.au-dialog::backdrop { background: color-mix(in srgb, var(--text) 20%, transparent); backdrop-filter: blur(7px); }
.au-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.au-wordmark { display: block; width: 82px; height: auto; }
body[data-theme="dark"] .au-wordmark { filter: brightness(1.25) saturate(.8); }
/* Use My Team's shared close design, positioned inside this dialog. */
.au-dialog-close, .au-dismiss { position: static; top: auto; right: auto; z-index: auto; flex: 0 0 38px; }
.au-dismiss[hidden] { display: none; }
.au-dialog-title { margin: 0 0 8px; font: 600 26px/1.2 var(--font-body); letter-spacing: -.8px; }
.au-dialog-description { margin: 0 0 24px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.au-drop { display: flex; width: 100%; min-height: 164px; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 24px 16px; border: 1px dashed var(--border-med); border-radius: 16px; background: var(--surface-2); color: var(--text); font-family: var(--font-body); cursor: pointer; transition: background 160ms ease; }
.au-drop:hover, .au-drop.au-dragover { background: var(--green-dim); }
.au-drop strong { font-size: 13px; font-weight: 550; }
.au-drop-glyph { display: grid; place-content: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 13px; background: var(--surface); color: var(--text); font: 25px/1 var(--font-body); }
.au-types { max-width: 100%; color: var(--text-2); font-size: 10px; line-height: 1.7; letter-spacing: .4px; overflow-wrap: anywhere; }
.au-folder { display: block; margin: 10px auto 0; padding: 6px 12px; border: 1px solid var(--border-med); border-radius: 999px; background: var(--surface); color: var(--text); font: 11px var(--font-body); cursor: pointer; }
.au-folder:hover { background: var(--green-dim); }
.au-selected-file { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--border); font-size: 12px; }
.au-selected-file > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-fields { margin-top: 18px; }
.au-fields:empty { display: none; }
.au-field { display: grid; gap: 7px; color: var(--text-2); font-size: 12px; }
.au-fields input, .au-fields select { width: 100%; min-width: 0; height: 40px; border: 1px solid var(--border-med); border-radius: 9px; background: var(--surface); color: var(--text); padding: 8px 11px; font: 13px var(--font-body); }
/* Match Settings' chevron, with room between the arrow and the field edge. */
.au-field select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px;
}
.au-fields .cx-form { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0; margin: 0; background: none; border: 0; }
.au-field-hint { margin-top: 7px; color: var(--text-2); font-size: 11px; line-height: 1.5; }
.au-dialog-queue { display: grid; gap: 12px; padding: 3px; margin: 0 -3px; }
.au-dialog-queue:empty { display: none; }
.au-dialog-queue .au-card { box-shadow: none; background: var(--surface-2); }
.au-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.au-dialog-note { color: var(--text-2); font-size: 11px; line-height: 1.6; max-width: 210px; }
.au-primary { flex-shrink: 0; min-height: 40px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--green); color: var(--ticker-fg); font: 550 12px var(--font-body); cursor: pointer; }
.au-primary:disabled { opacity: .45; cursor: default; }
.au-dialog button:focus-visible, .au-dialog input:focus-visible, .au-dialog select:focus-visible, .au-resume:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.au-selection[hidden], .au-fields[hidden], .au-resume[hidden] { display: none; }
.au-resume { position: fixed; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 10010; padding: 12px 18px; border: 1px solid var(--border-med); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 4px 22px var(--border); font: 12px var(--font-body); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .au-dialog[open], .au-drop { animation: none; transition: none; } .au-dialog::backdrop { backdrop-filter: none; } }

.au-currency-result { margin: 8px 0 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
