/* ============================================================
   飞递 FEIDI · transfer workspace
   Product UI: sidebar + upload workspace + history
   ============================================================ */

:root {
  --bg: #f4f6fb;
  --bg-soft: #eef2f9;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --surface-muted: #f1f4fa;
  --text: #172033;
  --text-secondary: #5e6a80;
  --text-muted: #8a94a8;
  --border: #e4e8f0;
  --border-strong: #d3dae7;
  --brand: #2f5bff;
  --brand-hover: #2049e8;
  --brand-ink: #1838b8;
  --brand-soft: #eef2ff;
  --brand-soft-2: #e3eaff;
  --success: #0e9f6e;
  --success-soft: #e9f8f2;
  --warning: #b7791f;
  --warning-soft: #fff8e8;
  --danger: #e5484d;
  --danger-hover: #cf3439;
  --danger-soft: #fff0f1;
  --violet: #7c5cff;
  --violet-soft: #f2efff;
  --amber: #e09a28;
  --amber-soft: #fff7e8;

  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.035);
  --shadow-sm: 0 2px 6px rgba(16, 24, 40, 0.04), 0 1px 2px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 16px 36px -22px rgba(16, 24, 40, 0.2);
  --shadow-lg: 0 28px 70px -24px rgba(16, 24, 40, 0.3);

  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.68, 0.2, 1);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 92% -12%, rgba(47, 91, 255, 0.065), transparent 70%),
    radial-gradient(600px 360px at 18% 104%, rgba(124, 92, 255, 0.045), transparent 70%);
}

[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }

::selection { color: #fff; background: var(--brand); }

button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
h1, h2, h3, p { margin-top: 0; }

:where(a, button, summary, label[tabindex], input, textarea):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-size: 12.5px;
  transform: translate(-50%, -180%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.noscript {
  position: relative;
  z-index: 100;
  padding: 10px 20px;
  background: var(--danger);
  color: #fff;
  font-size: 12.5px;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Sidebar                                                             */
/* ------------------------------------------------------------------ */

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 20px 16px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 6px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(47, 91, 255, 0.6);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1; }
.brand-copy strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-copy small {
  margin-top: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.icon-button:hover {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
}
.icon-button svg { width: 19px; height: 19px; }
.sidebar-close { display: none; }

.new-transfer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 43px;
  margin-bottom: 22px;
  border: 1px solid var(--brand);
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px -12px rgba(47, 91, 255, 0.9);
  transition: background 0.18s ease, transform 0.18s var(--ease), box-shadow 0.18s ease;
}
.new-transfer-btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px -12px rgba(47, 91, 255, 0.85);
}
.new-transfer-btn:active { transform: translateY(0); }
.new-transfer-btn:disabled { opacity: 0.55; box-shadow: none; transform: none; }
.new-transfer-btn svg { width: 17px; height: 17px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  margin: 5px 10px 7px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-label-secondary { margin-top: 21px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-item:hover { background: var(--surface-soft); color: var(--text); }
.nav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.nav-badge {
  min-width: 20px;
  height: 19px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--brand-soft-2);
  color: var(--brand-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 19px;
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
}
.server-card {
  padding: 13px 13px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}
.server-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}
.online-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-size: 9px;
  font-weight: 600;
}
.online-state i,
.service-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(14, 159, 110, 0.1);
}
.server-card p {
  margin: 7px 0 11px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.65;
}
.server-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 10.5px;
}
.server-meta strong { color: var(--text-secondary); font-size: 10px; font-weight: 600; }

.account-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 12px 5px 2px;
  border-top: 1px solid var(--border);
}
.account-avatar,
.top-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.account-info { display: flex; min-width: 0; flex-direction: column; line-height: 1.3; }
.account-info strong { font-size: 11px; font-weight: 600; }
.account-info span { color: var(--text-muted); font-size: 9px; }
.account-dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(16, 24, 40, 0.36);
  backdrop-filter: blur(2px);
}

/* ------------------------------------------------------------------ */
/* Topbar / page                                                       */
/* ------------------------------------------------------------------ */

