/* ========== 全局样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #333;
  padding-bottom: 70px;
}

/* ========== 顶部导航栏 ========== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #3b5fe8;
  color: #fff;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-nav .store {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav .search {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.top-nav .search img {
  width: 20px;
  height: 20px;
}

/* ========== 底部导航栏 ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #ffd36e;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
  z-index: 99;
}

.bottom-nav a {
  text-decoration: none;
  color: #666;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.bottom-nav a.active {
  color: #333;
  font-weight: bold;
}

.bottom-nav .icon {
  font-size: 24px;
}

/* ========== Tab 切换栏 ========== */
.tab-navbar {
  display: flex;
  gap: 20px;
  padding: 15px 20px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 60px;
  z-index: 98;
}

.tab-item {
  padding-bottom: 10px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #999;
  position: relative;
  transition: all 0.3s;
}

.tab-item.active {
  color: #333;
  border-bottom-color: #ffd36e;
}

.tab-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #ff1493;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: bold;
}

.tab-badge.show {
  display: flex;
}

/* ========== 内容容器 ========== */
.container {
  padding: 20px 15px;
  min-height: calc(100vh - 140px);
}

/* ========== 卡片样式 ========== */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.card-subtitle {
  font-size: 12px;
  color: #999;
}

/* ========== 表单样式 ========== */
.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.form-required::after {
  content: " *";
  color: #ff1493;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #3b5fe8;
  box-shadow: 0 0 0 3px rgba(59, 95, 232, 0.1);
}

.form-control::placeholder {
  color: #999;
}

select.form-control {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 24px;
  padding-right: 36px;
}

/* ========== 按钮样式 ========== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: #3b5fe8;
  color: #fff;
}

.btn-primary:hover {
  background: #2a47c9;
}

.btn-primary:active {
  opacity: 0.9;
}

.btn-secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
  background: #efefef;
}

.btn-danger {
  background: #ff1493;
  color: #fff;
}

.btn-danger:hover {
  background: #e60d7a;
}

.btn-block {
  width: 100%;
  display: flex;
}

/* ========== 搜索框 ========== */
.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
}

.search-bar button {
  background: none;
  border: none;
  cursor: pointer;
  color: #3b5fe8;
  font-size: 18px;
}

/* ========== 列表样式 ========== */
.list-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #f0f0f0;
  cursor: pointer;
}

.list-item.has-actions {
  flex-direction: row;
  align-items: center;
  cursor: default;
}

.list-item-main {
  flex: 1;
}

.list-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.list-item-subtitle {
  font-size: 12px;
  color: #999;
}

.order-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
  align-items: center;
}

.btn-cancel {
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  color: #333;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-cancel:active {
  background: #f5f5f5;
}

.btn-detail {
  padding: 8px 14px;
  border: none;
  border-radius: 20px;
  background: #ffd36e;
  color: #333;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-detail:active {
  background: #ffc84d;
}

.btn-detail-solo {
  width: auto;
  min-width: 140px;
  padding: 12px 28px;
  border: none;
  border-radius: 24px;
  background: #ffd36e;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-detail-solo:active {
  background: #ffc84d;
}

/* ========== 模态框 ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-overlay.active {
  display: flex;
  align-items: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  width: 100%;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 30px 20px 20px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-in-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: bold;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
}

.modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.modal-footer .btn {
  flex: 1;
}

/* ========== 信息展示 ========== */
.info-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  color: #999;
  font-weight: 500;
}

.info-value {
  color: #333;
  font-weight: 600;
  text-align: right;
}

/* ========== 状态标签 ========== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary {
  background: #e8f0ff;
  color: #3b5fe8;
}

.badge-success {
  background: #e8f5e9;
  color: #27ae60;
}

.badge-warning {
  background: #fff3cd;
  color: #f5a623;
}

.badge-info {
  background: #e3f2fd;
  color: #1976d2;
}

.badge-danger {
  background: #ffebee;
  color: #ff1493;
}

/* ========== 提示信息 ========== */
.alert {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 13px;
}

.alert-info {
  background: #e8f4ff;
  border-left: 3px solid #3b5fe8;
  color: #3b5fe8;
}

.alert-success {
  background: #e8f5e9;
  border-left: 3px solid #27ae60;
  color: #27ae60;
}

.alert-warning {
  background: #fff3cd;
  border-left: 3px solid #f5a623;
  color: #856404;
}

.alert-danger {
  background: #ffebee;
  border-left: 3px solid #ff1493;
  color: #ff1493;
}

/* ========== 文本工具类 ========== */
.text-center {
  text-align: center;
}

.text-muted {
  color: #999;
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
  margin-bottom: 16px;
}
