/* 全局样式美化 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f7fa;
}

#app { height: 100vh; }

/* ============ 登录页面美化 ============ */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.login-card {
  width: 420px;
  padding: 50px 40px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-title {
  text-align: center;
  margin-bottom: 10px;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  text-align: center;
  color: #909399;
  font-size: 14px;
  margin-bottom: 35px;
  letter-spacing: 1px;
}

.login-card .el-input__wrapper {
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s;
}

.login-card .el-input__wrapper:hover {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.login-card .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.login-card .el-button {
  border-radius: 8px;
  height: 48px;
  font-size: 16px;
  font-weight: 500;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  transition: all 0.3s;
}

.login-button {
  width: 100%;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  margin-bottom: 20px;
  display: inline-block;
  padding: 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 50%;
}

.login-footer {
  margin-top: 30px;
  text-align: center;
  color: #909399;
  font-size: 12px;
}

/* ============ 主布局美化 ============ */
.layout-container {
  height: 100vh;
}

.sidebar {
  height: 100%;
  background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.logo {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  background: transparent;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  color: white;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}

.logo-text-mini {
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.menu-item {
  color: #bfcbd9;
  transition: all 0.3s;
  border-radius: 8px;
  margin: 4px 8px;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menu-item.is-active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* ============ 头部美化 ============ */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 21, 41, 0.06);
  border-bottom: 1px solid #f0f0f0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.collapse-btn {
  cursor: pointer;
  color: #606266;
  transition: color 0.3s;
  padding: 6px;
  border-radius: 6px;
}

.collapse-btn:hover {
  color: #667eea;
  background: #f5f7fa;
}

.page-breadcrumb {
  font-size: 16px;
  font-weight: 500;
  color: #2c3e50;
}

.header-right {
  display: flex;
  align-items: center;
}

.user-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 24px;
  transition: background 0.3s;
}

.user-avatar:hover {
  background: #f5f7fa;
}

.username {
  font-size: 14px;
  color: #2c3e50;
  font-weight: 500;
}

/* ============ 主内容区美化 ============ */
.main-content {
  padding: 24px;
  background: #f5f7fa;
  min-height: calc(100vh - 70px);
}

/* ============ 仪表盘卡片美化 ============ */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: #606266;
  margin-top: 10px;
  font-size: 14px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  font-size: 48px;
  opacity: 0.8;
}

.stat-info {
  flex: 1;
}

/* ============ 快捷操作卡片美化 ============ */
.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.shortcut-card {
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 12px;
  overflow: hidden;
}

.shortcut-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.shortcut-card .el-card__body {
  padding: 0;
}

.shortcut-content {
  display: flex;
  align-items: center;
  padding: 24px;
  gap: 16px;
}

.shortcut-icon {
  font-size: 36px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 12px;
}

.shortcut-text {
  flex: 1;
}

.shortcut-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.shortcut-desc {
  font-size: 13px;
  color: #909399;
}

.shortcut-arrow {
  font-size: 20px;
  color: #c0c4cc;
  transition: all 0.3s;
}

.shortcut-card:hover .shortcut-arrow {
  color: #667eea;
  transform: translateX(4px);
}

/* ============ 页面标题美化 ============ */
.page-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #2c3e50;
  position: relative;
  padding-left: 16px;
}

.page-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* ============ 筛选栏美化 ============ */
.filter-bar {
  background: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ============ 表格卡片美化 ============ */
.table-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ============ 表单卡片美化 ============ */
.form-card {
  background: white;
  padding: 36px;
  border-radius: 12px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ============ 按钮美化 ============ */
.el-button {
  border-radius: 6px;
  transition: all 0.3s;
}

.el-button--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.el-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* ============ 表格美化 ============ */
.el-table {
  border-radius: 8px;
  overflow: hidden;
}

.el-table th {
  background: #f5f7fa !important;
  color: #2c3e50;
  font-weight: 600;
}

.el-table--striped .el-table__row:nth-child(even) td {
  background: #fafafa !important;
}

.el-table__row:hover > td {
  background: #ecf5ff !important;
}

/* ============ 卡片组件美化 ============ */
.el-card {
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.el-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ============ 输入框美化 ============ */
.el-input__wrapper {
  border-radius: 6px;
  transition: all 0.3s;
}

.el-input__wrapper:hover {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.el-input__wrapper.is-focus {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

/* ============ 对话框美化 ============ */
.el-dialog {
  border-radius: 12px;
  overflow: hidden;
}

.el-dialog__header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 24px;
}

.el-dialog__title {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.el-dialog__headerbtn .el-dialog__close {
  color: white;
  font-size: 18px;
}

/* ============ 标签页美化 ============ */
.el-tabs__item {
  font-size: 15px;
  transition: all 0.3s;
}

.el-tabs__item.is-active {
  color: #667eea;
  font-weight: 600;
}

.el-tabs__active-bar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 3px;
}

/* ============ 标签美化 ============ */
.el-tag {
  border-radius: 6px;
  border: none;
}

.el-tag--success {
  background: #e8f5e9;
  color: #2e7d32;
}

.el-tag--warning {
  background: #fff3e0;
  color: #ef6c00;
}

.el-tag--danger {
  background: #ffebee;
  color: #c62828;
}

/* ============ 加载动画美化 ============ */
.el-loading-mask {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

/* ============ 消息提示美化 ============ */
.el-message {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ============ 响应式优化 ============ */
@media (max-width: 768px) {
  .login-card {
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
  }
  
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ============ 滚动条美化 ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a6fd6;
}

/* 运单号查询样式 */
.search-card {
  margin-bottom: 24px;
}

.search-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e4e7ed;
}

.search-result .el-descriptions {
  margin-top: 16px;
}

.search-result .el-descriptions__label {
  font-weight: 600;
  width: 120px;
}

.search-result .el-descriptions__content {
  font-weight: 500;
}
