/* Global Styles - 逗比跨境苹果网单系统 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #app {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #303133;
  background: #f0f2f5;
}

/* ===== Login Page ===== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  position: relative;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0,160L48,170.7C96,181,192,203,288,192C384,181,480,139,576,128C672,117,768,139,864,160C960,181,1056,203,1152,192C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

.login-card {
  width: 420px;
  padding: 40px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

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

.login-title {
  font-size: 24px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: #909399;
}

.login-form .el-input__wrapper {
  border-radius: 8px;
  padding: 4px 12px;
}

.login-captcha {
  display: flex;
  gap: 12px;
  align-items: center;
}

.login-captcha img {
  width: 120px;
  height: 40px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #dcdfe6;
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 24px;
}

.login-btn {
  width: 100%;
  height: 44px;
  font-size: 16px;
  border-radius: 8px;
}

/* ===== Main Layout ===== */
.app-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar-container {
  width: 220px;
  background: #001529;
  transition: width 0.3s;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-container.collapsed {
  width: 64px;
}

.sidebar-logo {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #002140;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: #1890ff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  margin-left: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-menu {
  flex: 1;
  border-right: none !important;
  background: transparent !important;
}

.sidebar-menu .el-menu-item, .sidebar-menu .el-sub-menu__title {
  color: rgba(255, 255, 255, 0.75) !important;
  height: 48px;
  line-height: 48px;
}

.sidebar-menu .el-menu-item:hover, .sidebar-menu .el-sub-menu__title:hover {
  background: #1f3047 !important;
  color: #fff !important;
}

.sidebar-menu .el-menu-item.is-active {
  background: #1890ff !important;
  color: #fff !important;
}

.sidebar-menu .el-menu {
  background: transparent !important;
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-header {
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  z-index: 10;
}

.collapse-btn {
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  color: #5a5e66;
}

.collapse-btn:hover {
  color: #1890ff;
}

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

.header-right .el-dropdown {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1890ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.app-tags {
  background: #fff;
  padding: 6px 16px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  color: #495060;
  transition: all 0.2s;
}

.tag-item.active {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

.tag-item .close-icon {
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.6;
}

.tag-item .close-icon:hover {
  opacity: 1;
}

.app-main {
  flex: 1;
  padding: 16px;
  overflow: auto;
  background: #f0f2f5;
}

.page-container {
  background: #fff;
  border-radius: 4px;
  padding: 16px;
  min-height: calc(100vh - 56px - 38px - 32px);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ebeef5;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: #303133;
}

.search-form {
  background: #fafafa;
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}

/* ===== Dashboard Cards ===== */
.stat-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.blue { background: #1890ff; }
.stat-icon.green { background: #52c41a; }
.stat-icon.orange { background: #faad14; }
.stat-icon.red { background: #f5222d; }
.stat-icon.purple { background: #722ed1; }
.stat-icon.cyan { background: #13c2c2; }

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 13px;
  color: #909399;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #303133;
}

.stat-trend {
  font-size: 12px;
  color: #909399;
  margin-top: 2px;
}

/* ===== Traffic Warning Banner ===== */
.traffic-warning {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d48806;
}

/* ===== Order Status Tags ===== */
.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 18px;
}

.status-tag.success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.status-tag.warning { background: #fffbe6; color: #faad14; border: 1px solid #ffe58f; }
.status-tag.danger { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.status-tag.info { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.status-tag.default { background: #f5f5f5; color: #595959; border: 1px solid #d9d9d9; }

/* ===== Table Actions ===== */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===== Profile Page ===== */
.profile-container {
  padding: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: #fafafa;
  border-radius: 4px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #1890ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
}

.profile-info h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.profile-info p {
  color: #909399;
  font-size: 13px;
  margin: 2px 0;
}

/* ===== Order Info Table: prevent header & specific column wrapping ===== */
.order-info-table .el-table__header-wrapper th .cell {
  white-space: nowrap;
}
.order-info-table .nowrap-col .cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar-container {
    position: fixed;
    z-index: 100;
    height: 100vh;
  }
  .stat-card-row {
    grid-template-columns: 1fr;
  }
}

/* 日期选择器：无数据日期灰底显示（但仍可选） */
.el-date-table td.no-data-date .el-date-table-cell__text {
  color: #c0c4cc !important;
  background-color: #f5f7fa !important;
  border-radius: 50%;
}
