:root {
  --color-primary: #b8232f;
  --color-primary-dark: #8c1922;
  --color-primary-soft: #fce4e6;
  --color-text: #1f2933;
  --color-text-soft: #5b6b7c;
  --color-muted: #8c9aab;
  --color-bg: #f4f6fa;
  --color-card: #ffffff;
  --color-border: #e3e8ef;
  --color-border-strong: #cdd5df;
  --color-success: #1f9d55;
  --color-success-soft: #e3f5ec;
  --color-warning: #d97706;
  --color-warning-soft: #fef3c7;
  --color-info: #2563eb;
  --color-info-soft: #dbeafe;
  --color-danger: #dc2626;
  --color-danger-soft: #fee2e2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--color-text);
  height: 100%;
}

body {
  min-height: 100vh;
  background-image: url('/bg.avif?v=11');
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-color: #6c87b3;
}

.hidden { display: none !important; }

a { color: var(--color-info); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

/* ---------- Login ---------- */
.login-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 20px;
  position: relative;
}

.login-hero-logo {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.login-card {
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.brand-banner-wrap {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.brand-banner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.brand-tagline {
  margin: 0;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 13px;
  letter-spacing: 1px;
}

.header-banner {
  height: 88px;
  width: auto;
  max-width: 520px;
  object-fit: contain;
  display: block;
}

.app-sidebar { top: 100px; height: calc(100vh - 100px); }

.login-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; }
.login-form label span { color: var(--color-text-soft); font-size: 13px; }
.login-form input {
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 14px;
}
.login-form input:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px rgba(184, 35, 47, 0.12); }

.form-error {
  color: var(--color-danger);
  background: var(--color-danger-soft);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.test-accounts {
  border-top: 1px solid var(--color-border);
  padding-top: 18px;
}
.test-accounts-header {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--color-text-soft); margin-bottom: 10px;
}
.test-accounts-header small { color: var(--color-muted); font-size: 12px; }
.test-accounts-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.test-account-btn {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: left;
  transition: all 0.15s;
}
.test-account-btn:hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.test-account-btn strong { font-size: 13px; }
.test-account-btn small { color: var(--color-muted); font-size: 11px; }

/* ---------- App shell ---------- */
.app-view {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

.app-header, .app-body { position: relative; z-index: 1; }

.app-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(45, 60, 90, 0.18);
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--color-text);
}

.app-header .app-title { color: var(--color-text); text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5); }
.app-header .icon-btn { color: var(--color-text); }
.app-header .icon-btn:hover { background: rgba(0, 0, 0, 0.08); }
.app-header .user-chip {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  padding: 4px 12px 4px 4px;
  color: var(--color-text);
}
.app-header .btn-ghost { color: var(--color-text); }
.app-header .btn-ghost:hover { background: rgba(0, 0, 0, 0.08); }
.app-header-left, .app-header-right { display: flex; align-items: center; gap: 14px; }

.app-title { font-weight: 700; font-size: 16px; }
.icon-btn {
  border: none;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
}
.icon-btn:hover { background: var(--color-bg); }
.badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: var(--color-primary);
  color: white;
  font-size: 11px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-chip { display: flex; align-items: center; gap: 8px; padding-right: 4px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: var(--color-muted); }

.app-body { display: flex; flex: 1; min-height: 0; }
.app-sidebar {
  width: 220px;
  background: transparent;
  border-right: 1px solid rgba(45, 60, 90, 0.18);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  position: sticky;
  top: 60px;
  align-self: flex-start;
  height: calc(100vh - 60px);
}
.app-sidebar.collapsed { display: none; }

