:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #e5eaf1;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --red: #c83349;
  --shadow: 0 12px 34px rgba(34, 54, 90, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, calc((100% - 1100px) / 2)); background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: white; font-weight: 700; font-size: 25px; background: linear-gradient(140deg, #3b82f6, #1d4ed8); box-shadow: 0 7px 18px rgba(37,99,235,.25); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.container { max-width: 1100px; margin: 28px auto; padding: 0 20px 40px; display: grid; gap: 22px; }
.upload-card, .files-card, .login-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.upload-card { padding: 25px; display: grid; gap: 16px; grid-template-columns: 1fr auto; align-items: center; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 24px; }
h2 { margin-bottom: 2px; font-size: 21px; }
.muted { color: var(--muted); margin-bottom: 0; }
.upload-button, button.primary { color: white; border: 0; background: var(--blue); border-radius: 10px; padding: 11px 20px; font-weight: 600; text-align: center; cursor: pointer; }
.upload-button:hover, button.primary:hover { background: var(--blue-dark); }
.drop-zone { grid-column: 1 / -1; padding: 24px; border: 2px dashed #b7c7e7; border-radius: 14px; text-align: center; color: var(--muted); background: #f8faff; transition: .15s; }
.drop-zone.dragging { border-color: var(--blue); background: #edf4ff; color: var(--blue); }
.upload-queue { grid-column: 1 / -1; display: grid; gap: 9px; }
.upload-item { display: grid; grid-template-columns: minmax(130px, 1fr) 2fr auto; align-items: center; gap: 12px; font-size: 13px; }
.upload-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.progress { height: 8px; border-radius: 99px; background: #e8edf5; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .12s; }
.upload-state { min-width: 54px; color: var(--muted); text-align: right; }
.files-card { padding: 25px; }
.files-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.toolbar-actions { display: flex; gap: 9px; }
input[type="search"], input[type="password"] { border: 1px solid #cbd4e1; border-radius: 10px; padding: 10px 12px; color: var(--ink); background: white; outline: none; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
button.secondary, button.ghost, button.danger { border: 1px solid #cbd4e1; background: white; color: #344054; border-radius: 9px; padding: 9px 13px; }
button.ghost { border-color: transparent; background: transparent; }
button.danger { border-color: #f2c4cb; color: var(--red); padding: 6px 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); }
td:first-child { max-width: 460px; overflow-wrap: anywhere; }
.download-link { color: var(--blue); text-decoration: none; font-weight: 600; }
.actions { display: flex; gap: 8px; align-items: center; }
.empty-state { text-align: center; padding: 42px 10px; color: var(--muted); }
.notice { border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; background: #eef5ff; color: #2456a6; }
.notice.error { background: #fff0f2; color: #9e2638; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(410px, 100%); padding: 34px; }
.login-card .brand-mark { margin: 0 auto 20px; }
.login-card h1, .login-card > p { text-align: center; }
.login-card form { margin-top: 23px; display: grid; gap: 9px; }
.login-card label { font-weight: 600; }
.full { width: 100%; margin-top: 8px; }
@media (max-width: 680px) {
  .topbar { height: 58px; padding: 0 14px; }
  .container { margin-top: 16px; padding: 0 12px 28px; }
  .upload-card, .files-card { padding: 18px; border-radius: 15px; }
  .upload-card { grid-template-columns: 1fr; }
  .upload-button, .drop-zone, .upload-queue { grid-column: 1; }
  .drop-zone { display: none; }
  .files-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions input { min-width: 0; flex: 1; }
  .upload-item { grid-template-columns: 1fr auto; }
  .upload-item .progress { grid-column: 1 / -1; grid-row: 2; }
  th:nth-child(2), td:nth-child(2) { display: none; }
  th, td { padding: 12px 6px; }
  td:first-child { max-width: 160px; }
  .actions { flex-direction: column; align-items: stretch; }
}
