/* ===== 货物条码管理系统 - 设计系统 ===== */

/* --- Design Tokens --- */
:root {
  /* 主色调：深海蓝 */
  --primary-h: 220;
  --primary-s: 60%;
  --primary-l: 22%;
  --primary: var(--primary-h) var(--primary-s) var(--primary-l);
  --primary-light: 217 85% 50%;
  --primary-glow: 215 90% 62%;
  
  /* 强调色：琥珀金（用于价格） */
  --accent-h: 38;
  --accent-s: 92%;
  --accent-l: 50%;
  --accent: var(--accent-h) var(--accent-s) var(--accent-l);
  --accent-warm: 28 90% 55%;
  
  /* 成功色 */
  --success: 152 69% 40%;
  --success-light: 152 69% 95%;
  
  /* 危险色 */
  --danger: 0 72% 55%;
  --danger-light: 0 72% 96%;
  
  /* 中性色 */
  --bg: 220 20% 98%;
  --bg-card: 0 0% 100%;
  --bg-elevated: 220 20% 96%;
  --text-primary: 220 40% 13%;
  --text-secondary: 220 15% 45%;
  --text-tertiary: 220 10% 65%;
  --border: 220 15% 90%;
  --border-focus: var(--primary-light);
  
  /* 间距系统 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* 阴影 */
  --shadow-sm: 0 1px 3px hsl(var(--primary) / 0.04), 0 1px 2px hsl(var(--primary) / 0.06);
  --shadow-md: 0 4px 12px hsl(var(--primary) / 0.06), 0 2px 4px hsl(var(--primary) / 0.04);
  --shadow-lg: 0 12px 40px hsl(var(--primary) / 0.1), 0 4px 12px hsl(var(--primary) / 0.06);
  --shadow-glow: 0 0 24px hsl(var(--primary-glow) / 0.3);
  --shadow-accent: 0 4px 16px hsl(var(--accent) / 0.3);
  
  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-light)));
  --gradient-accent: linear-gradient(135deg, hsl(var(--accent)), hsl(var(--accent-warm)));
  --gradient-hero: linear-gradient(180deg, hsl(var(--primary)) 0%, hsl(220 50% 30%) 100%);
  --gradient-card: linear-gradient(180deg, hsl(var(--bg-card)) 0%, hsl(var(--bg-elevated)) 100%);
  
  /* 过渡 */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  
  /* 字号系统 */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  
  /* 底部导航高度 */
  --nav-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- 全局重置 --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: hsl(var(--bg));
  color: hsl(var(--text-primary));
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