.nav-list { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.55); color: var(--color-text); }
.nav-item.active { background: rgba(255, 255, 255, 0.95); color: var(--color-primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.nav-item .nav-count {
  margin-left: auto;
  background: var(--color-primary);
  color: white;
  font-size: 11px;
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { padding: 12px; color: var(--color-text-soft); }

.app-main {
  flex: 1;
  padding: 24px 28px;
  min-width: 0;
  overflow-y: auto;
  background: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; height: 42px; font-size: 15px; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-bg); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-border); }
.btn-success { background: var(--color-success); color: white; }
.btn-success:hover { filter: brightness(0.92); }
.btn-warning { background: var(--color-warning); color: white; }
.btn-warning:hover { filter: brightness(0.92); }
.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { filter: brightness(0.92); }
.btn-ghost { background: transparent; color: var(--color-text-soft); }
.btn-ghost:hover { background: var(--color-bg); }
.btn-outline { border-color: var(--color-border-strong); color: var(--color-text); }
.btn-outline:hover { background: var(--color-bg); }

/* ---------- Cards ---------- */
.card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.page-header h2 { margin: 0; font-size: 20px; }
.page-header p { margin: 4px 0 0; color: var(--color-muted); font-size: 13px; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  align-items: stretch;
}
.stat-card {
  padding: 18px;
  height: 132px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  margin: 0 !important;
}
.stat-card .stat-label { font-size: 12px; color: var(--color-muted); margin: 0; line-height: 1.2; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--color-text); line-height: 1.2; margin: 0; }
.stat-card .stat-sub { font-size: 12px; color: var(--color-text-soft); margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card.accent .stat-value { color: var(--color-primary); }

/* Table */
.table-wrapper { overflow-x: auto; }
table.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.app-table th, table.app-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
table.app-table th {
  background: var(--color-bg);
  color: var(--color-text-soft);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
table.app-table tbody tr:hover { background: #f9fbfd; cursor: pointer; }
table.app-table td.code { font-family: 'JetBrains Mono', 'Menlo', monospace; font-size: 12px; color: var(--color-text-soft); }
table.app-table td.amount { font-weight: 600; }
.amount-large { color: var(--color-primary); }
.amount-medium { color: var(--color-warning); }

/* Status pills */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--color-bg);
  color: var(--color-text-soft);
}
.pill-small { background: var(--color-success-soft); color: var(--color-success); }
.pill-medium { background: var(--color-warning-soft); color: var(--color-warning); }
.pill-large { background: var(--color-danger-soft); color: var(--color-danger); }
.pill-status-draft { background: #ecf0f4; color: #6b7280; }
.pill-status-finance_review { background: var(--color-info-soft); color: var(--color-info); }
.pill-status-pending_president,
.pill-status-pending_secretary_president,
.pill-status-pending_council { background: var(--color-warning-soft); color: var(--color-warning); }
.pill-status-pending_payment,
.pill-status-pending_dual_sign { background: #f3e8ff; color: #7c3aed; }
.pill-status-paid { background: var(--color-success-soft); color: var(--color-success); }
.pill-status-archived { background: #e0e7ff; color: #3730a3; }
.pill-status-rejected { background: var(--color-danger-soft); color: var(--color-danger); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 14px; }
.tab {
  border: none;
  background: transparent;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--color-text-soft);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tab:hover { color: var(--color-text); }
.tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; color: var(--color-text-soft); }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}
.form-field textarea { min-height: 80px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(184, 35, 47, 0.1);
}
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.field-hint { font-size: 12px; color: var(--color-muted); }
.field-warning { font-size: 12px; color: var(--color-warning); background: var(--color-warning-soft); padding: 4px 8px; border-radius: 4px; display: inline-block; }

/* Items (multi-line items - card style) */
.item-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.item-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: rgba(0,0,0,0.04);
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
}
.item-card-header .item-num { color: var(--color-text-soft); font-weight: 600; }
.item-card-header .item-del {
  width: 28px; height: 28px;
  border: none; background: transparent; cursor: pointer;
  color: var(--color-muted); font-size: 14px; border-radius: 4px;
}
.item-card-header .item-del:hover { background: var(--color-danger-soft); color: var(--color-danger); }
.item-card-body {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.item-card-body .form-field.full { grid-column: 1 / -1; }
.item-card-body label { font-size: 11px; color: var(--color-text-soft); }
.item-card-body input, .item-card-body select {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  background: white;
}
.item-card-body input:focus, .item-card-body select:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(184,35,47,0.1);
}

@media (max-width: 800px) {
  .item-card-body { grid-template-columns: 1fr; }
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.items-table th, .items-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.items-table th {
  font-size: 12px;
  color: var(--color-muted);
  font-weight: 600;
  background: var(--color-bg);
}
.items-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.items-table tfoot td { font-weight: 700; background: var(--color-bg); }

/* Attachments */
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.attach-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.attach-item .file-icon { font-size: 20px; }
.attach-item .file-info { flex: 1; min-width: 0; }
.attach-item .file-info strong { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-item .file-info small { font-size: 11px; color: var(--color-muted); }

.uploader {
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  color: var(--color-text-soft);
  background: var(--color-bg);
  cursor: pointer;
}
.uploader:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item {
  display: flex;
  gap: 12px;
}
.timeline-dot {
  flex-shrink: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--color-primary);
  margin-top: 4px;
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}
.timeline-content { flex: 1; }
.timeline-content .timeline-title { font-size: 13px; font-weight: 600; }
.timeline-content .timeline-meta { font-size: 11px; color: var(--color-muted); margin-top: 2px; }
.timeline-content .timeline-comment { font-size: 13px; color: var(--color-text-soft); margin-top: 4px; padding: 6px 10px; background: var(--color-bg); border-radius: 4px; }

/* Detail layout */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-meta { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; }
.detail-meta dt { color: var(--color-muted); font-size: 12px; padding-top: 2px; }
.detail-meta dd { margin: 0; font-size: 14px; }

.tier-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
}
.tier-banner.small { background: var(--color-success-soft); color: var(--color-success); }
.tier-banner.medium { background: var(--color-warning-soft); color: var(--color-warning); }
.tier-banner.large { background: var(--color-danger-soft); color: var(--color-danger); }
.tier-banner .tier-icon { font-size: 18px; }
.tier-banner strong { margin-right: 4px; }

/* Action box */
.action-box {
  background: linear-gradient(135deg, #fff, #f9fafe);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.action-box h4 { margin: 0 0 8px; font-size: 14px; }

/* Empty state */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-muted);
}
.empty .empty-icon { font-size: 32px; margin-bottom: 8px; }

/* Toast */
.toast-container {
  position: fixed;
  top: 76px; right: 24px;
  z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 320px;
}
.toast {
  background: var(--color-text);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  animation: slide-in 0.2s ease;
}
.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-danger); }
.toast.warning { background: var(--color-warning); }