.main-shell {
  min-height: 100vh;
  margin-left: 252px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(228, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
}
.topbar-start { display: flex; align-items: center; gap: 8px; min-width: 0; }
.menu-button { display: none; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.breadcrumb svg { width: 13px; height: 13px; color: #b2bac9; }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #dcefe7;
  border-radius: 20px;
  background: var(--success-soft);
  color: #087552;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.top-avatar { width: 31px; height: 31px; font-size: 11px; }

.main-content {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 30px 42px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  animation: fade-up 0.45s var(--ease) both;
}
.page-kicker {
  margin: 0 0 6px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.page-heading h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.page-subtitle {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 12.5px;
}
.heading-actions { display: flex; align-items: center; gap: 9px; }

.button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s var(--ease);
}
.button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.button:active { transform: translateY(1px); }
.button-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(47, 91, 255, 0.85);
}
.button-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.button-primary:disabled {
  border-color: #c9d1e3;
  background: #c9d1e3;
  box-shadow: none;
  color: #f7f9ff;
}
.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}
.button-secondary:hover {
  border-color: #bfc8d9;
  background: var(--surface-soft);
  color: var(--text);
}
.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}
.button-quiet:hover { background: var(--surface-muted); color: var(--text); }
.button-small { height: 32px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.button-block { width: 100%; height: 44px; font-size: 12.5px; }
.button-danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.button-danger:hover { border-color: var(--danger-hover); background: var(--danger-hover); }

/* ------------------------------------------------------------------ */
/* Stats                                                               */
/* ------------------------------------------------------------------ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
.stat-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  animation: fade-up 0.45s var(--ease) both;
}
.stat-card:nth-child(2) { animation-delay: 0.04s; }
.stat-card:nth-child(3) { animation-delay: 0.08s; }
.stat-card:nth-child(4) { animation-delay: 0.12s; }
.stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
}
.stat-icon svg { width: 19px; height: 19px; }
.stat-icon-blue { background: var(--brand-soft); color: var(--brand); }
.stat-icon-violet { background: var(--violet-soft); color: var(--violet); }
.stat-icon-green { background: var(--success-soft); color: var(--success); }
.stat-icon-amber { background: var(--amber-soft); color: var(--amber); }
.stat-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.stat-copy > span { color: var(--text-muted); font-size: 10px; }
.stat-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-copy strong b { font-weight: 650; }
.stat-copy strong small { color: var(--text-muted); font-size: 10px; font-weight: 400; }

/* ------------------------------------------------------------------ */
/* Panels / workspace                                                  */
/* ------------------------------------------------------------------ */

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: fade-up 0.45s var(--ease) both;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  align-items: start;
  gap: 18px;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 0;
}
.panel-head h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.panel-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11.5px;
}
.panel-tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.panel-tag-neutral { background: var(--surface-muted); color: var(--text-muted); }
.panel-body { padding: 18px 22px 22px; }

/* Dropzone ---------------------------------------------------------- */