/* --- 布局容器 --- */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.page {
  display: none;
  padding: var(--space-md);
  padding-top: var(--space-lg);
  animation: fadeIn 0.25s ease-out;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes scanLine {
  0% { top: 10%; }
  100% { top: 90%; }
}

/* --- 页面头部 --- */
.page-header {
  margin-bottom: var(--space-lg);
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: hsl(var(--text-primary));
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  margin-top: var(--space-xs);
}

/* --- 底部导航 --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: hsl(var(--bg-card));
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -2px 12px hsl(var(--primary) / 0.04);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
  border: none;
  background: none;
  color: hsl(var(--text-tertiary));
  font-size: var(--text-xs);
  font-family: var(--font-sans);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  color: hsl(var(--primary-light));
}

.nav-item.active .nav-icon {
  background: hsl(var(--primary-light) / 0.1);
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.nav-label {
  font-weight: 500;
}

/* --- 卡片组件 --- */
.card {
  background: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

/* --- 表单组件 --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: hsl(var(--text-primary));
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: 12px var(--space-md);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: hsl(var(--text-primary));
  background: hsl(var(--bg));
  border: 1.5px solid hsl(var(--border));
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: hsl(var(--primary-light));
  box-shadow: 0 0 0 3px hsl(var(--primary-light) / 0.1);
}

.form-input::placeholder {
  color: hsl(var(--text-tertiary));
}

.form-input-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* --- 按钮组件 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px var(--space-lg);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  -webkit-user-select: none;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.96) translateY(0);
}

.btn-accent {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn-secondary {
  background: hsl(var(--bg-elevated));
  color: hsl(var(--text-primary));
  border: 1.5px solid hsl(var(--border));
}

.btn-secondary:hover {
  background: hsl(var(--border));
}

.btn-danger {
  background: hsl(var(--danger));
  color: white;
}

.btn-danger:hover {
  background: hsl(0 72% 48%);
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--text-secondary));
  padding: var(--space-sm) var(--space-md);
}

.btn-ghost:hover {
  background: hsl(var(--bg-elevated));
  color: hsl(var(--text-primary));
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 8px var(--space-md);
  font-size: var(--text-sm);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* --- 图片上传 --- */
.image-upload {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  overflow: hidden;
  background: hsl(var(--bg));
}

.image-upload:hover {
  border-color: hsl(var(--primary-light));
  background: hsl(var(--primary-light) / 0.03);
}

.image-upload.has-image {
  border-style: solid;
  border-color: hsl(var(--border));
}

.image-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-upload-icon {
  width: 48px;
  height: 48px;
  color: hsl(var(--text-tertiary));
}

.image-upload-text {
  font-size: var(--text-sm);
  color: hsl(var(--text-tertiary));
}

.image-upload-preview {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* --- 扫描器 --- */
.scanner-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: hsl(var(--text-primary));
  box-shadow: var(--shadow-lg);
}

.scanner-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scanner-frame {
  width: 70%;
  height: 40%;
  border: 2px solid hsl(var(--primary-glow) / 0.8);
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: 0 0 0 9999px hsl(0 0% 0% / 0.4);
}

.scanner-frame::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--gradient-accent);
  box-shadow: 0 0 8px hsl(var(--accent) / 0.6);
  animation: scanLine 2s ease-in-out infinite alternate;
  border-radius: var(--radius-full);
}

.scanner-corners {
  position: absolute;
  inset: -2px;
}

.scanner-corners::before,
.scanner-corners::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: hsl(var(--accent));
  border-style: solid;
}

.scanner-corners::before {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

.scanner-corners::after {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-radius: 0 4px 0 0;
}

.scanner-corners-bottom {
  position: absolute;
  inset: -2px;
}

.scanner-corners-bottom::before,
.scanner-corners-bottom::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: hsl(var(--accent));
  border-style: solid;
}

.scanner-corners-bottom::before {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 4px;
}

.scanner-corners-bottom::after {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

.scanner-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  background: hsl(0 0% 0% / 0.6);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

/* --- 商品结果卡片 --- */
.product-result {
  animation: slideUp 0.3s ease-out;
}

.product-result-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-md);
  background: hsl(var(--bg-elevated));
}

.product-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-result-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-tertiary));
}

.product-result-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-result-barcode {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  background: hsl(var(--bg-elevated));
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.product-result-price {
  font-size: var(--text-2xl);
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-result-name {
  font-size: var(--text-lg);
  font-weight: 600;
  color: hsl(var(--text-primary));
  margin-bottom: var(--space-sm);
}

/* --- 商品列表 --- */
.product-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  transition: var(--transition-smooth);
  animation: slideUp 0.3s ease-out;
}

.product-item:hover {
  box-shadow: var(--shadow-md);
  border-color: hsl(var(--primary-light) / 0.3);
}

.product-item-image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: hsl(var(--bg-elevated));
}

.product-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-item-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-tertiary));
}

.product-item-no-image svg {
  width: 28px;
  height: 28px;
}

.product-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-item-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: hsl(var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-item-barcode {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: hsl(var(--text-tertiary));
  margin-top: 2px;
}

.product-item-price {
  font-weight: 700;
  font-size: var(--text-lg);
  color: hsl(var(--accent));
  margin-top: var(--space-xs);
}

.product-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-xs);
}