@keyframes slide-in {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.4); }
.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-content h3 { margin: 0 0 12px; }

/* Drawer */
.drawer {
  position: fixed; top: 100px; right: 0; bottom: 0;
  width: 360px;
  background: white;
  box-shadow: var(--shadow-lg);
  z-index: 80;
  display: flex; flex-direction: column;
}
.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px; }
.drawer-body .notif-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  margin-bottom: 8px;
  font-size: 13px;
}
.drawer-body .notif-item.unread { background: var(--color-primary-soft); border-color: rgba(184,35,47,0.2); }
.drawer-body .notif-item .notif-time { font-size: 11px; color: var(--color-muted); margin-top: 4px; }

/* Search bar */
.search-bar {
  display: flex; gap: 8px; align-items: center; margin-bottom: 12px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}
.search-bar input, .search-bar select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
}
.search-bar input { flex: 1; }

/* Vote summary */
.vote-summary { display: flex; gap: 8px; margin-top: 8px; }
.vote-chip {
  background: var(--color-bg);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}
.vote-chip.approve { background: var(--color-success-soft); color: var(--color-success); }
.vote-chip.reject { background: var(--color-danger-soft); color: var(--color-danger); }
.vote-chip.abstain { background: var(--color-bg); color: var(--color-text-soft); }

/* Responsive */
/* ====== 平板 / 中等屏幕 ====== */
@media (max-width: 1000px) {
  .app-main { padding: 16px 14px; }
}

/* ====== 手机 ====== */
@media (max-width: 800px) {
  /* 顶栏紧凑 */
  .app-header { height: 64px; padding: 0 12px; }
  .app-header-left { gap: 8px; flex: 1; min-width: 0; }
  .app-header-right { gap: 6px; }
  .header-banner { height: 44px; max-width: 200px; }
  .app-title { display: none; }
  .user-chip { padding: 2px; }
  .user-meta { display: none; }
  .app-header .icon-btn { width: 36px; }
  .app-header .btn-ghost { padding: 6px 10px; font-size: 12px; }
  .icon-btn .badge { font-size: 10px; min-width: 14px; height: 14px; }

  /* 侧边栏抽屉 */
  .app-sidebar {
    position: fixed; left: 0; top: 64px; bottom: 0;
    width: 240px; height: calc(100vh - 64px);
    z-index: 60;
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    transform: translateX(0);
    transition: transform 0.2s;
  }
  .app-sidebar.collapsed { transform: translateX(-100%); display: flex; }

  /* 主区域 */
  .app-main { padding: 14px 12px; overflow-x: hidden; }
  .page-header { flex-wrap: wrap; gap: 8px; }
  .page-header h2 { font-size: 18px; }

  /* 统计卡片：手机上两列 */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { height: 110px; padding: 14px; }
  .stat-card .stat-value { font-size: 22px; }
  .stat-card .stat-sub { font-size: 11px; }

  /* 表单单列 */
  .form-grid { grid-template-columns: 1fr; }

  /* 表格可横向滚动 */
  .table-wrapper { -webkit-overflow-scrolling: touch; }
  table.app-table { font-size: 12px; }
  table.app-table th, table.app-table td { padding: 8px 8px; }

  /* 详情双栏 → 单列 */
  .detail-grid { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 90px 1fr; }

  /* 卡片紧凑 */
  .card { padding: 14px; }

  /* 登录页 */
  .login-view { padding: 14px; gap: 14px; }
  .login-hero-logo { max-width: 360px; }
  .login-card { padding: 22px 18px; }
  .test-accounts-list { grid-template-columns: 1fr; }
  .login-form input { height: 44px; font-size: 16px; }
  .login-form .btn-block { height: 48px; }

  /* 抽屉/模态 */
  .drawer { top: 64px; width: 100%; max-width: 320px; }
  .modal-content { max-width: 92%; padding: 18px; }

  /* 横幅 banner 重叠提示用更小 */
  .tier-banner { flex-wrap: wrap; font-size: 12px; padding: 10px; }

  /* 操作按钮组在小屏更易点击 */
  .action-box .btn { font-size: 13px; padding: 8px 12px; }

  /* 隐藏侧边栏底部冗余 */
  .sidebar-footer { display: none; }
}

/* ====== 超小手机 (<480px) ====== */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .header-banner { height: 36px; max-width: 160px; }
  .app-header { height: 56px; }
  .app-sidebar { top: 56px; height: calc(100vh - 56px); }
  .drawer { top: 56px; }
  .page-header h2 { font-size: 16px; }
}