.dropzone {
  position: relative;
  display: flex;
  min-height: 292px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  overflow: hidden;
  border: 1.5px dashed #cbd5e7;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(248, 250, 255, 0.92), rgba(246, 249, 255, 0.62)),
    repeating-linear-gradient(45deg, transparent 0 11px, rgba(47, 91, 255, 0.018) 11px 12px);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: #9eb1ff;
  background: #f7f9ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.08);
}
.dropzone.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: scale(1.003);
}
.upload-panel.is-dragover {
  border-color: #b7c4ff;
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.08), var(--shadow-sm);
}
.dropzone input { display: none; }
.dropzone-art {
  position: relative;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin-bottom: 16px;
}
.dropzone-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed #c8d5ff;
  border-radius: 50%;
  transition: transform 0.6s var(--ease), border-color 0.2s ease;
}
.dropzone-ring::before,
.dropzone-ring::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--brand);
}
.dropzone-ring::before { top: 8px; right: 11px; }
.dropzone-ring::after { bottom: 12px; left: 5px; opacity: 0.5; }
.dropzone:hover .dropzone-ring { transform: rotate(24deg); border-color: #a7b9ff; }
.dropzone-cloud {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid #dfe6ff;
  border-radius: 17px;
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 22px -14px rgba(47, 91, 255, 0.45);
}
.dropzone-cloud svg { width: 30px; height: 30px; }
.dropzone-chip {
  position: absolute;
  display: grid;
  height: 21px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.dropzone-chip-pdf { top: 10px; left: -10px; transform: rotate(-8deg); color: #d64545; border-color: #f1d6d6; }
.dropzone-chip-img { right: -9px; bottom: 13px; transform: rotate(7deg); color: var(--violet); border-color: #e3dcff; }

.dropzone-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.dropzone-sub {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11.5px;
}
.dropzone-sub b { color: var(--brand); font-weight: 600; }
.dropzone-hint {
  margin-top: 14px;
  color: #9aa4b6;
  font-size: 10.5px;
}

/* Picked files ------------------------------------------------------ */

.picked-view { animation: fade-up 0.25s var(--ease) both; }
.picked-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
  color: var(--text-secondary);
  font-size: 11.5px;
}
.picked-toolbar > span > b { color: var(--text); font-weight: 650; }
.picked-total {
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
}
.picked-toolbar-actions { display: flex; gap: 12px; }
.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
}
.text-button:hover { border-color: var(--brand); }
.text-button-muted { color: var(--text-muted); }
.text-button-muted:hover { border-color: var(--text-muted); }
.text-button-danger { color: var(--danger); }
.text-button-danger:hover { border-color: var(--danger); }

.file-list-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 80px 34px;
  gap: 0;
  padding: 0 10px 7px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9px;
}
.file-list-head span:first-child { grid-column: 1 / 3; }
.file-list-head span:nth-child(2) { grid-column: 3; }
.file-list-head span:nth-child(3) { grid-column: 4; }

.picked-list {
  max-height: 338px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #cbd3e2 transparent;
}
.picked-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 80px 34px;
  align-items: center;
  min-height: 56px;
  padding: 6px 10px;
  border-bottom: 1px solid #edf0f5;
  animation: row-in 0.22s var(--ease) both;
}
.picked-row:last-child { border-bottom: 0; }
.picked-row:hover { background: #fafbff; }

.file-type {
  display: grid;
  width: 35px;
  height: 39px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f6f8fc;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 6.8px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow: hidden;
}
.file-type.type-pdf { border-color: #f4dada; background: #fff5f5; color: #d64545; }
.file-type.type-image { border-color: #e5dcff; background: #f7f3ff; color: #7b57e8; }
.file-type.type-zip { border-color: #f3e2c7; background: #fffaef; color: #b57616; }
.file-type.type-doc { border-color: #d9e5ff; background: #f4f8ff; color: #2f67d8; }
.file-type.type-text { border-color: #dce3ea; background: #f7f9fb; color: #617084; }
.file-type.type-video { border-color: #d8eee8; background: #f2fbf8; color: #17866c; }

.file-copy { min-width: 0; padding-right: 14px; }
.file-copy b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-copy span {
  display: block;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 9px;
}
.file-size {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}
.remove-file {
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a1aabb;
  transition: background 0.18s ease, color 0.18s ease;
}
.remove-file:hover { background: var(--danger-soft); color: var(--danger); }
.remove-file svg { width: 14px; height: 14px; }

.add-more-zone {
  display: flex;
  width: 100%;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  border: 1px dashed #d6ddeb;
  border-radius: 9px;
  background: #fbfcff;
  color: var(--text-muted);
  font-size: 10px;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.add-more-zone:hover {
  border-color: #acbcf9;
  background: var(--brand-soft);
  color: var(--brand);
}
.add-more-zone svg { width: 14px; height: 14px; }

/* Uploading --------------------------------------------------------- */

.uploading-view { animation: fade-up 0.25s var(--ease) both; }
.uploading-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.uploading-title-group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.upload-spinner {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 2.5px solid var(--brand-soft-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.uploading-title-group h3 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 650;
}
.uploading-title-group p {
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
}
.uploading-percent {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 650;
}
.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-muted);
}
.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5578ff, var(--brand));
  transition: width 0.25s ease;
  position: relative;
  overflow: hidden;
}
.progress-track > span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  animation: progress-shine 1.3s ease infinite;
}
.progress-track > span.is-error { background: var(--danger); }
.progress-track > span.is-error::after { animation: none; }

.upload-progress-list {
  max-height: 250px;
  margin: 15px 0 0;
  padding: 0;
  overflow: auto;
  border-top: 1px solid var(--border);
  list-style: none;
  scrollbar-width: thin;
}
.upload-progress-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid #edf0f5;
}
.upload-progress-row .file-type { width: 30px; height: 33px; font-size: 6px; border-radius: 6px; }
.upload-progress-name {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-progress-state {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}
.upload-progress-row.is-done .upload-progress-state { color: var(--success); }
.upload-progress-row.is-error .upload-progress-state { color: var(--danger); }
.uploading-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 9px;
}

/* Settings ---------------------------------------------------------- */

.settings-panel { position: sticky; top: 82px; }
.settings-body { padding: 17px 22px 20px; }
.settings-panel.is-disabled { opacity: 0.62; }
.settings-panel.is-disabled .settings-body { pointer-events: none; }
.form-field + .form-field { margin-top: 19px; }
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.field-label {
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}
.field-optional {
  color: var(--text-muted);
  font-size: 9px;
}
.info-button {
  display: grid;
  width: 18px;
  height: 18px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a3adc0;
}
.info-button:hover { background: var(--surface-muted); color: var(--brand); }
.info-button svg { width: 14px; height: 14px; }

.expiry-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.expiry-option { position: relative; display: block; cursor: pointer; }
.expiry-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.expiry-option > span {
  display: flex;
  min-height: 51px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.expiry-option b { color: var(--text-secondary); font-size: 11.5px; font-weight: 600; }
.expiry-option small { color: var(--text-muted); font-size: 8px; }
.expiry-option:hover > span { border-color: #b9c4d8; }
.expiry-option input:checked + span {
  border-color: #a8baff;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(47, 91, 255, 0.08);
}
.expiry-option input:checked + span b { color: var(--brand-ink); }
.expiry-option input:checked + span small { color: var(--brand); }
.expiry-option input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.textarea-wrap { position: relative; }
.textarea-wrap textarea {
  width: 100%;
  min-height: 88px;
  padding: 10px 11px 24px;
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: none;
  background: #fbfcff;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.65;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.textarea-wrap textarea::placeholder { color: #a7b0c0; }
.textarea-wrap textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.1);
}
.char-count {
  position: absolute;
  right: 10px;
  bottom: 7px;
  color: #a3adc0;
  font-family: var(--font-mono);
  font-size: 7.5px;
  pointer-events: none;
}

.summary-box {
  margin-top: 19px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 3px 0;
  color: var(--text-muted);
  font-size: 10.5px;
}
.summary-row b {
  max-width: 60%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-body .button-block { margin-top: 14px; }
.privacy-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 9.5px;
  text-align: center;
}
.privacy-caption svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* ------------------------------------------------------------------ */
/* History                                                             */
/* ------------------------------------------------------------------ */

.history-panel { margin-top: 18px; overflow: hidden; }
.history-panel .panel-head { padding-bottom: 16px; }
.history-empty {
  padding: 34px 22px 37px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px dashed #cdd8ef;
  border-radius: 16px;
  background: var(--surface-soft);
  color: #9aabd0;
}
.empty-icon svg { width: 33px; height: 33px; }
.history-empty h3 { margin: 0 0 4px; font-size: 12.5px; font-weight: 650; }
.history-empty p {
  margin: 0 auto;
  max-width: 340px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.7;
}
.history-empty .button { margin-top: 14px; }

.history-content { border-top: 1px solid var(--border); }
.history-head,
.history-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) 112px 112px 84px 196px;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
}
.history-head {
  height: 36px;
  border-bottom: 1px solid var(--border);
  background: #fafbfe;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 500;
}
.history-list { margin: 0; padding: 0; list-style: none; }
.history-row {
  min-height: 65px;
  border-bottom: 1px solid #edf0f5;
  transition: background 0.18s ease;
}
.history-row:last-child { border-bottom: 0; }
.history-row:hover { background: #fbfcff; }

.history-file { display: flex; min-width: 0; align-items: center; gap: 10px; }
.history-file .file-type { width: 32px; height: 35px; border-radius: 7px; }
.history-copy { min-width: 0; }
.history-copy b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-copy span {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-date,
.history-expiry {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}
.history-expiry { color: var(--text-muted); }
.status-badge {
  display: inline-flex;
  width: fit-content;
  height: 21px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge.is-live { background: var(--success-soft); color: #087b56; }
.status-badge.is-expired { background: var(--surface-muted); color: var(--text-muted); }
.history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.history-action {
  display: inline-flex;
  height: 27px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 9.5px;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.history-action svg { width: 12px; height: 12px; }
.history-action:hover {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text-secondary);
}
.history-action.danger:hover {
  border-color: #f4d6d7;
  background: var(--danger-soft);
  color: var(--danger);
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px 0;
  color: var(--text-muted);
  font-size: 9px;
}
.app-footer button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--text-secondary);
  font-size: inherit;
}
.app-footer button:hover { color: var(--brand); border-color: var(--brand); }

/* ------------------------------------------------------------------ */
/* Dialogs                                                             */
/* ------------------------------------------------------------------ */

.dialog {
  width: min(440px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 27px 27px 23px;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.dialog[open] { animation: dialog-in 0.28s var(--ease) both; }
.dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.dialog-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98a2b3;
  transition: background 0.18s ease, color 0.18s ease;
}
.dialog-close:hover { background: var(--surface-muted); color: var(--text); }
.dialog-close svg { width: 16px; height: 16px; }
.dialog-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 16px;
}
.dialog-icon svg { width: 31px; height: 31px; }
.dialog-icon-success { background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 7px #f6f8ff; }
.dialog-icon-danger { background: var(--danger-soft); color: var(--danger); }
.dialog-kicker {
  margin: 0 0 5px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
}
.dialog h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.035em;
}
.dialog-subtitle {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.7;
}
.confirm-copy { max-width: 330px; }

.copy-field {
  display: flex;
  align-items: stretch;
  margin-top: 19px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.copy-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.09);
}
.copy-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 9px;
}
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.copy-button:hover { background: var(--brand-soft); }
.copy-button svg { width: 14px; height: 14px; }
.copy-button.is-copied { background: var(--success-soft); color: #087b56; }

.result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 9.5px;
}
.result-meta i { width: 3px; height: 3px; border-radius: 50%; background: #cbd3e1; }
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 21px;
}
.dialog-actions .button { flex: 1; height: 40px; }
.dialog-actions-end { justify-content: flex-end; }
.dialog-actions-end .button { flex: 0 0 auto; min-width: 96px; }
.dialog-footnote {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9.5px;
  line-height: 1.6;
}
.dialog-footnote svg { width: 12px; height: 12px; flex: 0 0 auto; margin-top: 1px; }

.help-dialog { width: min(560px, calc(100vw - 30px)); }
.help-steps {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.help-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.help-steps > li > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
}
.help-steps b { font-size: 11.5px; font-weight: 600; }
.help-steps p { margin: 2px 0 0; color: var(--text-muted); font-size: 10.5px; line-height: 1.6; }
.help-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e4e9ff;
  border-radius: 10px;
  background: #f7f9ff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.help-note.is-highlight {
  border-color: #aebeff;
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.09);
}
.help-note-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}
.help-note-icon svg { width: 16px; height: 16px; }
.help-note b { font-size: 10px; font-weight: 600; }
.help-note p { margin: 2px 0 0; color: var(--text-muted); font-size: 9px; line-height: 1.65; }

