:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --text: #101828;
  --text-soft: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #067647;
  --success-soft: #ecfdf3;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.08);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

::selection {
  background: #dbeafe;
  color: #1e3a8a;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.page {
  flex: 1;
  width: 100%;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand--center {
  justify-content: center;
}

.brand__mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.24);
}

.brand__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.text-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--text);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.text-button:hover {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.button--primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.button--secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: var(--shadow-xs);
}

.button--secondary:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button--ghost:hover {
  background: #f2f4f7;
  color: var(--text);
}

.button--sm {
  padding: 7px 10px;
  font-size: 12px;
}

.button--full {
  width: 100%;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button:disabled:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.flash-stack {
  width: min(1120px, calc(100% - 48px));
  margin: 20px auto 0;
  display: grid;
  gap: 8px;
}

.flash {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  box-shadow: var(--shadow-xs);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.flash--error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: #7a271a;
}

.flash--success {
  border-left-color: var(--success);
  background: var(--success-soft);
  color: #054f31;
}

.flash--out {
  opacity: 0;
  transform: translateY(-4px);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.site-footer__brand {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-footer__meta {
  color: var(--muted-2);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: var(--text);
}

.page-wrap {
  max-width: 860px;
  padding: 48px 0 72px;
}

.page-intro {
  margin-bottom: 24px;
}

.page-intro h1 {
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-intro p {
  max-width: 620px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.upload-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: #93b4f5;
  background: #f5f8ff;
}

.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.is-uploading {
  cursor: wait;
  opacity: 0.6;
}

.dropzone__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.dropzone__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dropzone__sub {
  display: block;
  max-width: 520px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.dropzone__button {
  margin-top: 16px;
}

.queue {
  margin-top: 16px;
}

.queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.queue__list {
  max-height: 220px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.queue__item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.queue__type {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.queue__name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue__size {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.queue__remove {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.queue__remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.queue__note {
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  background: #fffaeb;
  color: #93370d;
  font-size: 12px;
  line-height: 1.5;
}

.upload-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.upload-meta span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--muted-2);
}

.progress {
  margin-top: 16px;
}

.progress__bar {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.16s linear;
}

.progress__label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-note svg {
  flex: 0 0 auto;
  color: var(--muted-2);
}

.results {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.results__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.results__head h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.results__head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.result {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.result:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.result__status {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.result--error .result__status {
  background: var(--danger-soft);
  color: var(--danger);
}

.result__body {
  min-width: 0;
}

.result__name {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.result__url {
  display: inline-block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.result__url:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.result__meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.result__meta--error {
  color: var(--danger);
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.icon-btn.is-copied {
  border-color: #abefc6;
  background: var(--success-soft);
  color: var(--success);
}

.icon-btn--danger:hover {
  border-color: #fecdca;
  background: var(--danger-soft);
  color: var(--danger);
}

.trust-list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 28px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-list svg {
  color: var(--success);
}

.body--auth {
  background: var(--bg);
}

.body--auth .page {
  display: flex;
}

.body--auth .flash-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 80;
  width: min(620px, calc(100% - 32px));
  margin: 0;
  transform: translateX(-50%);
}

.auth-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 48px 16px;
}

.auth-card {
  width: min(400px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-card .brand {
  margin: 0 auto;
}

.auth-card h1 {
  margin: 22px 0 4px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-card__lead {
  color: var(--muted);
  font-size: 13px;
}

.auth-card .form {
  margin-top: 24px;
  text-align: left;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  padding: 10px 42px 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap input::placeholder {
  color: var(--muted-2);
}

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.input-toggle:hover,
.input-toggle.is-active {
  background: var(--surface-muted);
  color: var(--text);
}

.form .button--full {
  margin-top: 14px;
}

.auth-card__back {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
}

.auth-card__back:hover {
  color: var(--accent);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-badge {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.inline-form {
  display: inline-flex;
}

.admin-page {
  padding: 32px 0 64px;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.admin-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.stat-card__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-card__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.stat-card__value {
  display: block;
  margin: 2px 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-card__hint {
  display: block;
  color: var(--muted-2);
  font-size: 11.5px;
}

.data-card {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.data-card__header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.data-card__header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search__field {
  position: relative;
}

.search__field svg {
  position: absolute;
  top: 50%;
  left: 10px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search__field input {
  width: 260px;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search__field input::placeholder {
  color: var(--muted-2);
}

.search__field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.14s ease;
}

.table tbody tr:hover {
  background: var(--surface-muted);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.file-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.thumb {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.thumb--broken {
  display: grid;
  place-items: center;
  background: #f2f4f7;
}

.thumb--broken::after {
  content: "IMG";
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
}

.file-cell__meta {
  min-width: 0;
}

.file-name {
  display: block;
  max-width: 300px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name:hover {
  color: var(--accent);
}

.file-path {
  display: block;
  max-width: 300px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-strong {
  display: block;
  color: var(--text-soft);
  font-size: 12.5px;
  white-space: nowrap;
}

.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.ip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f2f4f7;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10.5px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.pagination__links {
  display: flex;
  gap: 7px;
}

.page-link {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

a.page-link:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.page-link.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.empty {
  padding: 64px 24px;
  text-align: center;
}

.empty__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #f2f4f7;
  color: var(--muted);
}

.empty h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.empty p {
  max-width: 380px;
  margin: 5px auto 18px;
  color: var(--muted);
  font-size: 13px;
}

.error-wrap {
  max-width: 620px;
  padding: 80px 0 100px;
}

.error-card {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.error-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.error-card h1 {
  margin: 14px 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.error-card p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13.5px;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container,
  .flash-stack {
    width: calc(100% - 32px);
  }

  .site-header__inner {
    min-height: 60px;
  }

  .page-wrap {
    padding: 32px 0 56px;
  }

  .page-intro {
    margin-bottom: 18px;
  }

  .upload-card {
    padding: 16px;
  }

  .dropzone {
    padding: 32px 16px;
  }

  .dropzone__sub {
    font-size: 12px;
  }

  .upload-card__footer {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .upload-meta {
    display: grid;
    gap: 2px;
  }

  .upload-meta span + span::before {
    content: none;
    margin: 0;
  }

  .upload-card__footer .button {
    width: 100%;
  }

  .results {
    padding: 16px;
  }

  .results__head {
    align-items: flex-start;
  }

  .trust-list {
    gap: 12px 20px;
  }

  .admin-brand {
    gap: 9px;
  }

  .admin-badge {
    display: none;
  }

  .admin-page {
    padding: 24px 0 48px;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .admin-header .button {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .stat-card {
    padding: 14px;
  }

  .data-card {
    margin-top: 20px;
  }

  .data-card__header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .search {
    width: 100%;
  }

  .search__field {
    flex: 1;
    min-width: 0;
  }

  .search__field input {
    width: 100%;
  }

  .table th,
  .table td {
    padding: 10px 12px;
  }

  .pagination {
    padding: 12px 16px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 16px 0;
  }

  .site-footer__meta {
    display: none;
  }

  .auth-page {
    padding: 24px 16px;
  }

  .auth-card {
    padding: 24px;
  }

  .error-wrap {
    padding: 48px 0 64px;
  }

  .error-card {
    padding: 28px 20px;
  }
}

@media (max-width: 560px) {
  .site-nav .text-link {
    display: none;
  }

  .site-nav {
    gap: 8px;
  }

  .brand__name {
    font-size: 13px;
  }

  .page-intro h1 {
    font-size: 24px;
  }

  .result {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .result > .icon-btn {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }

  .results__head {
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-header h1 {
    font-size: 25px;
  }

  .empty {
    padding: 48px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
