/* Administrator workspace */
.admin-layout { min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 22px; padding: 20px 18px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.sidebar .brand { padding: 0 4px; font-size: 19px; }
.sidebar-nav { display: flex; gap: 5px; overflow-x: auto; padding: 0 0 13px; scrollbar-width: thin; }
.sidebar-link { display: flex; align-items: center; gap: 11px; flex-shrink: 0; min-height: 44px; padding: 10px 13px; border-radius: 7px; color: #4a5e7b; font-size: 13px; white-space: nowrap; }
.sidebar-link:hover { background: #f3f7fd; color: #235a9f; }
.sidebar-link.is-active { color: #1760d6; background: #eaf2ff; font-weight: 600; }
.sidebar-link .icon { width: 19px; height: 19px; }
.sidebar-note, .sidebar-profile { display: none; }
.admin-workspace { min-width: 0; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 0 20px; border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumb { color: #61738d; font-size: 12px; }
.breadcrumb span { margin: 0 11px; color: #a5b2c5; }
.workspace-actions { display: flex; align-items: center; gap: 22px; }
.account-link { display: flex; align-items: center; gap: 8px; color: #465a76; font-size: 12px; }
.admin-view { max-width: 1550px; margin: 0 auto; padding: 25px 18px 10px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.page-title h1 { margin: 0 0 7px; font-size: clamp(23px, 2.4vw, 29px); line-height: 1.3; letter-spacing: -.7px; }
.page-title p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 7px; color: #657e9f; font-size: 11px; font-weight: 500; letter-spacing: 1px; }
.page-title .button { flex-shrink: 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 23px; }
.stat { display: flex; align-items: center; justify-content: flex-start; gap: 13px; min-width: 0; min-height: 95px; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.stat-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 auto; border: 1px solid #e1ebfc; border-radius: 8px; color: #2676ed; background: #f0f6ff; }
.stat-icon .icon { width: 24px; height: 24px; }
.stat-label { display: block; margin-bottom: 2px; color: #5b6f8d; font-size: 12px; }
.stat-number { color: #1a2c4c; font-size: 27px; font-weight: 650; line-height: 1.3; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-unit { margin-left: 6px; color: #71819a; font-size: 11px; }
.skeleton { min-height: 95px; background: #f0f4fa; }
.ingest-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 20px; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel.wide { margin-top: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.section-icon { color: #87a6ce; }
.tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; padding: 4px; border-radius: 7px; background: #f3f6fb; }
.tab { flex: 1; min-height: 34px; padding: 6px; border-color: transparent; border-radius: 5px; color: #526781; background: transparent; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tab:hover:not(:disabled) { border-color: transparent; color: #1b64c8; background: #e9f1ff; }
.tab.active { color: #165ecb; border-color: #d8e6fb; background: #fff; box-shadow: 0 1px 3px #1c4b8310; }
.drop-zone { position: relative; display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 205px; padding: 22px 16px; border: 1px dashed #b9cdec; border-radius: 7px; background: #fbfdff; text-align: center; }
.upload-symbol { width: 42px; height: 42px; margin-bottom: 13px; color: #2677ee; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone strong { color: #234c82; font-size: 14px; font-weight: 600; }
.drop-zone p { max-width: 390px; margin: 7px 0 15px; color: #6d7f99; font-size: 12px; }
.drop-zone.drag-over { border-color: var(--primary); background: #edf5ff; }
.drop-zone input[type=file] { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; overflow: hidden; }
.drop-zone:focus-within { outline: 3px solid #9abffc; outline-offset: 2px; }
.file-picker { min-height: 35px; padding: 6px 18px; border-color: #b7d0f6; color: #1762cc; background: #fff; font-size: 12px; }
.queue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.upload-queue { max-height: 190px; overflow-y: auto; margin: 0 0 12px; padding: 0; list-style: none; }
.upload-queue:empty { display: none; }
.upload-queue li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1f7; font-size: 12px; }
.upload-queue li > span { min-width: 0; overflow-wrap: anywhere; }
.upload-queue small { margin-left: 6px; color: #7888a1; }
.upload-note { margin-top: 10px; text-align: center; font-size: 11px; }
progress { display: block; width: 100%; height: 7px; margin-bottom: 9px; accent-color: var(--primary); }
#uploadStatus:not(:empty) { margin-bottom: 12px; }
.copy-panel .stack { gap: 15px; }
.copy-panel textarea { min-height: 192px; font-size: 13px; line-height: 1.8; background: #fcfdff; }
.import-tip { display: flex; align-items: flex-start; gap: 8px; padding: 11px 12px; border: 1px solid #e1ebfb; border-radius: 6px; background: #f5f9ff; }
.import-tip .icon { color: #6092d6; margin-top: 2px; width: 16px; height: 16px; }
.import-tip p { margin: 0; color: #567092; font-size: 12px; }
code { padding: 1px 5px; border-radius: 3px; background: #e7f0ff; color: #215ca9; font-family: inherit; font-weight: 600; }
.import-help { margin-top: 12px; padding: 13px; border-radius: 6px; background: #f4f8fe; font-size: 12px; }
.import-help b { color: #305c93; }
.import-help p { margin: 5px 0; color: var(--muted); }
.import-help pre { margin: 9px 0 0; padding: 10px 12px; color: #536884; background: #fff; font: inherit; line-height: 1.7; white-space: pre-wrap; }
.filter-row, .inventory-counts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inventory-counts { margin-top: -7px; margin-bottom: 15px; color: #6a7c94; font-size: 12px; }
.inventory-counts:empty { display: none; }
.filter-row { margin-bottom: 17px; }
.filter-row label { display: flex; align-items: center; gap: 9px; color: #677a93; font-weight: 400; font-size: 12px; }
.filter-row select { width: 145px; padding: 7px 10px; font-size: 12px; }
.material-name { display: flex; align-items: center; gap: 11px; max-width: 400px; }
.material-name > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-thumb { position: relative; display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; overflow: hidden; border: 1px solid #e3eaf5; border-radius: 6px; color: #5c84bd; background: #f0f5fc; }
.material-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.material-thumb .icon { width: 19px; height: 19px; }
.settings-toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 7px 9px 7px 12px; border: 1px solid #e0eafa; border-radius: 7px; background: #f5f9ff; white-space: nowrap; }
.settings-toolbar label, .settings-toolbar > span { color: #556e91; font-size: 12px; font-weight: 400; }
.settings-toolbar input { width: 64px; padding: 5px 8px; color: #175fc7; border-color: #d6e3f7; font-weight: 600; text-align: center; font-size: 15px; }
.quota-note { margin-top: -10px; margin-bottom: 15px; font-size: 11px; }
.create-worker { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.create-worker summary { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 12px; font-weight: 500; }
.create-worker summary .icon { width: 15px; height: 15px; }
.worker-create-form { display: grid; grid-template-columns: 1fr; align-items: end; gap: 13px; margin-top: 16px; padding: 17px; border-radius: 7px; background: #f7faff; }
.worker-create-form label { display: grid; gap: 6px; }
.worker-create-form input { font-size: 12px; }
.section-summary { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 13px; color: #73839b; font-size: 11px; }
.limit-editor { display: flex; gap: 7px; margin-bottom: 3px; }
.limit-editor input { width: 88px; min-height: 32px; padding: 4px 7px; font-size: 12px; }
.log-query { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 0 0 19px; }
.log-query label { display: grid; gap: 6px; min-width: 170px; color: #5a6c86; font-size: 12px; font-weight: 400; }
.log-query input, .log-query select { min-height: 37px; padding: 8px 10px; font-size: 12px; }
.log-query button { min-height: 37px; min-width: 82px; padding: 7px 16px; }
.record-panel > summary, .account-settings > summary { display: flex; align-items: center; justify-content: space-between; color: #354c6b; font-size: 14px; font-weight: 600; }
.account-settings > summary > span { display: inline-flex; align-items: center; gap: 9px; }
.account-settings > summary .icon { color: #6282aa; width: 17px; height: 17px; }
.record-panel[open] .table-wrap { margin-top: 20px; }
.account-settings form { max-width: 490px; margin-top: 22px; }
.page-footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px 2px 14px; color: #8190a6; font-size: 11px; }

/* Public claim page */
.shell { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 0 max(20px, calc((100vw - 1080px) / 2)); border-bottom: 1px solid #e1e9f5; background: #fff; }
.topbar .brand { font-size: 18px; }
.topbar .brand-mark { width: 29px; height: 29px; }
.claim-view { max-width: 710px; margin: 0 auto; padding: 40px 20px max(24px, env(safe-area-inset-bottom)); }
.claim-hero { margin-bottom: 25px; text-align: center; }
.claim-hero .local-chip { margin-bottom: 15px; padding: 4px 11px; border-color: #dde8f9; background: #f0f5ff; font-size: 11px; }
.claim-hero h1 { margin: 0 0 10px; color: #19355f; font-size: clamp(27px, 4vw, 33px); font-weight: 700; line-height: 1.35; letter-spacing: -.5px; }
.claim-hero > p { margin: 0; color: #6b7d97; font-size: 13px; }
.lookup { padding: 24px; border: 1px solid #dae6f7; border-radius: 10px; background: #fff; box-shadow: 0 5px 20px #204a8505; }
.lookup > label { color: #304969; font-size: 13px; }
.input-row { display: flex; align-items: stretch; gap: 9px; margin: 8px 0 11px; }
.input-row input { flex: 1; font-size: 14px; }
.input-row button { min-width: 122px; padding-left: 15px; padding-right: 13px; white-space: nowrap; }
.input-row .icon { width: 15px; height: 15px; }
.lookup .form-note { font-size: 11px; }
.claim-result { margin-top: 25px; }
.quota-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 13px 15px; margin-bottom: 21px; border: 1px solid #d9e7fb; border-radius: 8px; color: #4e6a90; background: #eef5ff; font-size: 12px; }
.quota-banner strong { padding: 4px 10px; border-radius: 20px; color: #155dc8; background: #e0edff; font-size: 12px; font-weight: 600; }
.quota-banner b { color: #2b527f; font-weight: 600; }
.package-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.package-head .eyebrow { margin-bottom: 5px; color: #4d7cbb; font-size: 10px; }
.package-head h2 { max-width: 420px; margin: 0 0 6px; font-size: 17px; overflow-wrap: anywhere; }
.package-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.package-progress { flex-shrink: 0; padding: 4px 8px; color: #5a7498; border-radius: 5px; background: #edf3fc; font-size: 11px; white-space: nowrap; }
.claim-step { margin: 0 0 15px; padding: 21px; border: 1px solid #dfe8f5; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.step-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 17px; }
.step-heading > div { min-width: 0; flex: 1; }
.step-heading h3 { margin: 0 0 4px; color: #203854; font-size: 16px; font-weight: 650; }
.step-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.step-number { display: grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; border-radius: 50%; color: #fff; background: var(--primary); font-size: 15px; font-weight: 700; }
.done-chip { gap: 3px; padding: 4px 7px; background: #e8f8f0; font-size: 10px; }
.done-chip .icon { width: 12px; height: 12px; }
.asset-list { display: grid; gap: 10px; }
.asset-card { min-width: 0; overflow: hidden; border: 1px solid #e2eaf5; border-radius: 7px; background: #fcfdff; }
.media-preview { display: grid; place-items: center; min-height: 160px; overflow: hidden; background: #f0f4fa; }
.media-preview img { display: block; width: 100%; max-height: 370px; object-fit: contain; }
.media-preview video { display: block; width: 100%; max-height: 370px; background: #182a43; }
.asset-info { display: flex; align-items: center; gap: 11px; padding: 12px 13px; }
.file-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 5px; color: #5082c7; background: #edf3fd; }
.file-icon .icon { width: 18px; height: 18px; }
.asset-copy { flex: 1; min-width: 0; }
.asset-copy strong { display: block; overflow: hidden; color: #405a7a; font-size: 12px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.asset-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.download-link { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; margin: 0 12px 12px; border: 1px solid #a6c8fa; border-radius: 6px; color: #1b65cc; background: #fff; font-size: 12px; font-weight: 600; }
.download-link:hover { border-color: #82afea; color: #1455ad; background: #f1f7ff; }
.download-link .icon { width: 16px; height: 16px; }
.continue-btn { width: 100%; margin-top: 15px; padding: 10px; font-size: 12px; }
.copy-text { display: block; width: 100%; min-height: 88px; max-height: 320px; margin-bottom: 13px; padding: 13px; border-color: #dae5f5; color: #283e5f; background: #f7faff; font-size: 13px; line-height: 1.85; resize: vertical; }
.claim-step > button[data-copy] { width: 100%; min-height: 42px; font-size: 13px; }
.claim-step > button[data-copy].copied-button { color: #1e61c0; border-color: #b6d0f6; background: #fff; }
.claim-step > button[data-copy].copied-button:hover { background: #f0f6ff; }
.locked-step { border-color: #e3e9f2; background: #fafcff; }
.locked-step .step-number { color: #7f91aa; background: #eaf0f8; }
.locked-note { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 15px 11px; color: var(--muted); border-radius: 6px; background: #f0f4fa; font-size: 12px; }
.locked-note .icon { width: 15px; height: 15px; }
.confirm-card { margin-top: 21px; padding: 20px; border: 1px solid #dfe8f6; border-radius: 9px; background: #fff; }
.confirm-card > div { margin-bottom: 14px; }
.confirm-card b { color: #294366; font-size: 14px; font-weight: 600; }
.confirm-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.confirm-card button { width: 100%; }
.receive-card { padding: 28px 24px; border: 1px solid #dbe7f8; border-radius: 9px; background: #fff; text-align: center; }
.receive-card .eyebrow { margin-bottom: 12px; color: #527caf; font-size: 11px; }
.receive-card h2 { margin-bottom: 12px; font-size: 20px; }
.receive-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.receive-card button { width: 100%; margin-top: 8px; }
.claim-guide { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 30px; color: #657e9f; font-size: 10px; }
.claim-guide span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.claim-guide b { display: grid; place-items: center; width: 20px; height: 20px; color: #5e83b3; border: 1px solid #cddff5; border-radius: 50%; background: #edf4ff; font-size: 10px; }
.claim-guide i { width: 13px; height: 1px; background: #c7d8ee; }
.claim-footer { padding-top: 16px; color: #7f8fa5; font-size: 10px; text-align: center; }
.claim-page.has-session .claim-hero { margin-bottom: 17px; }
.claim-page.has-session .claim-hero h1 { font-size: 26px; }
.claim-page.has-session .claim-hero .local-chip { display: none; }
.claim-page.has-session .claim-view { padding-top: 24px; }

@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-view { padding: 28px 25px 12px; }
  .ingest-grid { grid-template-columns: 1.05fr 1fr; }
  .worker-create-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .worker-create-form > button { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 200; width: 203px; height: 100dvh; gap: 0; padding: 26px 14px 15px; border-right: 1px solid var(--line); border-bottom: 0; overflow-y: auto; }
  .sidebar .brand { margin-bottom: 34px; padding: 0 7px; }
  .sidebar-nav { display: flex; flex-direction: column; gap: 7px; padding: 0; overflow: visible; }
  .sidebar-link { padding: 11px 13px; }
  .sidebar-note { display: block; margin: auto 7px 20px; padding-top: 32px; color: #7a8da7; }
  .sidebar-note > .icon { display: block; margin-bottom: 9px; color: #93b4df; }
  .sidebar-note b { color: #6c82a0; font-size: 11px; font-weight: 500; }
  .sidebar-note p { margin: 5px 0 0; font-size: 10px; line-height: 1.9; }
  .sidebar-profile { display: flex; align-items: center; gap: 9px; padding: 15px 5px 0; border-top: 1px solid var(--line); color: #425975; }
  .sidebar-profile > span:nth-child(2) { flex: 1; }
  .sidebar-profile b { display: block; font-size: 11px; font-weight: 500; }
  .sidebar-profile small { color: #8493a8; font-size: 9px; }
  .sidebar-profile .icon { width: 13px; height: 13px; color: #8fa2bd; }
  .admin-workspace { margin-left: 203px; }
  .workspace-bar { padding: 0 32px; }
  .admin-view { padding: 29px 32px 12px; }
  .stat { min-height: 105px; padding: 20px; }
  .worker-create-form { grid-template-columns: 1fr 1fr 1fr auto; }
  .worker-create-form > button { grid-column: auto; }
}
@media (max-width: 760px) {
  .workspace-bar { min-height: 56px; padding: 0 18px; }
  .workspace-actions { gap: 15px; }
  .workspace-actions .account-link { font-size: 0; }
  .breadcrumb { font-size: 11px; }
  .page-title { align-items: flex-start; }
  .page-title > .button { margin-top: 5px; padding: 9px 12px; font-size: 12px; }
  .panel { padding: 18px; }
  .quota-heading { align-items: stretch; flex-direction: column; gap: 13px; }
  .settings-toolbar { align-self: flex-start; justify-content: flex-start; }
  .quota-note { margin-top: -4px; }
  .panel-head { gap: 10px; }
  .panel-head .blue-chip { padding: 4px 8px; font-size: 10px; }
  .material-name { max-width: 265px; }
  .log-query label { flex: 1; min-width: 120px; }
  .filter-row label { flex: 1; min-width: 120px; align-items: stretch; flex-direction: column; gap: 6px; }
  .filter-row select { width: 100%; }
}
@media (max-width: 480px) {
  html { scroll-padding-top: 20px; }
  .sidebar { gap: 16px; padding-top: 17px; }
  .sidebar .brand { font-size: 18px; }
  .sidebar .brand-mark { width: 28px; height: 28px; }
  .sidebar .brand small { display: none; }
  .sidebar-nav { margin-left: -4px; margin-right: -4px; }
  .sidebar-link { padding: 9px 10px; font-size: 12px; }
  .sidebar-link .icon { width: 16px; height: 16px; }
  .admin-view { padding-left: 13px; padding-right: 13px; }
  .page-title .eyebrow { display: none; }
  .page-title > .button { min-height: 35px; padding: 7px 10px; }
  .page-title > .button .icon { display: none; }
  .page-title h1 { font-size: 22px; }
  .page-title p:not(.eyebrow) { max-width: 230px; font-size: 11px; }
  .stats { gap: 9px; }
  .stat { gap: 10px; min-height: 85px; padding: 13px; }
  .stat-icon { width: 33px; height: 33px; border-radius: 6px; }
  .stat-icon .icon { width: 20px; height: 20px; }
  .stat-number { font-size: 24px; }
  .stat-label { font-size: 11px; }
  .stat-unit { display: none; }
  .panel { padding: 16px; }
  .panel-head h2 { font-size: 16px; }
  .panel-head p { font-size: 11px; }
  .page-footer span { display: none; }
  .log-query button { width: 100%; }
  .topbar { min-height: 63px; padding: 0 17px; }
  .topbar .brand { font-size: 17px; }
  .topbar .text-link { font-size: 11px; }
  .claim-view { padding: 27px 13px 22px; }
  .claim-hero { margin-bottom: 22px; }
  .claim-hero > p { font-size: 12px; }
  .lookup { padding: 18px; }
  .input-row { gap: 7px; }
  .input-row input { padding: 10px; font-size: 14px; }
  .input-row button { min-width: 94px; padding: 9px 10px; font-size: 12px; }
  .lookup .form-note { font-size: 10px; }
  .claim-step { padding: 16px; }
  .package-head { align-items: flex-start; }
  .package-head h2 { font-size: 15px; }
  .package-progress { font-size: 10px; }
  .quota-banner { padding: 12px; font-size: 11px; }
  .quota-banner strong { font-size: 11px; }
  .step-heading { gap: 9px; }
  .step-heading h3 { font-size: 15px; }
  .step-heading p { font-size: 11px; }
  .step-number { width: 27px; height: 27px; font-size: 14px; }
  .step-heading > .done-chip { font-size: 9px; padding: 3px 5px; }
  .media-preview img, .media-preview video { max-height: 310px; }
  .claim-guide { gap: 6px; font-size: 9px; }
  .claim-guide span { gap: 4px; }
  .claim-guide i { width: 7px; }
  .claim-guide b { width: 17px; height: 17px; font-size: 9px; }
  .confirm-card { padding: 18px 16px; }
}
