:root {
  --el-color-primary: #ff9100;
  --el-color-primary-light-3: #ffb24d;
  --el-color-primary-light-5: #ffc980;
  --el-color-primary-light-7: #ffe0b3;
  --el-color-primary-light-8: #ffeccc;
  --el-color-primary-light-9: #fff7eb;
  --brand-gradient: linear-gradient(135deg, #ffb300, #ff8f00);
  --dark-sidebar: #1a1a1a;
  --bg-light: #f7f8fa;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-light);
  color: #333;
  height: 100vh;
  overflow: hidden;
}

/* 登录页面样式 */
.login-container {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1f1f1f 0%, #111111 100%);
  position: relative;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 145, 0, 0.15) 0%, rgba(0,0,0,0) 70%);
  top: 10%;
  left: 10%;
}

.login-container::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255, 179, 0, 0.1) 0%, rgba(0,0,0,0) 70%);
  bottom: 10%;
  right: 10%;
}

.login-card {
  width: 420px;
  padding: 50px 40px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  z-index: 10;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.login-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 700;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.login-title {
  font-size: 20px;
  color: #666;
  font-weight: 500;
}

.login-btn {
  width: 100%;
  height: 46px;
  background: var(--brand-gradient);
  border: none;
  font-weight: 600;
  font-size: 16px;
  margin-top: 15px;
}

/* 后台主框架样式 */
.admin-layout {
  height: 100vh;
  display: flex;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background-color: var(--dark-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.sidebar-logo-box {
  padding: 30px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-btn {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  color: #a0aec0;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
}

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

.menu-btn.active {
  color: #1a1a1a;
  background: var(--brand-gradient);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 143, 0, 0.25);
}

.menu-btn.active .el-icon {
  color: #1a1a1a;
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #a0aec0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  display: inline-block;
}

.status-dot.offline {
  background-color: #ef4444;
  animation: pulse 1.5s infinite;
}

/* 主内容区 */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #f7f9fc;
}

.top-header {
  height: 70px;
  background-color: #fff;
  border-bottom: 1px solid #eef1f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 35px;
  flex-shrink: 0;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.content-body {
  flex: 1;
  padding: 30px 35px;
  overflow-y: auto;
}

/* 卡片统计样式 */
.stat-row {
  margin-bottom: 25px;
}

.stat-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  border: 1px solid #eef1f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-title {
  font-size: 14px;
  color: #888;
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  font-family: 'Outfit', sans-serif;
}

.stat-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 订单卡片列表 */
.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.order-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eef1f6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.order-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.order-card-header {
  padding: 20px;
  border-bottom: 1px dashed #eef1f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-table-num {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-time {
  font-size: 13px;
  color: #999;
}

.order-timer {
  font-size: 12px;
  color: #ff9100;
  font-weight: 600;
  background-color: #fff8f0;
  padding: 4px 8px;
  border-radius: 6px;
}

.order-card-body {
  padding: 20px;
  flex: 1;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 10px;
}

.order-item-name {
  font-weight: 500;
}

.order-item-qty {
  color: #999;
  margin-left: 10px;
}

.order-item-price {
  font-weight: 600;
  color: #2d3748;
}

.order-card-footer {
  padding: 15px 20px 20px 20px;
  background-color: #fafbfc;
  border-top: 1px solid #eef1f6;
}

.order-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.order-total-label {
  font-size: 13px;
  color: #666;
}

.order-total-val {
  font-size: 18px;
  font-weight: 700;
  color: #ff3b30;
}

.order-action-buttons {
  display: flex;
  gap: 10px;
}

.order-btn {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  font-weight: 600;
}

/* 菜品库图片预览 */
.dish-table-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

/* 动画 */
@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* 二维码卡片 */
.qr-card {
  max-width: 480px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #eef1f6;
  padding: 40px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.qr-image-wrapper {
  width: 240px;
  height: 240px;
  margin: 30px auto;
  border: 1px solid #eef1f6;
  border-radius: 16px;
  padding: 15px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.qr-img {
  width: 100%;
  height: 100%;
}

/* 上传图片控件美化 */
.avatar-uploader .el-upload {
  border: 1px dashed var(--el-border-color);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--el-transition-duration-fast);
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fafbfc;
}

.avatar-uploader .el-upload:hover {
  border-color: var(--el-color-primary);
}

.el-icon.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  text-align: center;
}

.uploaded-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Banner上传 */
.banner-uploader .el-upload {
  border: 1px dashed var(--el-border-color);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--el-transition-duration-fast);
  width: 100%;
  height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fafbfc;
}
.banner-uploader .el-upload:hover {
  border-color: var(--el-color-primary);
}
.banner-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-uploader-placeholder {
  text-align: center;
}

/* 主题色调预设 */
.color-preset-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-preset-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.color-preset-dot:hover {
  transform: scale(1.15);
}
.color-preset-dot.active {
  border-color: #1a1a1a;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* 手机模拟器样式 */
.simulator-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.simulator-phone {
  width: 330px;
  height: 660px;
  border: 12px solid #1a1a1a;
  border-radius: 40px;
  background-color: #f5f5f5;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.phone-notch {
  width: 130px;
  height: 18px;
  background-color: #1a1a1a;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 1000;
}
.phone-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 模拟导航栏 */
.mock-nav-bar {
  height: 80px;
  padding-top: 18px; /* notch 下拉 */
  display: flex;
  flex-direction: column;
  color: #fff;
  transition: background-color 0.3s ease;
  box-sizing: border-box;
  flex-shrink: 0;
  justify-content: space-between;
}
.mock-system-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  font-size: 9px;
  opacity: 0.9;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.mock-status-icons {
  display: flex;
  align-items: center;
}
.mock-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 8px 16px;
  flex: 1;
}
.mock-nav-title {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}
.mock-capsule {
  width: 65px;
  height: 24px;
  border: 1px solid rgba(255,255,255,0.25);
  background-color: rgba(0,0,0,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 4px;
}
.capsule-dot {
  width: 4px;
  height: 4px;
  background-color: #fff;
  border-radius: 50%;
}
.capsule-line {
  width: 1px;
  height: 10px;
  background-color: rgba(255,255,255,0.2);
}
.capsule-circle {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
}

/* 模拟器内容区 */
.mock-screen-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background-color: #f7f8fa;
  padding-bottom: 108px; /* 50px cart bar + 48px tab bar + 10px spacing */
}

/* 店铺Logo */
.mock-shop-header {
  padding: 12px 14px;
  background-color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.mock-shop-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}
.mock-shop-logo-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
}
.mock-shop-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-shop-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}
.mock-table-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}

