/* ============================================================
   爱搜云盘 · 管理后台样式
   「深色精致工作台」—— 克制、精密、高信息密度
   仅由 admin.html 引用；公开取件页使用独立的 style.css
   ============================================================ */

/* ---------- 1~2. 设计令牌与基础重置 ---------- */
/* 统一由 tokens.css 提供（单一真相源），admin.html 已先行引入 */

/* ---------- 3. 按钮体系 ---------- */
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
button:hover,
.button:hover {
  background: #22262e;
  border-color: rgba(255, 255, 255, 0.2);
}
button:active {
  transform: translateY(0.5px);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
button:focus-visible,
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* 主按钮 */
.button {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.button:hover {
  background: var(--accent-hover);
  border-color: transparent;
}

/* 次级按钮 */
.button.secondary {
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--border-strong);
  box-shadow: none;
}
.button.secondary:hover {
  background: #22262e;
  border-color: rgba(255, 255, 255, 0.2);
}

/* 危险按钮 */
.button.danger {
  color: #fff;
  background: var(--danger);
  border-color: transparent;
}
.button.danger:hover {
  background: #f2607a;
  border-color: transparent;
}

.full-button {
  width: 100%;
  margin-top: 14px;
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.full-button:hover {
  background: var(--accent-hover);
}

/* ---------- 4. 表单 ---------- */
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input::placeholder {
  color: var(--text-dim);
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.error {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #fda4af;
}

.back-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.back-link:hover {
  color: var(--text);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.muted {
  color: var(--text-muted);
}

.panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ---------- 5. 登录页 ---------- */
.auth-layout {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  overflow: hidden;
}

.auth-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.17), transparent 66%);
  filter: blur(28px);
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: min(400px, 100%);
  padding: 34px 32px 28px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, #6366f1, #8b5cf6);
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.brand-mark.small {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  font-size: 16px;
}

.auth-card .eyebrow {
  margin-top: 20px;
}

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

.auth-card .muted {
  margin: 6px 0 0;
  font-size: 13px;
}

.auth-card form {
  margin-top: 22px;
}

/* ---------- 6. 应用外壳 ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex: 0 0 244px;
  flex-direction: column;
  width: 244px;
  height: 100vh;
  padding: 18px 14px 16px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 20px;
}
.brand strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.sidebar nav {
  display: grid;
  gap: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}
.nav-item.active {
  color: var(--accent-text);
  background: var(--accent-soft);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 2px;
  height: 16px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  transform: translateY(-50%);
}

.sidebar-section {
  display: grid;
  gap: 2px;
  margin-top: 24px;
}

.section-label {
  margin: 0 10px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.storage-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  box-shadow: none;
}
.storage-tab:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: transparent;
}
.storage-tab.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.storage-tab > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.storage-tab b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.storage-tab small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storage-tab i {
  font-style: normal;
  font-size: 15px;
  color: var(--text-dim);
}
.storage-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.storage-dot.r2 {
  background: #f6ae62;
}
.storage-dot.aws {
  background: #7aa7ff;
}

.sidebar-bottom {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.settings-link,
.logout-link {
  justify-content: flex-start;
  gap: 8px;
  padding: 9px 10px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  box-shadow: none;
}
.settings-link:hover,
.logout-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: transparent;
}

/* ---------- 7. 主内容区 ---------- */
.main-content {
  flex: 1;
  min-width: 0;
  max-width: 1280px;
  padding: 28px 32px 48px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.page-head .muted {
  margin: 4px 0 0;
  font-size: 13px;
}
.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notice {
  padding: 11px 14px;
  margin: 0 0 16px;
  font-size: 12.5px;
  color: #fcd88a;
  background: rgba(251, 191, 36, 0.09);
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: var(--r-md);
}

/* ---------- 8. 统计卡片 ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 16px 17px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.stat-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.stat-card > span {
  display: block;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text-dim);
}
.stat-card strong {
  display: block;
  margin: 8px 0 3px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-card small {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

/* 储存桶已用容量 */
.usage-card {
  position: relative;
}

.usage-refresh {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  box-shadow: none;
}
.usage-refresh:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}
.usage-refresh:disabled {
  opacity: 0.4;
}

.usage-bar {
  position: relative;
  height: 4px;
  margin: 11px 0 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
}
.usage-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.5s var(--ease), background 0.3s var(--ease);
}
.usage-bar i.warn {
  background: var(--warn);
}
.usage-bar i.danger {
  background: var(--danger);
}

.usage-note {
  display: block;
  font-size: 10.5px !important;
  line-height: 1.5;
  color: var(--text-dim) !important;
  word-break: break-word;
}

/* ---------- 9. 文件面板 ---------- */
.file-panel {
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: auto;
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}

.crumb {
  padding: 4px 7px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  box-shadow: none;
}
.crumb:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status {
  font-size: 12px;
  color: var(--accent-text);
}

.icon-button {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: none;
}
.icon-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

/* 列宽节奏：名称自适应，其余定宽，保证多次刷新时列不跳动 */
th:nth-child(2),
td:nth-child(2) {
  width: 106px;
}
th:nth-child(3),
td:nth-child(3) {
  width: 132px;
}
th:nth-child(4),
td:nth-child(4) {
  width: 188px;
}

th {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.018);
}

