/* ============================================================
   POS端样式 - HarmonyOS 7.0 风格
   ============================================================ */

* {
  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;
  color: #303133;
  min-height: 100vh;
}

#app {
  min-height: 100vh;
}

/* ========== 容器 ========== */
.pos-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

/* ========== 顶部栏 ========== */
.pos-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 18px;
  padding: 20px 28px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
  color: #fff;
}

.pos-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 600;
}

.pos-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pos-time {
  font-size: 15px;
  opacity: 0.95;
  font-weight: 500;
}

.pos-user {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.95;
}

.pos-user:hover {
  opacity: 1;
}

/* ========== 统计卡片 ========== */
.stat-cards {
  margin-bottom: 20px;
}

.stat-card {
  border-radius: 18px;
  padding: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-height: 120px;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-sub {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

/* ========== 卡片 ========== */
.pos-card {
  border-radius: 18px;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.pos-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

.card-header .el-icon {
  margin-right: 6px;
  color: #409eff;
}

/* ========== 快捷功能 ========== */
.quick-btn {
  text-align: center;
  padding: 16px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fb;
  margin-bottom: 12px;
}

.quick-btn:hover {
  background: #ecf5ff;
  transform: translateY(-2px);
}

.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.quick-label {
  font-size: 13px;
  color: #606266;
  font-weight: 500;
}

/* ========== 会员卡片 ========== */
.member-card {
  margin-top: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  padding: 20px;
  color: #fff;
}

.member-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.member-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.member-meta {
  font-size: 13px;
  opacity: 0.9;
}

.member-balance-wrap {
  text-align: right;
}

.member-balance {
  font-size: 24px;
  font-weight: 700;
}

.member-balance-small {
  font-size: 16px;
  font-weight: 600;
  color: #67c23a;
}

.member-list {
  margin-top: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.member-item:hover {
  background: #f5f7fa;
}

/* ========== 收款码 ========== */
.qrcode-box {
  text-align: center;
  padding: 20px 0;
}

.qrcode-box img {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.qrcode-placeholder {
  width: 180px;
  height: 180px;
  border: 2px dashed #dcdfe6;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #c0c4cc;
  margin: 0 auto 12px;
}

.qrcode-tip {
  font-size: 15px;
  font-weight: 600;
  color: #303133;
}

.qrcode-sub {
  font-size: 12px;
  color: #909399;
  margin-top: 4px;
}

.qrcode-dialog {
  text-align: center;
}

/* ========== 空状态 ========== */
.empty-tip {
  text-align: center;
  padding: 30px;
  color: #909399;
  font-size: 14px;
}

/* ========== 收银台页面 ========== */
.cashier-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  height: calc(100vh - 100px);
}

.cashier-goods {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cashier-cart {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.goods-category {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.goods-category .el-button {
  border-radius: 20px;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.goods-item {
  background: #f8f9fb;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.goods-item:hover {
  background: #ecf5ff;
  border-color: #409eff;
  transform: translateY(-2px);
}

.goods-item .goods-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  color: #fff;
}

.goods-item .goods-name {
  font-size: 14px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 4px;
}

.goods-item .goods-price {
  font-size: 16px;
  font-weight: 700;
  color: #f56c6c;
}

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

.cart-title {
  font-size: 18px;
  font-weight: 600;
}

.cart-clear {
  color: #909399;
  cursor: pointer;
  font-size: 13px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f7fa;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: #f56c6c;
  font-weight: 600;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-qty .el-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
}

.cart-item-qty span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

.cart-footer {
  border-top: 1px solid #ebeef5;
  padding-top: 16px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label {
  font-size: 16px;
  color: #606266;
}

.cart-total-amount {
  font-size: 28px;
  font-weight: 700;
  color: #f56c6c;
}

.cart-actions {
  display: flex;
  gap: 12px;
}

.cart-actions .el-button {
  flex: 1;
  height: 48px;
  font-size: 16px;
  border-radius: 12px;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .cashier-container {
    grid-template-columns: 1fr 340px;
  }
}

@media (max-width: 1024px) {
  .pos-container {
    padding: 12px;
  }
  .pos-header {
    padding: 16px 20px;
  }
  .pos-title {
    font-size: 18px;
  }
  .stat-value {
    font-size: 24px;
  }
  .cashier-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cashier-goods {
    max-height: 50vh;
  }
}

@media (max-width: 768px) {
  .pos-container {
    padding: 8px;
  }
  .pos-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 14px 16px;
  }
  .pos-header-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .stat-card {
    padding: 16px;
    min-height: 100px;
  }
  .stat-icon {
    width: 44px;
    height: 44px;
  }
  .stat-value {
    font-size: 22px;
  }
  .quick-btn {
    padding: 12px 6px;
  }
  .quick-icon {
    width: 40px;
    height: 40px;
  }
  .goods-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  .stat-card {
    padding: 12px;
  }
  .stat-value {
    font-size: 20px;
  }
  .pos-title {
    font-size: 16px;
  }
}

/* ========== 弹窗样式统一 ========== */
.el-dialog {
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

.el-dialog__header {
  padding: 20px 24px 16px !important;
  background: linear-gradient(135deg, #f8f9fb 0%, #fff 100%);
  border-bottom: 1px solid #ebeef5;
}

.el-dialog__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #303133 !important;
}

.el-dialog__body {
  padding: 20px 24px !important;
}

.el-dialog__footer {
  padding: 16px 24px 20px !important;
  border-top: 1px solid #ebeef5;
  background: #fafafa;
}

/* 弹窗按钮样式 */
.el-dialog__footer .el-button {
  border-radius: 10px !important;
  padding: 10px 24px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

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

/* 描述列表样式 */
.el-descriptions {
  border-radius: 12px !important;
  overflow: hidden;
}

.el-descriptions__label {
  background: #f8f9fb !important;
  font-weight: 600 !important;
  color: #606266 !important;
}

.el-descriptions__content {
  color: #303133 !important;
}

/* 表单样式 */
.el-form-item__label {
  font-weight: 500 !important;
  color: #606266 !important;
}

.el-input__wrapper {
  border-radius: 10px !important;
  box-shadow: 0 0 0 1px #dcdfe6 inset !important;
}

.el-input__wrapper:hover {
  box-shadow: 0 0 0 1px #c0c4cc inset !important;
}

.el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px #667eea inset !important;
}

/* 单选框样式 */
.el-radio__input.is-checked .el-radio__inner {
  background: #667eea !important;
  border-color: #667eea !important;
}

.el-radio__input.is-checked + .el-radio__label {
  color: #667eea !important;
}

/* 数字输入框样式 */
.el-input-number {
  border-radius: 10px !important;
}

.el-input-number .el-input__wrapper {
  border-radius: 10px 0 0 10px !important;
}

/* 文本域样式 */
.el-textarea__inner {
  border-radius: 10px !important;
  box-shadow: 0 0 0 1px #dcdfe6 inset !important;
}

.el-textarea__inner:focus {
  box-shadow: 0 0 0 1px #667eea inset !important;
}
