:root {
  color-scheme: light;
  --background: #f6f8fa;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #dfe5ec;
  --accent: #2563eb;
  --focus: #93b4fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { outline-offset: 3px; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); }
input:not([type=checkbox]), select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 5px;
  background: var(--surface); color: var(--ink); min-height: 38px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus); border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #7b889a; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
input[readonly] { background: #f8fafc; color: #475569; }
textarea { resize: vertical; }
select { cursor: pointer; }
h1, h2, p { margin: 0; }
h1 { font-size: 25px; font-weight: 650; letter-spacing: -.5px; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 600; line-height: 1.4; }
p { color: var(--muted); }
[hidden] { display: none !important; }
.app-header {
  background: var(--surface); border-bottom: 1px solid var(--line);
  min-height: 65px; display: flex; align-items: center; gap: 30px; padding: 0 32px;
}
.app-name { color: var(--ink); font-size: 16px; font-weight: 650; white-space: nowrap; }
.app-name:hover { text-decoration: none; }
nav { display: flex; gap: 5px; align-self: stretch; align-items: center; }
.nav-item { padding: 8px 12px; border-radius: 5px; font-size: 13px; color: #526174; white-space: nowrap; }
.nav-item:hover { background: #f1f5f9; }
.nav-item.active { background: #eaf0fb; color: #1d4ed8; font-weight: 550; }
.nav-count { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 11px; background: #dce6fa; }
.service-status { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }
.service-status[data-state=online] .status-dot { background: #39916a; }
.service-status[data-state=offline] .status-dot { background: #b45353; }
.content { max-width: 1200px; margin: auto; padding: 24px 32px 0; }
.topbar { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 24px; }
.topbar a { color: var(--muted); }
.page-heading { margin-bottom: 20px; }
.page-heading p { font-size: 13px; margin-top: 6px; }
.compose-grid { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 24px; align-items: start; }
.upload-card { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 22px; min-width: 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.segmented { display: flex; gap: 3px; padding: 3px; background: #eef2f6; border-radius: 6px; font-size: 13px; }
.segmented button { padding: 5px 18px; border-radius: 4px; color: var(--muted); }
.segmented .selected { background: white; color: var(--ink); box-shadow: 0 1px 3px #1f293712; }
.max-size { font-size: 12px; color: var(--muted); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 174px; padding: 24px; text-align: center; background: #f9fbfd;
  border: 1px dashed #b7c5d6; border-radius: 6px; cursor: pointer;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: #eff5ff; }
.dropzone strong { font-size: 15px; font-weight: 550; }
.dropzone > span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.dropzone u { color: var(--accent); text-underline-offset: 3px; }
.dropzone .drop-hint { font-size: 12px; margin-top: 15px; }
.file-list { display: grid; gap: 6px; margin-top: 8px; }
.queued-file { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; font-size: 13px; }
.queued-file > span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queued-file small { color: var(--muted); white-space: nowrap; }
.queued-file button { font-size: 20px; line-height: 1; }
.transfer-options { display: flex; gap: 24px; align-items: flex-end; padding: 20px 0; }
.transfer-options > div { width: 175px; flex-shrink: 0; }
.field-label { display: block; font-size: 12px; font-weight: 550; margin-bottom: 6px; color: #475569; }
.once-option { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; cursor: pointer; padding-bottom: 2px; }
.once-option input { margin: 3px 0 0; }
.once-option small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.extra-options { border-top: 1px solid var(--line); margin-bottom: 18px; padding-top: 13px; }
summary { cursor: pointer; color: #526174; font-size: 13px; }
.extra-options[open] summary { margin-bottom: 15px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full-width { grid-column: 1 / -1; }
.compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.compose-footer > span { font-size: 12px; color: var(--muted); }
.primary, .outline-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 5px; font-size: 13px; font-weight: 550;
  white-space: nowrap; min-height: 38px;
}
.primary { background: var(--accent); color: white; border: 1px solid var(--accent); }
.primary:hover { background: #1d4ed8; text-decoration: none; }
.outline-button { background: var(--surface); border: 1px solid #cbd5e1; color: #334155; }
.outline-button:hover { background: #f1f5f9; text-decoration: none; }
.text-button { font-size: 13px; color: #526174; padding: 6px 0; }
.text-button:hover { color: var(--ink); text-decoration: underline; }
.reference-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 20px; }
.reference-panel section + section { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.reference-panel h2 { font-size: 14px; margin-bottom: 8px; }
.reference-panel p { font-size: 12px; line-height: 1.7; margin-top: 7px; }
.reference-link { font-size: 13px; display: inline-block; margin-top: 10px; }
.reference-panel .outline-button { width: 100%; margin-top: 14px; font-size: 12px; }
.transfers-section { margin-top: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2 > span { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 500; background: #e9eef4; padding: 1px 6px; border-radius: 4px; color: #526174; vertical-align: middle; }
.section-heading p { font-size: 12px; margin-top: 4px; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 17px 0 12px; }
.search { width: 380px; max-width: 65%; }
.search input, .table-tools select { font-size: 13px; }
.table-tools > select { width: 155px; }
.transfer-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.transfer-table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; font-size: 13px; }
.transfer-table th { padding: 10px 16px; font-size: 12px; font-weight: 550; color: #526174; background: #f8fafc; border-bottom: 1px solid var(--line); }
.transfer-table td { padding: 12px 16px; border-top: 1px solid #edf0f4; }
.transfer-table tbody tr:first-child td { border-top: none; }
.transfer-table tbody tr:hover { background: #fafbfd; }
.file-cell { display: flex; align-items: center; gap: 11px; max-width: 340px; }
.file-icon { display: grid; place-content: center; width: 40px; height: 35px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 4px; color: #526174; background: #f8fafc; font: 10px ui-monospace, monospace; }
.file-cell strong { display: block; font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.file-cell small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.muted-cell { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 4px; background: #eaf5ee; color: #247349; font-size: 11px; }
.badge.consumed { background: #edf1f7; color: #53677f; }
.badge.expired, .badge.deleted, .badge.revoked { background: #f1f3f5; color: #687587; }
.badge.staging { background: #eaf0fc; color: #385ca7; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.copy-row, .more-row { font-size: 12px; padding: 5px 9px; min-height: 30px; border: 1px solid #cbd5e1; border-radius: 4px; background: white; color: #475569; }
.copy-row:hover, .more-row:hover { background: #f1f5f9; }
.empty-state { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 30px 16px; text-align: center; }
.empty-state strong { display: block; font-size: 14px; font-weight: 550; margin-bottom: 5px; }
.empty-state p { font-size: 12px; }
.page-footer { display: flex; justify-content: flex-end; gap: 20px; border-top: 1px solid var(--line); font-size: 12px; padding: 20px 0; margin-top: 32px; }
.page-footer a { color: var(--muted); }
.form-error { font-size: 13px; color: #b42318; margin-top: 14px; white-space: pre-wrap; }
.progress-label { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
progress { width: 100%; height: 6px; accent-color: var(--accent); margin-bottom: 16px; }
#text-composer .field-label:not(:first-child) { margin-top: 12px; }
#text-content { min-height: 180px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 10; background: #253248; color: white; padding: 11px 20px; border-radius: 6px; font-size: 13px; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 4px 20px #0f172a20; }
dialog { border: 1px solid var(--line); border-radius: 9px; padding: 28px; max-width: 580px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 16px 60px #0f172a20; }
dialog::backdrop { background: #18223466; }
dialog h2 { font-size: 20px; margin-bottom: 15px; overflow-wrap: anywhere; padding-right: 15px; }
dialog p { font-size: 13px; line-height: 1.75; margin-bottom: 12px; }
dialog .field-label { margin-top: 14px; }
.dialog-close { position: absolute; top: 10px; right: 14px; font-size: 24px; color: var(--muted); }
.inline-form { display: flex; gap: 8px; }
.inline-form input { min-width: 0; }
.inline-form button { flex-shrink: 0; }
#checksum { font-family: ui-monospace, monospace; font-size: 11px; }
#manage-detail { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
#manage-form { margin-top: 16px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 13px; grid-column: 1 / -1; }
.danger { color: #b42318; }
.danger-actions { border-top: 1px solid var(--line); display: flex; gap: 22px; margin-top: 20px; padding-top: 12px; }
dialog details { margin-top: 16px; font-size: 12px; color: var(--muted); }
#activity-list { padding-left: 18px; line-height: 2; }
.inbox-form { max-width: 650px; border: 1px solid var(--line); border-radius: 8px; padding: 22px; background: var(--surface); }
.inbox-form p { font-size: 12px; margin-top: 12px; }
.inbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
.inbox-card { border: 1px solid var(--line); border-radius: 7px; padding: 20px; background: var(--surface); }
.inbox-card h2 { margin-bottom: 9px; }
.inbox-card p { font-size: 12px; margin-bottom: 16px; }
.inbox-actions { display: flex; align-items: center; gap: 20px; }
.share-card { max-width: 660px; padding: 32px; margin: 36px auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.share-card h1 { overflow-wrap: anywhere; font-size: 24px; }
.share-card > p { font-size: 13px; margin: 10px 0; }
#share-metadata { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; font-size: 12px; color: #526174; }
#share-metadata > span { background: #f1f5f9; border: 1px solid #e2e8f0; padding: 4px 8px; border-radius: 4px; }
#share-note { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 20px 0; border-left: 2px solid #cbd5e1; background: #f8fafc; padding: 12px 16px; }
.share-card form { max-width: 420px; margin: 20px 0; }
.share-card .download-button { margin: 4px 0 10px; min-width: 150px; }
.share-caution { color: #667085; font-size: 12px !important; }
.share-card > .reference-link { margin-top: 18px; }
#storage-summary { font-size: 12px; color: var(--muted); padding-bottom: 12px; }
.visually-hidden { position: absolute !important; height: 1px !important; width: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 900px) {
  .app-header { gap: 18px; padding: 0 22px; }
  .nav-item { padding: 8px 9px; }
  .content { padding: 20px 22px 0; }
  .compose-grid { grid-template-columns: minmax(0, 1fr) 235px; gap: 18px; }
  .upload-card { padding: 18px; }
  .transfer-options { gap: 15px; }
  .transfer-options > div { width: 140px; }
  .once-option, .once-option small { font-size: 12px; }
}
@media (max-width: 720px) {
  .app-header { flex-wrap: wrap; gap: 12px 18px; padding: 15px 18px 10px; }
  .app-name { margin-right: auto; }
  .app-header nav { order: 4; width: 100%; flex-wrap: wrap; gap: 4px; }
  .service-status { margin-left: 0; }
  .content { padding: 18px 16px 0; }
  .topbar { margin-bottom: 20px; }
  .compose-grid { grid-template-columns: 1fr; }
  .reference-panel { padding: 17px; }
  .reference-panel section + section { margin-top: 15px; padding-top: 14px; }
  .reference-panel .outline-button { width: auto; display: flex; }
  .upload-card { padding: 16px; }
  .transfer-options { flex-wrap: wrap; gap: 16px; }
  .transfer-options > div { width: 160px; }
  .once-option { padding-bottom: 2px; align-self: flex-end; }
  .compose-footer > span { font-size: 11px; }
  .compose-footer .primary { font-size: 12px; padding: 9px 12px; }
  .max-size { font-size: 11px; }
  .transfers-section { margin-top: 26px; }
  .section-heading p { max-width: 250px; }
  .table-tools { gap: 10px; }
  .table-tools > select { width: 135px; }
  .search { max-width: none; flex: 1; min-width: 0; }
  .search input { min-width: 0; }
  .transfer-table { min-width: 720px; }
  .page-footer { justify-content: flex-start; gap: 18px; font-size: 11px; }
  .inbox-form { padding: 18px; }
  .share-card { padding: 24px 20px; margin: 16px auto; }
}
@media (max-width: 420px) {
  .detail-grid { grid-template-columns: 1fr; }
  .transfer-options > div { width: 100%; }
  .once-option { font-size: 13px; }
  .segmented button { padding: 5px 14px; }
  .inbox-form .inline-form { flex-wrap: wrap; }
  .inbox-form .inline-form button { width: 100%; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
}
.access-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.access-card { width: 100%; max-width: 440px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.access-card > p { margin: 8px 0 24px; font-size: 13px; }
.access-card .primary { width: 100%; margin-top: 14px; }
.access-instructions { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.access-instructions p { margin: 12px 0; font-size: 12px; line-height: 1.7; }
.access-instructions code { font-size: 12px; overflow-wrap: anywhere; }