.confirm-dialog { width: min(390px, calc(100vw - 30px)); }
.confirm-dialog .dialog-actions { margin-top: 22px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  max-width: min(380px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #1d2939;
  color: #fff;
  font-size: 11.5px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  box-shadow: 0 14px 30px -12px rgba(16, 24, 40, 0.45);
  transition: opacity 0.2s ease, transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }
.toast.is-error { background: #b4232a; }

/* ------------------------------------------------------------------ */
/* Animations                                                          */
/* ------------------------------------------------------------------ */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1180px) {
  .main-content { padding-right: 24px; padding-left: 24px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 316px; gap: 15px; }
  .history-head,
  .history-row { grid-template-columns: minmax(190px, 1.5fr) 100px 100px 78px 178px; gap: 10px; }
  .history-action { padding: 0 5px; }
}

@media (max-width: 1040px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-panel { position: static; }
  .settings-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
  .settings-body .form-field { margin-top: 0; }
  .settings-body .summary-box { grid-column: 1 / -1; margin-top: 18px; }
  .settings-body .button-block { grid-column: 1 / -1; margin-top: 14px; }
  .settings-body .privacy-caption { grid-column: 1 / -1; }
  .history-head { display: none; }
  .history-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 14px;
    padding: 12px 22px;
  }
  .history-file { grid-column: 1; }
  .history-date { display: none; }
  .history-expiry { grid-column: 1; font-size: 8px; }
  .status-badge { grid-column: 2; grid-row: 1; justify-self: end; }
  .history-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 2px; }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-104%);
    transition: transform 0.25s var(--ease);
    box-shadow: 24px 0 60px -30px rgba(16, 24, 40, 0.28);
  }
  .sidebar.is-open { transform: none; }
  .sidebar-close { display: inline-grid; }
  .main-shell { margin-left: 0; }
  .menu-button { display: inline-grid; }
  .topbar { padding: 0 20px; }
  .main-content { padding: 24px 20px 36px; }
  .history-head { display: none; }
  .history-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 14px;
    padding: 12px 20px;
  }
  .history-file { grid-column: 1; }
  .history-date { display: none; }
  .history-expiry {
    grid-column: 1;
    font-size: 8px;
  }
  .status-badge { grid-column: 2; grid-row: 1; justify-self: end; }
  .history-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 2px; }
}

