:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1c1f23;
  --muted: #6b7280;
  --line: #d9dce1;
  --accent: #1f6feb;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 24px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar__title { font-weight: 600; }
.topbar__logout { display: flex; align-items: center; gap: 12px; margin: 0; }
.topbar__user { color: var(--muted); }
.page { max-width: 860px; margin: 0 auto; padding: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px; margin-bottom: 16px;
}
.form label { display: block; margin-bottom: 16px; font-weight: 500; }
.form input[type="text"], .form input[type="password"] {
  display: block; width: 100%; margin-top: 6px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 6px; font: inherit;
}
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; font-weight: 400; }

/* Поле выбора файлов не display:none — иначе оно недостижимо с клавиатуры,
   а Chrome не может показать на нём подсказку о незаполненном required и
   молча отменяет отправку формы. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.dropzone { margin-bottom: 16px; }
.dropzone__title { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.dropzone__area {
  /* margin-bottom обнуляется явно: правило .form label выше по специфичности
     и иначе добавляет 16px между зоной и списком файлов. */
  display: block; margin-bottom: 0; text-align: center; cursor: pointer;
  padding: 24px 16px; border: 2px dashed var(--line); border-radius: 8px;
  background: var(--bg); transition: border-color .15s, background .15s;
}
.dropzone__area:hover { border-color: var(--accent); }
.dropzone__area:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone__call { display: block; font-weight: 500; }
.dropzone__area .hint { margin-top: 4px; }
.dropzone.is-dragover .dropzone__area {
  border-color: var(--accent); border-style: solid; background: #eaf1fd;
}
.dropzone.has-files .dropzone__area { padding: 14px 16px; }
.dropzone__note { margin: 10px 0 0; font-size: 13px; }
.dropzone__count { margin-top: 10px; }
.dropzone__clear { margin-top: 10px; font-size: 13px; }
.filelist { list-style: none; margin: 8px 0 0; padding: 0; }
.filelist__item {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.filelist__item:last-child { border-bottom: 0; }
.filelist__name {
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.filelist__size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.filelist__remove {
  flex: none; width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--line); border-radius: 6px; background: var(--card);
  color: var(--muted); font: inherit; line-height: 1; cursor: pointer;
}
.filelist__remove:hover { border-color: var(--danger); color: var(--danger); }
.button {
  background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  padding: 10px 20px; font: inherit; cursor: pointer;
}
.button[disabled] { opacity: .6; cursor: default; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.error { color: var(--danger); font-weight: 500; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; }
.stats li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; min-width: 120px; }
.stats b { display: block; font-size: 22px; }
.stats span { color: var(--muted); font-size: 13px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
