/* ============================================================
   File Collector — App-style UI v2.0
   移动优先 · 禁止缩放 · iOS 风格 · 安全区域适配
   ============================================================ */

:root {
  /* 品牌色 */
  --c-primary: #3b82f6;
  --c-primary-hover: #2563eb;
  --c-primary-light: #eff6ff;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;
  --c-info: #06b6d4;
  --c-purple: #8b5cf6;

  /* 中性色 */
  --c-bg: #f2f3f5;
  --c-white: #fff;
  --c-border: #e8e8ed;
  --c-text: #1a1a2e;
  --c-text-soft: #6b7280;
  --c-text-muted: #9ca3af;

  /* 尺寸 */
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  --header-h: 44px;
  --tabbar-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: var(--safe-bottom);
}

a { color: var(--c-primary); text-decoration: none; -webkit-touch-callout: none; }
a:hover { opacity: .85; }
a:active { opacity: .6; }

/* ============================================================
   Header — iOS 风格导航栏
   ============================================================ */
.header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: .5px solid var(--c-border);
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.header-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: -.3px;
}
.header-brand img {
  width: 26px; height: 26px;
  border-radius: 0px;
  flex-shrink: 0;
  object-fit: contain;
}
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  font-size: .85rem;
  color: var(--c-primary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
  transition: background .15s;
}
.header-nav a:active { background: var(--c-primary-light); }
.header-nav a.logout-link { color: var(--c-danger); }

/* ============================================================
   Main Content
   ============================================================ */
.main {
  flex: 1;
  padding: 12px 16px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}
.main-inner { width: 100%; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  text-align: center;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  font-size: .75rem;
  color: var(--c-text-muted);
}

/* ============================================================
   Cards — iOS 风格圆角卡片
   ============================================================ */
.card {
  background: var(--c-white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: .5px solid var(--c-border);
}
.card-header h2, .card-header h3 {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.2px;
}
.card-body { padding: 16px; }
.card-footer {
  padding: 12px 16px;
  border-top: .5px solid var(--c-border);
  background: #fafbfc;
  text-align: center;
}

/* ============================================================
   Stats Grid — 统计卡片
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: transform .15s;
}
.stat-card:active { transform: scale(.97); }
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.5px;
  color: var(--c-primary);
}
.stat-label {
  font-size: .75rem;
  color: var(--c-text-soft);
  margin-top: 2px;
}

/* ============================================================
   Buttons — iOS 风格
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 500;
  font-family: var(--font);
  border-radius: 20px;
  border: none;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  background: #f0f0f5;
  color: var(--c-text);
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); opacity: .8; }
.btn:disabled { opacity: .4; pointer-events: none; }

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-success { background: var(--c-success); color: #fff; }
.btn-warning { background: var(--c-warning); color: #fff; }
.btn-info { background: var(--c-info); color: #fff; }
.btn-purple { background: var(--c-purple); color: #fff; }

.btn-outline { background: transparent; border: 1.5px solid var(--c-border); color: var(--c-text); }
.btn-outline-primary { background: transparent; border: 1.5px solid var(--c-primary); color: var(--c-primary); }
.btn-outline-danger { background: transparent; border: 1.5px solid var(--c-danger); color: var(--c-danger); }

.btn-sm { padding: 5px 14px; font-size: .78rem; border-radius: 16px; }
.btn-xs { padding: 3px 10px; font-size: .72rem; border-radius: 12px; }
.btn-block { display: flex; width: 100%; }
.text-center { text-align: center; }
.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
}

/* ============================================================
   Forms — iOS 风格输入框
   ============================================================ */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--c-text);
  letter-spacing: -.1px;
}
.form-hint { font-size: .72rem; color: var(--c-text-muted); margin-top: 4px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--c-text);
  background: #f7f8fa;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  line-height: 1.5;
  transition: all .15s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  background: var(--c-white);
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.form-input::placeholder { color: #c0c4cc; }
.form-textarea { resize: vertical; min-height: 72px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M5 6L0 0h10z' fill='%239ca3af'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .88rem;
}
.form-check input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--c-primary);
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

