/* =====================================================
   Lilith Storage · 商务企业风格
   Corporate Business Theme - White & Blue
   ===================================================== */

:root {
  /* 基础色 - 白蓝主题 */
  --bg: #ffffff;
  --bg-secondary: #f0f4f8;
  --bg-card: #ffffff;
  --txt: #1e3a5f;
  --txt-secondary: #5a6b7d;
  --muted: #8899aa;
  --border: #d6e4f0;
  --border-hover: #b8d0e8;

  /* 主色调 - 商务蓝 */
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-light: #e6f2ff;
  --primary-dark: #004080;

  /* 辅助色 */
  --success: #00875a;
  --success-light: #e6f7f1;
  --warning: #cc7a00;
  --warning-light: #fff8e6;
  --danger: #cc0033;
  --danger-light: #fff0f3;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 102, 204, .08);
  --shadow: 0 2px 8px rgba(0, 102, 204, .1);
  --shadow-md: 0 4px 12px rgba(0, 102, 204, .12);
  --shadow-lg: 0 8px 24px rgba(0, 102, 204, .15);

  /* 圆角 */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==================== Reset ==================== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-secondary);
  color: var(--txt);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-dark);
  text-decoration: none;
}
.navbar-brand svg { width: 32px; height: 32px; }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==================== 按钮 - 带动态效果 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .4s ease, height .4s ease;
}
.btn:active::before {
  width: 200px;
  height: 200px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:active {
  background: var(--primary-hover);
  transform: scale(.97);
}
.btn-primary::before { background: rgba(255,255,255,.2); }

.btn-secondary {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-light);
}
.btn-secondary:active {
  background: var(--primary);
  color: #fff;
  transform: scale(.97);
}

.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}
.btn-danger:active {
  background: #a30029;
  transform: scale(.97);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: none;
}
.btn-ghost:hover { background: var(--primary-light); }
.btn-ghost:active { background: var(--primary); color: #fff; transform: scale(.97); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

/* 按钮点击波纹效果 */
.btn {
  position: relative;
  overflow: hidden;
}
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transform: scale(0);
  animation: ripple .5s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--txt);
}
.card-body { padding: 20px; }
.card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==================== 表格 ==================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead { background: var(--bg-secondary); }
th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--txt-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--txt);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--primary-light); }

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--txt);
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--txt);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .15);
}
.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* ==================== 统计卡片 ==================== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-content { flex: 1; }
.stat-label { font-size: 13px; color: var(--txt-secondary); margin-bottom: 2px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--primary-dark); }

/* ==================== 徽章 ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }

/* ==================== 搜索栏 ==================== */
.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg);
  color: var(--txt);
  width: 280px;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .15);
}

/* ==================== Toast 提示 ==================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all .25s ease;
  z-index: 9999;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== 主容器 ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ==================== 登录页 ==================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-secondary) 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
}
.login-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: block;
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary-dark);
}
.login-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--txt-secondary);
  margin-bottom: 28px;
}

/* ==================== 首页 ==================== */
.hero-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.hero-card h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}
.hero-card p {
  margin: 0;
  opacity: .9;
  font-size: 15px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .navbar-inner { height: 56px; padding: 0 16px; }
  .navbar-brand span { display: none; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .search-input { width: 100%; }
  .search-bar { flex-wrap: wrap; }
  .card-body { padding: 16px; }
  .card-header { padding: 12px 16px; }
  .table-wrap { border-radius: var(--radius); }
  th, td { padding: 10px 12px; }
  .hero-card { padding: 28px 20px; }
  .login-card { padding: 28px 20px; }
  .container { padding: 16px 16px 70px; }
}

@media (max-width: 480px) {
  .btn { padding: 8px 14px; font-size: 13px; }
  .btn-lg { padding: 10px 16px; font-size: 14px; }
  .stat-card { padding: 16px; }
  .stat-icon { width: 40px; height: 40px; }
  .stat-value { font-size: 20px; }
}

/* ==================== 工具类 ==================== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--txt-secondary); }
.text-sm { font-size: 13px; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.w-full { width: 100%; }
.hidden { display: none; }

/* ==================== 上传区域 ==================== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--txt-secondary);
  cursor: pointer;
  transition: all .2s ease;
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.upload-zone svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: .6; }
.upload-zone p { margin: 0; font-size: 14px; }