:root {
  color-scheme: light;
  --background: #f7f7f6;
  --surface: #fff;
  --ink: #252725;
  --muted: #777a76;
  --border: #e5e6e2;
  --danger: #aa423b;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-size: 14px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 5px; padding: 0 16px; font-size: 13px; font-weight: 500; }
.button.primary { background: #292d2a; color: white; }
.button.primary:hover { background: #424842; }
.button.quiet { background: transparent; color: #545a54; border-color: #dcded8; }
.button.quiet:hover { background: #efefec; }
.button.full { width: 100%; margin-top: 18px; }
button:focus-visible, .drop-zone:focus-visible { outline: 2px solid #698169; outline-offset: 3px; }
.login-view { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.login-form { width: min(100%, 360px); padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.login-form h1 { margin-bottom: 26px; }
.login-form label { display: block; margin-bottom: 7px; font-size: 13px; }
.password-wrap { position: relative; }
.password-wrap input { width: 100%; height: 44px; padding: 0 58px 0 12px; border: 1px solid #d7dbd3; border-radius: 5px; background: white; color: var(--ink); }
.password-wrap input:focus { outline: 2px solid #dce6d9; border-color: #87977f; }
.reveal { position: absolute; right: 5px; top: 5px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 0 8px; }
.error { margin: 14px 0 0; font-size: 12px; color: var(--danger); }
.file-manager { width: min(100% - 48px, 1000px); margin: 48px auto; }
.manager-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.drop-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; min-height: 102px; border: 1px dashed #cdd2c8; border-radius: 6px; background: #fafbf8; cursor: pointer; }
.drop-zone.dragover { border-color: #6a8265; background: #eef3eb; }
.drop-zone span { display: block; font-size: 14px; }
.drop-zone small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.drop-zone .button { flex-shrink: 0; }
.upload-queue { margin-top: 8px; }
.queue-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.queue-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.queue-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.queue-status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.progress-track { height: 3px; background: #e5e8e1; margin-top: 8px; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: #7c9778; width: 0; }
.queue-error { color: var(--danger); font-size: 12px; margin-top: 8px; }
.queue-item > .text-action { margin-top: 8px; }
.files-panel { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.file-row:last-child { border-bottom: 0; }
.file-info { min-width: 0; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-top: 3px; }
.file-actions { display: flex; gap: 8px; }
.file-actions .text-action { padding: 8px; min-height: 38px; }
.text-action { border: 0; background: transparent; padding: 3px 0; font-size: 12px; color: #4b6549; }
.text-action:hover { text-decoration: underline; }
.text-action.delete { color: var(--danger); }
.empty-state { text-align: center; color: var(--muted); margin: 0; padding: 56px 20px; font-size: 13px; }
.manager-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; padding: 14px 1px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 10px 16px; background: #303530; color: white; border-radius: 5px; font-size: 13px; max-width: calc(100% - 32px); z-index: 5; }
.toast.bad { background: #853b37; }
[hidden] { display: none !important; }
@media (max-width: 560px) {
  .file-manager { width: calc(100% - 32px); margin: 24px auto; }
  .manager-heading { margin-bottom: 20px; }
  .drop-zone { padding: 18px; gap: 12px; }
  .drop-zone span { font-size: 13px; }
  .drop-zone small { font-size: 11px; }
  .button { padding: 0 12px; }
  .file-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px; }
  .file-actions { margin-left: -8px; }
  .manager-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}