/* ============================================================
   Tables — 干净表格
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
thead th {
  background: #fafbfc;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  color: var(--c-text-soft);
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
  border-bottom: 1px solid var(--c-border);
}
tbody td {
  padding: 11px 14px;
  border-bottom: .5px solid #f2f3f5;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:active { background: #f7f8fa; }

/* ============================================================
   Dashboard Recent Uploads Table (deprecated, kept for compatibility)
   ============================================================ */
.dash-records { table-layout: fixed; min-width: 0; }
.dash-records th, .dash-records td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-records th:nth-child(2), .dash-records td:nth-child(2) { width: 65px; }
.dash-records th:nth-child(3), .dash-records td:nth-child(3) { width: 80px; }
.dash-records th:nth-child(4), .dash-records td:nth-child(4) { width: 45px; text-align: center; }
.dash-records th:nth-child(5), .dash-records td:nth-child(5) { width: 100px; }
.dash-records td:first-child { max-width: none; }
.dash-records td:first-child a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

@media (max-width: 768px) {
  .dash-records th:nth-child(3), .dash-records td:nth-child(3),
  .dash-records th:nth-child(4), .dash-records td:nth-child(4) { display: none; }
}

@media (max-width: 480px) {
  .dash-records th:nth-child(5), .dash-records td:nth-child(5) { display: none; }
}

/* --full modifier: records page with checkbox + actions (PC) */
.dash-records--full {
  table-layout: fixed;
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}
.dash-records--full th, .dash-records--full td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 6px;
}
/* 列宽：checkbox + 文件名(弹性) + 大小/来源/下载/IP/时间 + 操作（用 class 定位，兼容不同列数） */
.dash-records--full .col-chk { width: 38px; text-align: center; }
.dash-records--full .col-chk input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--c-primary); }
.dash-records--full .col-name { /* 弹性 — 占用剩余宽度 */ }
.dash-records--full .col-name a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  text-decoration: none;
  color: var(--c-primary);
}
.dash-records--full .col-name a:hover { text-decoration: underline; }
.dash-records--full .col-size { width: 68px; }
.dash-records--full .col-src  { width: 92px; }
.dash-records--full .col-dl   { width: 50px; text-align: center; }
.dash-records--full .col-ip   { width: 138px; }
.dash-records--full .col-time { width: 140px; }
.dash-records--full .col-meta { color: var(--c-text-soft); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-records--full .col-meta-dim { color: var(--c-text-muted); font-size: .78rem; }
.dash-records--full .col-act { width: 48px; text-align: center; }

/* 删除按钮：统一 × 图标，hover 变红 */
.btn-record-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #a0a4b0;
  font-size: 1rem;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.btn-record-del:hover {
  background: #fee2e2;
  color: var(--c-danger);
}

/* 900px: hide IP + downloads on full records */
@media (max-width: 900px) {
  .dash-records--full th:nth-child(6), .dash-records--full td:nth-child(6),
  .dash-records--full th:nth-child(5), .dash-records--full td:nth-child(5) { display: none; }
}

/* 768px: hide source + downloads on dashboard (6-col table becomes 4-col) */
@media (max-width: 768px) {
  .dash-records--full th:nth-child(4), .dash-records--full td:nth-child(4),
  .dash-records--full th:nth-child(3), .dash-records--full td:nth-child(3) { display: none; }
}

/* 640px: dashboard switches to cards, hide PC table */
@media (max-width: 640px) {
  .dash-records--full th:nth-child(6), .dash-records--full td:nth-child(6) { display: none; }
}

/* ============================================================
   Records — PC 表格 / 移动端卡片 切换
   ============================================================ */
.records-table-pc {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.records-cards-mobile { display: none; }

@media (max-width: 640px) {
  .records-table-pc { display: none; }
  .records-cards-mobile { display: block; }
}

/* 记录卡片 */
.record-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: .5px solid #f2f3f5;
  background: var(--c-white);
  transition: background .12s;
}
.record-card:last-child { border-bottom: none; }
.record-card:active { background: #f7f8fa; }

.record-card-left {
  flex-shrink: 0;
  padding-top: 2px;
}
.record-card-check {
  display: flex;
  align-items: center;
}
.record-card-check input {
  width: 17px; height: 17px;
  cursor: pointer;
  accent-color: var(--c-primary);
}

.record-card-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.record-card-name {
  display: block;
  font-size: .94rem;
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  line-height: 1.45;
  word-break: break-word;
  margin-bottom: 6px;
}
.record-card-name:hover { text-decoration: underline; }

.record-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: .75rem;
  color: var(--c-text-soft);
  line-height: 1.6;
}
.record-card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 12px;
  color: #d0d0d8;
}