/* --- 空状态 --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  color: hsl(var(--text-tertiary));
  margin-bottom: var(--space-lg);
  opacity: 0.6;
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: hsl(var(--text-secondary));
  margin-bottom: var(--space-sm);
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: hsl(var(--text-tertiary));
}

/* --- Toast 通知 --- */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
  width: calc(100% - var(--space-xl));
  max-width: 400px;
}

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease-out;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success {
  background: hsl(var(--success) / 0.95);
  color: white;
}

.toast-error {
  background: hsl(var(--danger) / 0.95);
  color: white;
}

.toast-info {
  background: hsl(var(--primary) / 0.95);
  color: white;
}

/* --- 模态框 --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: hsl(var(--primary) / 0.4);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: hsl(var(--bg-card));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
}

/* --- 搜索栏 --- */
.search-bar {
  position: relative;
  margin-bottom: var(--space-lg);
}

.search-bar input {
  width: 100%;
  padding: 12px var(--space-md) 12px 44px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: hsl(var(--text-primary));
  background: hsl(var(--bg-card));
  border: 1.5px solid hsl(var(--border));
  border-radius: var(--radius-full);
  outline: none;
  transition: var(--transition-fast);
}

.search-bar input:focus {
  border-color: hsl(var(--primary-light));
  box-shadow: 0 0 0 3px hsl(var(--primary-light) / 0.1);
}

.search-bar-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--text-tertiary));
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* --- 手动输入条码区域 --- */
.manual-input {
  margin-top: var(--space-lg);
}

.manual-input-row {
  display: flex;
  gap: var(--space-sm);
}

.manual-input-row .form-input {
  flex: 1;
}

/* --- 统计数据 --- */
.stats-bar {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-item {
  flex: 1;
  background: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: hsl(var(--primary-light));
}

.stat-label {
  font-size: var(--text-xs);
  color: hsl(var(--text-tertiary));
  margin-top: 2px;
}

/* --- 加载状态 --- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--primary-light));
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- 响应式适配 --- */
@media (min-width: 481px) {
  .app-container {
    padding: 0 var(--space-md);
  }
  
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
}

/* --- 确认对话框 --- */
.confirm-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.confirm-actions .btn {
  flex: 1;
}

/* --- PIN码锁屏 --- */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: var(--space-lg);
}

.lock-screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.lock-icon {
  width: 64px;
  height: 64px;
  color: hsl(var(--primary-glow));
  margin-bottom: var(--space-lg);
  opacity: 0.9;
}

.lock-icon svg {
  width: 100%;
  height: 100%;
}

.lock-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.lock-subtitle {
  font-size: var(--text-sm);
  color: hsl(0 0% 100% / 0.6);
  margin-bottom: var(--space-xl);
}

.pin-display {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space-md);
  padding: var(--space-md);
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: hsl(0 0% 100% / 0.2);
  border: 2px solid hsl(0 0% 100% / 0.4);
  transition: var(--transition-spring);
}

.pin-dot.filled {
  background: hsl(var(--accent));
  border-color: hsl(var(--accent));
  box-shadow: 0 0 8px hsl(var(--accent) / 0.5);
  transform: scale(1.15);
}

.pin-error {
  font-size: var(--text-sm);
  color: hsl(0 80% 70%);
  min-height: 20px;
  margin-bottom: var(--space-md);
  text-align: center;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.pin-key {
  width: 100%;
  aspect-ratio: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: 600;
  color: white;
  background: hsl(0 0% 100% / 0.08);
  border: 1px solid hsl(0 0% 100% / 0.12);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--font-sans);
  backdrop-filter: blur(4px);
}

.pin-key:active {
  background: hsl(0 0% 100% / 0.2);
  transform: scale(0.92);
}

.pin-key-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.pin-key-empty:active {
  background: transparent;
  transform: none;
}

.pin-key-action {
  background: hsl(0 0% 100% / 0.05);
  border-color: hsl(0 0% 100% / 0.08);
}

/* PIN抖动动画 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.pin-display.shake {
  animation: shake 0.4s ease-out;
}

.pin-display.shake .pin-dot.filled {
  background: hsl(0 80% 60%);
  border-color: hsl(0 80% 60%);
  box-shadow: 0 0 8px hsl(0 80% 60% / 0.5);
}
