/* ============================================================
   组件级样式（原先各 .vue 的 scoped 样式；无构建方案统一下沉到这里，
   类名已按组件前缀区分，避免互相污染）
   ============================================================ */

/* ---------- 顶栏用户 ---------- */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: #fff;
  color: var(--ink-2);
  max-width: 42vw;
}

.user-chip:hover {
  border-color: #c8d6ea;
}

.user-chip .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 auto;
}

.user-chip .user-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip .caret {
  font-size: 10px;
  color: var(--muted-2);
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 46%) 1fr;
  background: #f4f6fa;
}

.login-env {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 10;
}

.login-brand {
  position: relative;
  background: radial-gradient(900px 500px at 18% 0%, #1b2c47, #0b1422 62%), #0b1422;
  color: #e6f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow: hidden;
}

.login-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(47, 107, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 107, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

.brand-inner {
  position: relative;
  z-index: 1;
  max-width: 380px;
}

.logo-lg {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f6bff, #22d3ee);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.brand-inner h1 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0.5px;
}

.slogan {
  margin: 0 0 28px;
  color: #9fb6d4;
  font-size: 13px;
  letter-spacing: 2px;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #b9cbe3;
  font-size: 13px;
}

.feature-list span {
  margin-right: 8px;
}

.build {
  margin-top: 40px;
  font-size: 11px;
  color: #5f7796;
  letter-spacing: 1px;
}

.login-form-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(31, 45, 61, 0.12);
  padding: 30px 28px 24px;
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.login-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.login-submit {
  width: 100%;
  height: 42px;
  font-size: 15px;
  letter-spacing: 4px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 12px;
  margin: 18px 0 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.wechat-wrap {
  display: block;
}

.wechat-btn {
  width: 100%;
  height: 40px;
}

.wechat-ico {
  margin-right: 4px;
}

.wechat-tip {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.5;
}

.demo-box {
  margin-top: 18px;
  padding: 12px;
  border: 1px dashed #d6e3ff;
  background: #f7faff;
  border-radius: 10px;
}

.demo-title {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.demo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}

.demo-item:hover {
  border-color: #b8c9ee;
  background: #f5f9ff;
}

.demo-user {
  font-weight: 600;
  color: var(--brand-dark);
}

.demo-pass {
  color: var(--muted);
}

.demo-role {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.api-tip {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.login-foot {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

/* ---------- 订单列表 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.orders-table .el-table__row {
  cursor: pointer;
}

.cell-hint {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 1px;
}

.pager {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
}

.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.order-card:active {
  background: #f7faff;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-mid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.card-mid .amount {
  font-size: 18px;
  color: var(--ink);
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
}

/* ---------- 订单详情 ---------- */
.action-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.action-hint {
  min-width: 0;
}

.action-btns {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.pickup-line {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.money-row {
  margin-bottom: 0;
}

.tl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.tl-status {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 响应式 ---------- */
@media (min-width: 1100px) {
  .detail-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }

  .detail-grid > .panel:nth-child(4),
  .detail-grid > .panel:nth-child(5),
  .detail-grid > .panel:nth-child(6) {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 28px 20px 20px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .brand-inner {
    max-width: none;
  }

  .feature-list,
  .build,
  .slogan {
    display: none;
  }

  .logo-lg {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 20px;
    margin-bottom: 12px;
  }

  .brand-inner h1 {
    font-size: 19px;
  }

  .login-form-side {
    justify-content: flex-start;
    padding-top: 10px;
  }
}

@media (max-width: 768px) {
  .filters .el-input,
  .filters .el-select {
    width: 100% !important;
    flex: 1 1 100%;
  }

  .filters .el-button {
    flex: 1;
  }

  .pager {
    justify-content: center;
    padding: 10px 0 4px;
  }
}

@media (max-width: 560px) {
  .user-chip .user-name {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 18px 20px;
    border-radius: 12px;
  }

  .login-env {
    top: 10px;
    right: 10px;
  }
}