.record-card-right {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

/* ============================================================
   Links Table
   ============================================================ */
.links-table { table-layout: fixed; width: 100%; }
.links-table th, .links-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links-table tbody td { padding: 8px 10px; }
.links-table .col-title  { width: 120px; }
.links-table .col-limit  { width: 100px; }
.links-table .col-expire { width: 130px; }
.links-table .col-status { width: 64px; }
.links-table .col-time   { width: 145px; }
.links-table .col-act    { width: 190px; }

@media (max-width: 768px) {
  .links-table .col-limit, .links-table .col-time { display: none; }
  .links-table .col-title { width: 110px; }
  .links-table .col-act   { width: 170px; }
}

@media (max-width: 480px) {
  .links-table .col-expire { display: none; }
  .links-table .col-title  { width: 90px; }
  .links-table .col-status { width: 56px; }
  .links-table .col-act    { width: 100px; }
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 500;
  border-radius: 10px;
  background: #f0f0f5;
  color: var(--c-text-soft);
  letter-spacing: .1px;
}
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-info { background: var(--c-primary-light); color: #1e40af; }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-error   { background: #fef2f2; color: #991b1b; }
.alert-warning { background: #fffbeb; color: #92400e; }
.alert-info    { background: var(--c-primary-light); color: #1e40af; }
.flash-container { margin-bottom: 12px; }

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--c-text-muted);
}
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--c-text-soft); margin-bottom: 4px; }
.empty-state p { font-size: .85rem; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pagination .page-info {
  font-size: .82rem;
  color: var(--c-text-soft);
  padding: 0 6px;
}

/* ============================================================
   Admin Sidebar — TabBar 风格
   ============================================================ */
.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sidebar-nav {
  display: flex;
  background: var(--c-white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.sidebar-nav a {
  flex: 1;
  text-align: center;
  padding: 11px 4px;
  font-size: .82rem;
  color: var(--c-text-soft);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: all .15s;
  position: relative;
}
.sidebar-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2.5px;
  background: transparent;
  border-radius: 2px;
  transition: background .15s;
}
.sidebar-nav a:active { background: #f7f8fa; }
.sidebar-nav a.active {
  color: var(--c-primary);
  font-weight: 600;
}
.sidebar-nav a.active::after { background: var(--c-primary); }

@media (max-width: 480px) {
  .sidebar-nav { border-radius: var(--radius-sm); }
  .sidebar-nav a { font-size: .75rem; padding: 10px 4px; }
  .sidebar-nav a::after { left: 10px; right: 10px; }
}

.admin-content { flex: 1; min-width: 0; width: 100%; }

/* ============================================================
   Action Group — 按钮组
   ============================================================ */
.action-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.action-group form { display: inline-flex; margin: 0; }

@media (max-width: 480px) {
  .action-group {
    flex-direction: column;
    width: 100%;
    gap: 4px;
  }
  .action-group .btn,
  .action-group form .btn {
    width: 100%;
    text-align: center;
    font-size: .75rem;
    padding: 6px 14px;
    border-radius: 16px;
  }
  .action-group form {
    width: 100%;
    display: flex;
  }
}

/* ============================================================
   Toggle Section — 可折叠区块
   ============================================================ */
.toggle-section { margin-bottom: 12px; }
.toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--c-white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.toggle-header:active { background: #f7f8fa; }
.toggle-body {
  display: none;
  padding: 16px;
  background: var(--c-white);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.toggle-section.open .toggle-body { display: block; }
.toggle-section.open .toggle-header { border-radius: var(--radius) var(--radius) 0 0; }

/* ============================================================
   Settings Grid
   ============================================================ */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================
   Info Row
   ============================================================ */
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: .5px solid #f2f3f5;
  font-size: .84rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--c-text-soft); flex-shrink: 0; }
.info-row .info-value { font-family: "SF Mono", "Consolas", monospace; font-size: .78rem; min-width: 0; word-break: break-all; text-align: right; }

/* ============================================================
   WeChat Warning
   ============================================================ */
.wechat-warn {
  background: #fffbeb;
  border-bottom: 1px solid #fcd34d;
  text-align: center;
  padding: 8px 16px;
  font-size: .8rem;
  color: #92400e;
  font-weight: 500;
}

/* ============================================================
   Auth Page — 登录页
   ============================================================ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--c-bg);
}
.auth-card {
  background: var(--c-white);
  border-radius: 20px;
  padding: 36px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.auth-card h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 2px;
  text-align: center;
  letter-spacing: -.3px;
}
.auth-card .auth-subtitle {
  font-size: .85rem;
  color: var(--c-text-soft);
  margin-bottom: 24px;
  text-align: center;
}
.auth-tip {
  margin-top: 16px;
  padding: 10px 14px;
  background: #fffbeb;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  color: #92400e;
  text-align: center;
}

/* ============================================================
   Error Page
   ============================================================ */
.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--c-bg);
}
.error-card {
  text-align: center;
  background: var(--c-white);
  border-radius: 20px;
  padding: 40px 28px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.error-code {
  font-size: 3.5rem;
  font-weight: 800;
  color: #e5e7eb;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}
.error-card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.error-card p { color: var(--c-text-soft); margin-bottom: 20px; font-size: .88rem; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: rgba(30,30,40,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: .1px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   Copy Row
   ============================================================ */
.copy-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-row code {
  font-family: "SF Mono", "Consolas", "Monaco", monospace;
  font-size: .75rem;
  background: #f7f8fa;
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  padding: 3px 8px;
  font-size: .7rem;
  background: var(--c-primary-light);
  color: var(--c-primary);
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn:active { background: #dbeafe; }

/* ============================================================
   Quick Links
   ============================================================ */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--c-white);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--c-text);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: transform .15s;
}
.quick-link:active { transform: scale(.97); }

@media (max-width: 480px) {
  .quick-links { grid-template-columns: 1fr; }
}

/* ============================================================
   Responsive Global
   ============================================================ */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .main { padding: 10px 12px; }
  .form-row { grid-template-columns: 1fr; }
  .header-nav a { font-size: .8rem; padding: 5px 10px; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .main { padding: 8px 10px; }
  .card-header { padding: 12px 14px; }
  .card-body { padding: 12px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 14px 10px; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: .7rem; }
  .btn { font-size: .82rem; padding: 7px 14px; }
  .btn-sm { font-size: .75rem; padding: 4px 12px; }
  thead th, tbody td { padding: 8px 10px; font-size: .78rem; }
  .sidebar-nav { border-radius: var(--radius-sm); }
  .toggle-header { padding: 10px 14px; font-size: .84rem; }
  .toggle-body { padding: 12px; }
  .error-code { font-size: 3rem; }
  .form-input, .form-select, .form-textarea { padding: 9px 12px; font-size: .85rem; }
}

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d0d8; border-radius: 2px; }