@media (max-width: 620px) {
  .topbar { height: 58px; padding: 0 14px; }
  .service-pill { display: none; }
  .main-content { padding: 20px 14px 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 26px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .stats-grid { gap: 8px; margin-bottom: 14px; }
  .stat-card { padding: 11px 12px; gap: 9px; border-radius: 13px; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-copy > span { font-size: 9px; }
  .stat-copy strong { font-size: 14px; }
  .panel-head { padding: 16px 16px 0; gap: 12px; }
  .panel-head h2 { font-size: 14px; }
  .panel-body { padding: 14px 16px 16px; }
  .dropzone { min-height: 246px; padding: 22px 14px; border-radius: 13px; }
  .dropzone-art { width: 74px; height: 74px; margin-bottom: 13px; }
  .dropzone-cloud { width: 49px; height: 49px; border-radius: 14px; }
  .dropzone-cloud svg { width: 26px; height: 26px; }
  .dropzone-title { font-size: 15px; }
  .dropzone-sub { font-size: 11.5px; }
  .file-list-head { grid-template-columns: 44px minmax(0, 1fr) 59px 29px; padding-right: 4px; padding-left: 4px; }
  .picked-row { grid-template-columns: 44px minmax(0, 1fr) 59px 29px; padding-right: 4px; padding-left: 4px; }
  .file-type { width: 31px; height: 35px; border-radius: 7px; font-size: 6px; }
  .file-copy b { font-size: 11.5px; }
  .file-size { font-size: 8px; }
  .picked-toolbar { font-size: 10.5px; }
  .picked-toolbar-actions { gap: 9px; }
  .text-button { font-size: 10.5px; }
  .settings-body { display: block; padding: 15px 16px 17px; }
  .settings-body .form-field:nth-child(2) { margin-top: 17px; }
  .summary-box { margin-top: 17px; }
  .uploading-percent { font-size: 15px; }
  .uploading-title-group h3 { font-size: 12.5px; }
  .uploading-title-group p { font-size: 9px; }
  .history-panel .panel-head { padding-bottom: 13px; }
  .history-empty { padding: 28px 18px 31px; }
  .history-row { padding: 12px 16px; }
  .history-actions { gap: 2px; }
  .history-action { padding: 0 6px; font-size: 8px; }
  .app-footer { flex-direction: column; align-items: flex-start; gap: 5px; padding-top: 18px; }
  .dialog { padding: 23px 20px 20px; border-radius: 17px; }
  .dialog h2 { font-size: 19px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; flex: none; }
  .dialog-actions-end { flex-direction: row; }
  .dialog-actions-end .button { width: auto; }
  .toast { right: 14px; bottom: 14px; }
}

@media (max-width: 380px) {
  .brand-copy small { display: none; }
  .stat-icon { display: none; }
  .stat-card { padding: 10px 11px; }
  .stat-copy > span { font-size: 9.5px; }
  .stat-copy strong { font-size: 13px; }
  .history-action span { display: none; }
  .history-action svg { width: 14px; height: 14px; }
  .history-action { width: 28px; justify-content: center; padding: 0; }
}

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