td {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

tbody tr {
  transition: background 0.12s var(--ease);
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.028);
}
tbody tr:last-child td {
  border-bottom: 0;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.file-name strong {
  overflow: hidden;
  min-width: 0;
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
td:first-child {
  max-width: 460px;
}
.file-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.055);
}
.file-icon.file {
  color: #a5b4fc;
  background: var(--accent-soft);
}
.file-icon.folder {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.13);
}

.align-right {
  text-align: right;
}

.row-actions {
  white-space: nowrap;
}

.table-button {
  padding: 5px 9px;
  margin-left: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  box-shadow: none;
}
.table-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
}
.table-button.delete:hover {
  color: #fda4af;
  background: var(--danger-soft);
  border-color: rgba(244, 63, 94, 0.4);
}

.empty {
  padding: 56px 20px !important;
  text-align: center !important;
}
.empty span {
  display: block;
  margin-bottom: 10px;
  font-size: 26px;
  color: var(--text-dim);
}
.empty b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.empty small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-note {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.secure-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  font-size: 10px;
  border-radius: 50%;
  color: var(--success);
  background: rgba(52, 211, 153, 0.15);
}

/* ---------- 10. 对话框 ---------- */
.settings-dialog {
  width: min(660px, calc(100% - 28px));
  max-height: calc(100vh - 56px);
  margin: auto; /* 确保在视口中垂直居中 */
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.settings-dialog::backdrop {
  background: rgba(4, 5, 8, 0.7);
  backdrop-filter: blur(6px);
}
.settings-dialog form {
  padding: 22px 24px 20px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dialog-head .muted {
  margin: 5px 0 0;
  font-size: 12.5px;
}

.close-button {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  box-shadow: none;
}
.close-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}

.toggle-row {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.toggle-row b {
  font-size: 13px;
}
.toggle-row small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-dim);
}
.toggle-row input {
  display: none;
}
.toggle-row i {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s var(--ease);
}
.toggle-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease);
}
.toggle-row input:checked + i {
  background: var(--accent);
}
.toggle-row input:checked + i::after {
  transform: translateX(16px);
}

.cors-help {
  grid-column: 1 / -1;
  padding: 11px 13px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.cors-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.cors-help p {
  margin: 8px 0;
}
.cors-help pre {
  margin: 0;
  padding: 9px 11px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: #a7e8cf;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--r-sm);
}

.dialog-status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 12px;
  color: #fcd88a;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.dialog-actions > span {
  flex: 1;
}

/* 分享弹窗 */
.share-dialog {
  width: min(440px, calc(100% - 28px));
}

.share-label {
  margin: 0 0 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.share-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-option {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 11px 12px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  box-shadow: none !important;
}
.share-option:hover {
  background: var(--surface-3);
  border-color: var(--border-strong) !important;
}
.share-option b {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.share-option small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
}
.share-option.active {
  background: var(--accent-soft) !important;
  border-color: rgba(99, 102, 241, 0.55) !important;
}
.share-option.active b {
  color: var(--accent-text);
}
.share-option.active small {
  color: #9fa3e8;
}

.share-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-code-card {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
}
.share-code-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.share-code-card strong {
  display: block;
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.share-link-row {
  display: flex;
  gap: 8px;
}
.share-link-row input {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  font-size: 12px;
}
.share-link-row .button {
  flex: 0 0 auto;
}

.share-result-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--success);
}

/* ---------- 11. 吐司 ---------- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: 340px;
  padding: 11px 14px;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.toast.show {
  opacity: 1;
  transform: none;
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1024px) {
  .main-content {
    padding: 24px 22px 40px;
  }
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    flex: none;
    width: auto;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand {
    padding-bottom: 14px;
  }
  .sidebar nav {
    display: none;
  }
  .sidebar-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
  }
  .section-label {
    display: none;
  }
  .sidebar-bottom {
    display: flex;
    gap: 6px;
    margin-top: 12px;
  }
  .sidebar-bottom > * {
    flex: 1;
    justify-content: center;
  }
  .main-content {
    padding: 20px 14px 36px;
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .share-options {
    grid-template-columns: 1fr;
  }
  .share-link-row {
    flex-direction: column;
  }
  .file-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .toolbar-right {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