/* 广告Banner */
.mock-banner-box {
  width: calc(100% - 24px);
  margin: 0 auto 8px auto;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.02);
  flex-shrink: 0;
}
.mock-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mock-banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
}

/* 模拟公告 */
.mock-announcement {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 12px 8px 12px;
  border-radius: 8px;
}
.mock-announcement-text {
  font-size: 11px;
  color: #b45309;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* 点餐核心区域 */
.mock-shop-body {
  flex: 1;
  display: flex;
  background-color: #fff;
  overflow: hidden;
}
.mock-sidebar {
  width: 75px;
  background-color: #f7f8fa;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}
.mock-sidebar-item {
  padding: 16px 8px;
  font-size: 11px;
  color: #666;
  text-align: center;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  transition: all 0.2s ease;
  word-break: break-all;
}
.mock-sidebar-item.active {
  background-color: #fff;
  font-weight: 600;
}
.mock-dish-list {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}
.mock-category-title {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  margin-bottom: 8px;
}
.mock-dish-card {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f7f8fa;
}
.mock-dish-img-box {
  width: 54px;
  height: 54px;
  background-color: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.mock-dish-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}
.mock-dish-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.mock-dish-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-dish-desc {
  font-size: 10px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-dish-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mock-dish-price {
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
}
.mock-qty-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mock-qty-btn {
  width: 16px;
  height: 16px;
  border: 1px solid #ccc;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  color: #666;
  cursor: pointer;
}
.mock-qty-btn.active {
  color: #fff;
  border: none;
}
.mock-qty-num {
  font-size: 11px;
  font-weight: 600;
}

/* 模拟底部工具栏 */
.mock-bottom-bar {
  height: 50px;
  background-color: #fff;
  border-top: 1px solid #eee;
  position: absolute;
  bottom: 48px; /* Lifted up for the TabBar */
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-sizing: border-box;
  z-index: 100;
}
.mock-cart-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-top: -10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.mock-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: #fff;
  font-size: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}
.mock-cart-price-info {
  margin-left: 10px;
  display: flex;
  flex-direction: column;
}
.mock-cart-price {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}
.mock-cart-tips {
  font-size: 9px;
  color: #999;
}
.mock-submit-btn {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 18px;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
}
.simulator-tips {
  font-size: 12px;
  color: #999;
  margin-top: 10px;
}

/* 模拟小程序底部导航栏 TabBar */
.mock-tab-bar {
  height: 48px;
  background-color: #ffffff;
  border-top: 1px solid #eef1f6;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 200;
  box-sizing: border-box;
}

.mock-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #909399;
  cursor: pointer;
  flex: 1;
}

.mock-tab-item.active {
  font-weight: bold;
}

.mock-tab-icon {
  font-size: 16px;
  margin-bottom: 2px;
}

.mock-tab-text {
  font-size: 9px;
  line-height: 1;
}

/* 模拟器首页样式 */
.mock-hero-banner {
  position: relative;
  color: #ffffff;
  padding: 24px 16px;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.mock-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.mock-banner-content {
  position: relative;
  z-index: 2;
}
.mock-banner-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.mock-banner-desc {
  font-size: 9px;
  opacity: 0.9;
  font-weight: 500;
}

.mock-action-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px 16px;
  margin: 0 12px 12px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mock-scan-btn-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
}
.mock-scan-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}
.mock-scan-circle:hover {
  transform: scale(1.05);
}
.mock-scan-btn-text {
  font-size: 13px;
  font-weight: 700;
}
.mock-scan-tip {
  font-size: 9px;
  color: #999;
}

.mock-recommend-section {
  display: flex;
  flex-direction: column;
  margin: 0 12px;
}
.mock-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
}
.mock-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
}
.mock-section-sub {
  font-size: 9px;
}
.mock-recommend-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -4px;
}
.mock-recommend-item {
  width: 50%;
  padding: 0 4px;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.mock-item-img-box {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  margin-bottom: 4px;
}
.mock-item-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
}
.mock-item-info {
  display: flex;
  flex-direction: column;
}
.mock-item-name {
  font-size: 10px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-item-price {
  font-size: 10px;
  font-weight: 700;
}
