/* ============================================
   鍐滃厛鐭?- 鍏ㄥ眬鏍峰紡
   Copyright (c) 2026 鍐滃厛鐭ョ鎶€鏈夐檺鍏徃. 淇濈暀鎵€鏈夋潈鍒?
   鏈蒋浠跺彈涓崕浜烘皯鍏卞拰鍥借憲浣滄潈娉曚繚鎶ゃ€?
   鏈粡涔﹂潰鎺堟潈锛岀姝㈠鍒躲€佷慨鏀广€佷紶鎾湰鏂囦欢銆?
   ============================================ */

/* CSS 鍙橀噺瀹氫箟 */
:root {
  --primary-green: #43A047;
  --primary-green-light: #66BB6A;
  --primary-green-dark: #2E7D32;
  --primary-gradient: linear-gradient(135deg, #43A047, #66BB6A);
  --primary-gradient-horizontal: linear-gradient(90deg, #43A047, #66BB6A);

  --accent-gold: #FFB300;
  --accent-gold-light: #FFD54F;
  --accent-blue: #42A5F5;
  --accent-blue-light: #90CAF9;
  --accent-orange: #FF7043;
  --accent-red: #EF5350;

  --bg-page: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFFFE;

  --text-primary: #1A1A2E;
  --text-secondary: #5A5A7A;
  --text-hint: #9E9EBE;
  --text-white: #FFFFFF;
  --text-on-green: #FFFFFF;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 12px rgba(67, 160, 71, 0.1);
  --shadow-float: 0 6px 24px rgba(255, 179, 0, 0.35);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 50%;

  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  --z-header: 100;
  --z-navbar: 100;
  --z-float: 200;
  --z-modal: 300;
  --z-overlay: 250;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --navbar-height: 60px;
  --header-height: 56px;
}

/* 鍏ㄥ眬閲嶇疆 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  outline: none;
}

input {
  border: none;
  outline: none;
  font-family: inherit;
}

/* ============================================
   椤甸潰瀹瑰櫒
   ============================================ */
.page-container {
  padding-bottom: calc(var(--navbar-height) + var(--safe-bottom) + 10px);
  min-height: 100vh;
}

/* ============================================
   椤堕儴鐘舵€佹爮 / Header
   ============================================ */
.header {
  background: var(--primary-gradient);
  padding: calc(var(--safe-top) + 12px) 16px 14px;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.header-location {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-white);
  font-size: 0.875rem;
}

.header-location .icon {
  font-size: 1rem;
}

.header-weather-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-white);
  font-size: 0.875rem;
}

.header-weather-mini .temp {
  font-size: 1.125rem;
  font-weight: 600;
}

/* 鎼滅储琛屽鍣?*/
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 鎼滅储鏍?*/
.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 8px 14px;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s ease;
  flex: 1;
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.35);
}

.search-bar .icon {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: transparent;
  color: var(--text-white);
  font-size: 0.875rem;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* 娑堟伅閫氱煡閾冮摏 */
.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.notification-bell:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.3);
}

.notification-bell .bell-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* 娑堟伅鏁伴噺瑙掓爣 */
.notification-badge {
  position: absolute;
  top: 2px;
  right: 0px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--accent-red);
  color: var(--text-white);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 4px rgba(239, 83, 80, 0.5);
  transform: scale(1);
  transition: transform 0.3s ease;
}

.notification-badge.hidden {
  transform: scale(0);
}

/* 閾冮摏鏅冨姩鍔ㄧ敾 */
.notification-bell.has-message .bell-icon {
  animation: bell-shake 3s ease-in-out infinite;
}

@keyframes bell-shake {

  0%,
  100% {
    transform: rotate(0deg);
  }

  5% {
    transform: rotate(15deg);
  }

  10% {
    transform: rotate(-13deg);
  }

  15% {
    transform: rotate(10deg);
  }

  20% {
    transform: rotate(-8deg);
  }

  25% {
    transform: rotate(5deg);
  }

  30% {
    transform: rotate(0deg);
  }
}

/* ============================================
   蹇嵎鍔熻兘鍏ュ彛
   ============================================ */
.quick-entry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px;
  background: var(--bg-card);
  margin: 12px 12px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.quick-entry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  cursor: pointer;
}

.quick-entry-item:active {
  transform: scale(0.93);
  background: rgba(67, 160, 71, 0.06);
}

.quick-entry-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.25s ease;
}

.quick-entry-item:active .quick-entry-icon {
  transform: scale(0.9);
}

.quick-entry-icon.weather {
  background: linear-gradient(135deg, #42A5F5, #90CAF9);
}

.quick-entry-icon.expert {
  background: linear-gradient(135deg, #43A047, #81C784);
}

.quick-entry-icon.location {
  background: linear-gradient(135deg, #FF7043, #FFAB91);
}

.quick-entry-icon.manage {
  background: linear-gradient(135deg, #2E7D32, #66BB6A);
}

.quick-entry-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   妯箙杞挱鍖?
   ============================================ */
.banner-section {
  margin: 12px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  height: 150px;
  box-shadow: var(--shadow-sm);
}

.banner-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}

.banner-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}

.banner-item::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-size: cover;
  background-position: center;
}

.banner-item:nth-child(1) {
  background: linear-gradient(135deg, #43A047, #2E7D32);
}

.banner-item:nth-child(2) {
  background: linear-gradient(135deg, #1565C0, #42A5F5);
}

.banner-item:nth-child(3) {
  background: linear-gradient(135deg, #E65100, #FF9800);
}

.banner-content {
  position: relative;
  z-index: 1;
  color: var(--text-white);
}

.banner-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.banner-content p {
  font-size: 0.8rem;
  opacity: 0.85;
  line-height: 1.4;
}

.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.banner-dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--text-white);
}

/* ============================================
   閫氱敤妯″潡鏍囬
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title .icon {
  font-size: 1.1rem;
}

.section-more {
  font-size: 0.8rem;
  color: var(--text-hint);
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ============================================
   鍐滀簨鎻愰啋妯″潡
   ============================================ */
.farm-remind {
  margin: 0 12px;
}

.remind-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 4px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.remind-list::-webkit-scrollbar {
  display: none;
}

.remind-card {
  min-width: 140px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: all 0.25s ease;
  border-left: 3px solid var(--primary-green);
}

.remind-card:active {
  transform: scale(0.97);
}

.remind-card .remind-tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-white);
  margin-bottom: 8px;
  font-weight: 500;
}

.remind-card .remind-tag.urgent {
  background: var(--accent-red);
}

.remind-card .remind-tag.normal {
  background: var(--primary-green);
}

.remind-card .remind-tag.info {
  background: var(--accent-blue);
}

.remind-card .remind-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.remind-card .remind-desc {
  font-size: 0.75rem;
  color: var(--text-hint);
  line-height: 1.4;
}

/* ============================================
   鐑棬璧勮妯″潡
   ============================================ */
.news-section {
  margin: 0 12px;
  padding-bottom: 12px;
}

.news-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.news-card:active {
  transform: scale(0.98);
  background: var(--bg-card-hover);
}

.news-card-img {
  width: 90px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.news-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-hint);
}

.news-card-tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(67, 160, 71, 0.1);
  color: var(--primary-green);
}

/* ============================================
   AI 鍔╂墜娴姩鎸夐挳
   ============================================ */
.ai-fab {
  position: fixed;
  bottom: calc(var(--navbar-height) + var(--safe-bottom) + 24px);
  /* Initial position, will be overridden by JS */
  right: max(20px, calc(50% - 240px + 20px));
  /* Initial position, will be overridden by JS */
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #10b981, #3b82f6);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-float);
  cursor: grab;
  transition: transform 0.3s ease, opacity 0.3s ease;
  animation: pulse-glow 3s ease-in-out infinite;
  opacity: 0.95;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  touch-action: none;
}

.ai-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  animation: ai-robot-bounce 3s ease-in-out infinite;
}

.ai-fab.dragging .ai-icon {
  animation: none;
}

.header-expert-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px;
}

.ai-fab.dragging {
  opacity: 0.95;
  transform: scale(1.05);
  animation: none;
  cursor: grabbing;
  transition: none;
  /* 鎷栨嫿鏃跺彇娑堣繃娓″姩鐢荤‘淇濊窡鎵?*/
}

.ai-fab:active:not(.dragging) {
  transform: scale(0.9);
}

/* AI 瀵硅瘽寮圭獥 */
.ai-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ai-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ai-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-modal.active {
  transform: translateX(-50%) translateY(0);
}

.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ai-modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-modal-header .close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: background 0.2s ease;
}

.ai-modal-header .close-btn:active {
  background: #E0E0E0;
}

.ai-modal-body {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.5;
  animation: msgIn 0.3s ease;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-message.bot {
  align-self: flex-start;
  background: #E8F5E9;
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.ai-message.user {
  align-self: flex-end;
  background: var(--primary-green);
  color: var(--text-white);
  border-bottom-right-radius: 4px;
}

.ai-modal-input {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--bg-page);
}

.ai-modal-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  font-size: 0.875rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ai-modal-input .send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ai-modal-input .send-btn:active {
  transform: scale(0.9);
}

/* ============================================
   搴曢儴瀵艰埅鏍?
   ============================================ */
.bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--navbar-height);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  z-index: var(--z-navbar);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.nav-item .nav-icon {
  font-size: 1.4rem;
  transition: all 0.25s ease;
  color: var(--text-hint);
}

.nav-item .nav-label {
  font-size: 0.65rem;
  color: var(--text-hint);
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav-item.active .nav-icon {
  color: var(--primary-green);
  transform: scale(1.1);
}

.nav-item.active .nav-label {
  color: var(--primary-green);
  font-weight: 600;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: -1px;
  width: 20px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--primary-gradient);
}

/* ============================================
   瀛愰〉闈㈤€氱敤鏍峰紡
   ============================================ */
.sub-header {
  background: var(--primary-gradient);
  padding: calc(var(--safe-top) + 12px) 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.sub-header .back-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 1.2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.sub-header .back-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.sub-header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

/* ============================================
   澶╂皵椤甸潰鏍峰紡
   ============================================ */
.weather-hero {
  background: var(--primary-gradient);
  padding: 0 20px 30px;
  text-align: center;
  color: var(--text-white);
}

.weather-hero .current-temp {
  font-size: 4rem;
  font-weight: 200;
  line-height: 1;
  margin-bottom: 4px;
}

.weather-hero .current-temp span {
  font-size: 1.5rem;
  vertical-align: super;
}

.weather-hero .weather-desc {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.weather-hero .weather-range {
  font-size: 0.85rem;
  opacity: 0.7;
}

.weather-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 12px;
}

.weather-detail-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.weather-detail-card .detail-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.weather-detail-card .detail-label {
  font-size: 0.75rem;
  color: var(--text-hint);
  margin-bottom: 4px;
}

.weather-detail-card .detail-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 7澶╅鎶?*/
.forecast-list {
  padding: 0 12px;
}

.forecast-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card);
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.forecast-item .day {
  font-size: 0.85rem;
  font-weight: 600;
  width: 60px;
}

.forecast-item .weather-icon {
  font-size: 1.3rem;
}

.forecast-item .temp-range {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: right;
  width: 80px;
}

.forecast-item .temp-range .high {
  font-weight: 600;
  color: var(--text-primary);
}

/* 鍐滀簨寤鸿 */
.farm-advice {
  margin: 0 12px 20px;
}

.advice-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-left: 3px solid var(--primary-green);
}

.advice-card .advice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.advice-card .advice-body h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.advice-card .advice-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   涓撳椤甸潰鏍峰紡
   ============================================ */
.expert-list {
  padding: 12px;
}

.expert-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all 0.25s ease;
}

.expert-card:active {
  transform: scale(0.98);
}

.expert-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #E8F5E9, #A5D6A7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.expert-info {
  flex: 1;
}

.expert-info .name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.expert-info .title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.expert-info .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.expert-info .tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(67, 160, 71, 0.1);
  color: var(--primary-green);
}

.expert-consult-btn {
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  background: var(--primary-gradient);
  color: var(--text-white);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.expert-consult-btn:active {
  transform: scale(0.95);
}

/* ============================================
   鍟嗗煄椤甸潰鏍峰紡
   ============================================ */
.mall-categories {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mall-categories::-webkit-scrollbar {
  display: none;
}

.category-chip {
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.category-chip.active {
  background: var(--primary-gradient);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.product-card:active {
  transform: scale(0.97);
}

.product-img {
  width: 100%;
  height: 130px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.product-body {
  padding: 10px 12px;
}

.product-body .product-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-body .product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-red);
}

.product-body .product-price .unit {
  font-size: 0.75rem;
  font-weight: 400;
}

.product-body .product-sales {
  font-size: 0.7rem;
  color: var(--text-hint);
  margin-top: 2px;
}

/* ============================================
   淇濋櫓椤甸潰鏍峰紡
   ============================================ */
.insurance-banner {
  margin: 12px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #43A047, #1B5E20);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}

.insurance-banner::after {
  content: '🛡️';
  position: absolute;
  right: 16px;
  bottom: -10px;
  font-size: 5rem;
  opacity: 0.15;
}

.insurance-banner h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.insurance-banner p {
  font-size: 0.8rem;
  opacity: 0.85;
}

.insurance-list {
  padding: 12px;
}

.insurance-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.insurance-card:active {
  transform: scale(0.98);
}

.insurance-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.insurance-card-header .ins-icon {
  font-size: 1.5rem;
}

.insurance-card-header .ins-type {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(67, 160, 71, 0.1);
  color: var(--primary-green);
  font-weight: 500;
}

.insurance-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.insurance-card .ins-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.insurance-card .ins-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.insurance-card .ins-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-red);
}

.insurance-card .ins-price .unit {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-hint);
}

.insurance-card .ins-buy-btn {
  padding: 8px 20px;
  border-radius: var(--radius-xl);
  background: var(--primary-gradient);
  color: var(--text-white);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ============================================
   涓汉涓績椤甸潰鏍峰紡
   ============================================ */
.profile-hero {
  background: var(--primary-gradient);
  padding: calc(var(--safe-top) + 20px) 20px 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-white);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.profile-info .profile-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-info .profile-phone {
  font-size: 0.85rem;
  opacity: 0.8;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(0, 0, 0, 0.04);
  margin: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stat-item {
  background: var(--bg-card);
  padding: 14px;
  text-align: center;
}

.stat-item .stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-green);
}

.stat-item .stat-label {
  font-size: 0.75rem;
  color: var(--text-hint);
  margin-top: 2px;
}

.profile-menu {
  margin: 0 12px;
}

.menu-group {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: var(--bg-page);
}

.menu-item .menu-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
}

.menu-item .menu-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.menu-item .menu-arrow {
  font-size: 0.8rem;
  color: var(--text-hint);
}

/* ============================================
   宸ュ叿绫?
   ============================================ */
.text-green {
  color: var(--primary-green);
}

.text-gold {
  color: var(--accent-gold);
}

.text-blue {
  color: var(--accent-blue);
}

.bg-green {
  background: var(--primary-gradient);
}

.mt-12 {
  margin-top: 12px;
}

.mb-12 {
  margin-bottom: 12px;
}

.px-12 {
  padding-left: 12px;
  padding-right: 12px;
}

/* ============================================
   鍔ㄧ敾
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ai-robot-bounce {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.18) rotate(5deg);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

.animate-in-delay-1 {
  animation-delay: 0.1s;
}

.animate-in-delay-2 {
  animation-delay: 0.2s;
}

.animate-in-delay-3 {
  animation-delay: 0.3s;
}

.animate-in-delay-4 {
  animation-delay: 0.4s;
}

/* ============================================
   鍐滅敯绠＄悊椤甸潰鏍峰紡
   ============================================ */

/* 绠＄悊姒傝缁熻 */
.manage-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(0, 0, 0, 0.04);
  margin: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.manage-overview-item {
  background: var(--bg-card);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manage-overview-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-green);
}

.manage-overview-label {
  font-size: 0.75rem;
  color: var(--text-hint);
  font-weight: 500;
}

/* 鍐滅敯鍒楄〃 */
.farm-list {
  padding: 0 12px 20px;
}

/* 鍐滅敯鍗＄墖 */
.farm-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.farm-card.expanded {
  box-shadow: var(--shadow-md);
}

.farm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.farm-card-header:active {
  background: rgba(67, 160, 71, 0.04);
}

.farm-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.farm-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.farm-icon.water-field {
  background: linear-gradient(135deg, #42A5F5, #90CAF9);
}

.farm-icon.orchard {
  background: linear-gradient(135deg, #FF9800, #FFE0B2);
}

.farm-icon.dry-field {
  background: linear-gradient(135deg, #8D6E63, #D7CCC8);
}

.farm-info {
  flex: 1;
  min-width: 0;
}

.farm-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.farm-location {
  font-size: 0.75rem;
  color: var(--text-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.farm-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.crop-count {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(67, 160, 71, 0.1);
  color: var(--primary-green);
  font-weight: 500;
}

.farm-arrow {
  font-size: 0.7rem;
  color: var(--text-hint);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 鍐滀綔鐗╁睍寮€闈㈡澘 */
.farm-crops-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-top: 0 solid rgba(0, 0, 0, 0.06);
}

.farm-card.expanded .farm-crops-panel {
  border-top-width: 1px;
}

.crop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease;
  cursor: pointer;
}

.crop-item:last-child {
  border-bottom: none;
}

.crop-item:active {
  background: rgba(67, 160, 71, 0.04);
}

.crop-emoji {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #F1F8E9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crop-info {
  flex: 1;
  min-width: 0;
}

.crop-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

.crop-stage {
  font-size: 0.72rem;
  color: var(--text-hint);
  display: block;
}

.crop-go {
  font-size: 1.2rem;
  color: var(--text-hint);
  flex-shrink: 0;
}

/* ============================================
   鍐滀綔鐗╄鎯呴〉鏍峰紡
   ============================================ */

/* 鐢熷懡鍛ㄦ湡姒傝 */
.lifecycle-hero {
  background: var(--primary-gradient);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--text-white);
}

.lifecycle-crop-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lifecycle-info {
  flex: 1;
  min-width: 120px;
}

.lifecycle-info h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lifecycle-info p {
  font-size: 0.78rem;
  opacity: 0.8;
}

.lifecycle-progress {
  width: 100%;
}

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #FFD54F, #FFB300);
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  opacity: 0.8;
  margin-top: 6px;
}

/* 鏃堕棿绾?*/
.manage-timeline {
  margin: 0 12px;
  padding-top: 4px;
}

.timeline-list {
  padding: 0 4px 8px 12px;
}

.timeline-item {
  display: flex;
  position: relative;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child .timeline-connector {
  display: none;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  z-index: 1;
  border: 2px solid var(--bg-page);
  box-shadow: 0 0 0 2px var(--primary-green);
}

.timeline-dot.urgent {
  background: var(--accent-red);
  box-shadow: 0 0 0 2px var(--accent-red);
}

.timeline-dot.normal {
  background: var(--primary-green);
  box-shadow: 0 0 0 2px var(--primary-green);
}

.timeline-dot.info {
  background: var(--accent-blue);
  box-shadow: 0 0 0 2px var(--accent-blue);
}

.timeline-connector {
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
}

.timeline-content {
  margin-left: 16px;
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-date {
  font-size: 0.72rem;
  color: var(--text-hint);
  font-weight: 500;
}

.timeline-task {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 寤鸿鏂规硶 */
.manage-advice {
  margin: 12px;
  padding-top: 4px;
}

.advice-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.advice-detail-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--primary-green);
}

.advice-detail-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.advice-detail-card .advice-date {
  font-size: 0.72rem;
  color: var(--primary-green);
  font-weight: 500;
  margin-bottom: 8px;
}

.advice-detail-card .advice-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* 鍐滆祫鎺ㄨ崘妯悜婊戝姩 */
.manage-tools {
  margin: 12px 0;
  padding: 0 0 0 0;
}

.manage-tools .section-header {
  padding-left: 24px;
  padding-right: 24px;
}

.tools-scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 12px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.tools-scroll-container::-webkit-scrollbar {
  display: none;
}

.tool-card {
  min-width: 130px;
  max-width: 140px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  text-align: center;
  transition: all 0.25s ease;
  scroll-snap-align: start;
  border: 1px solid rgba(67, 160, 71, 0.08);
}

.tool-card:active {
  transform: scale(0.95);
  box-shadow: var(--shadow-md);
}

.tool-card-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.tool-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tool-card-desc {
  font-size: 0.7rem;
  color: var(--text-hint);
  line-height: 1.4;
}

/* 淇濋櫓鎺ㄨ崘 */
.manage-insurance {
  margin: 0 12px 20px;
}

.insurance-recommend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ins-recommend-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: block;
  border: 1px solid rgba(67, 160, 71, 0.08);
}

.ins-recommend-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}

.ins-recommend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ins-recommend-icon {
  font-size: 1.3rem;
}

.ins-recommend-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.ins-recommend-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.ins-recommend-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-red);
}

/* ============================================
   娑堟伅閫氱煡椤甸潰
   ============================================ */

/* 椤堕儴"鍏ㄩ儴宸茶"鎸夐挳 */
.header-action-btn {
  font-size: 0.75rem;
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 4px 12px;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.header-action-btn:active {
  background: rgba(255, 255, 255, 0.35);
}

/* 鍒嗙被鏍囩鏍?*/
.notif-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: var(--bg-card);
  position: sticky;
  top: 52px;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.notif-tabs::-webkit-scrollbar {
  display: none;
}

.notif-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-page);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
}

.notif-tab:active {
  transform: scale(0.95);
}

.notif-tab.active {
  background: var(--primary-green);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.notif-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--accent-red);
  color: var(--text-white);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0 4px;
}

.notif-tab.active .notif-tab-badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-red);
}

/* 娑堟伅鍒楄〃 */
.notif-list {
  padding: 8px 12px;
}

/* 娑堟伅鍗＄墖 */
.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.notif-card:active {
  transform: scale(0.98);
  background: var(--bg-card-hover);
}

.notif-card.unread {
  border-left: 3px solid var(--primary-green);
  background: #FAFFFE;
}

/* 娑堟伅鍒嗙被鍥炬爣 */
.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notif-icon.weather {
  background: linear-gradient(135deg, #42A5F5, #90CAF9);
}

.notif-icon.mall {
  background: linear-gradient(135deg, #FF7043, #FFAB91);
}

.notif-icon.insurance {
  background: linear-gradient(135deg, #66BB6A, #A5D6A7);
}

.notif-icon.expert {
  background: linear-gradient(135deg, #AB47BC, #CE93D8);
}

.notif-icon.security {
  background: linear-gradient(135deg, #EF5350, #EF9A9A);
}

/* 娑堟伅鍐呭 */
.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.notif-tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.notif-tag.weather {
  background: rgba(66, 165, 245, 0.15);
  color: #1565C0;
}

.notif-tag.mall {
  background: rgba(255, 112, 67, 0.15);
  color: #D84315;
}

.notif-tag.insurance {
  background: rgba(102, 187, 106, 0.15);
  color: #2E7D32;
}

.notif-tag.expert {
  background: rgba(171, 71, 188, 0.15);
  color: #7B1FA2;
}

.notif-tag.security {
  background: rgba(239, 83, 80, 0.15);
  color: #C62828;
}

.notif-time {
  font-size: 0.7rem;
  color: var(--text-hint);
  flex-shrink: 0;
}

.notif-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.notif-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 鏈鍦嗙偣鏍囪 */
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 4px rgba(239, 83, 80, 0.4);
}

/* 绌虹姸鎬?*/
.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.notif-empty.hidden {
  display: none;
}

.notif-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.notif-empty-text {
  font-size: 0.9rem;
  color: var(--text-hint);
}

/* ============================================
   鍟嗗煄椤甸潰鏀归€犻檮鍔犳牱寮?
   ============================================ */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.mall-search-container {
  padding: 12px;
  background: var(--bg-page);
}

.search-bar.mall-search {
  background: #FFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  padding: 8px 14px;
}

.search-divider {
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 8px;
}

.camera-btn {
  font-size: 1.2rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.camera-btn:active {
  transform: scale(0.9);
}

/* 涓€у寲鎺ㄨ崘 */
.mall-recommend-section {
  margin: 0 12px 12px;
  background: linear-gradient(135deg, #F1F8E9, #DCEDC8);
  border-radius: var(--radius-lg);
  padding: 12px 0 16px;
  box-shadow: var(--shadow-sm);
}

.mall-recommend-section .section-header {
  padding: 0 14px 10px;
}

.mall-recommend-section .section-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 8px;
  border-radius: 10px;
}

.recommend-scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

.recommend-scroll-container::-webkit-scrollbar {
  display: none;
}

.recommend-card {
  min-width: 140px;
  background: #FFF;
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.1);
  scroll-snap-align: start;
  flex-shrink: 0;
  display: block;
}

.recommend-reason {
  font-size: 0.65rem;
  color: var(--accent-orange);
  background: rgba(255, 112, 67, 0.1);
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.recommend-img {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 8px;
  background: #F5F5F5;
  border-radius: var(--radius-sm);
  padding: 10px 0;
}

.recommend-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommend-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-red);
}

/* 璇嗗浘鎼滅储寮圭獥 */
.visual-search-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #FFF;
  border-radius: var(--radius-lg);
  width: 85%;
  max-width: 320px;
  z-index: 301;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 24px;
  text-align: center;
}

.visual-search-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: #F5F5F5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #999;
  cursor: pointer;
}

.scanning-animation {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: #F5F5F5;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-img {
  font-size: 2.5rem;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-green);
  box-shadow: 0 0 8px var(--primary-green);
  animation: scan 1.5s linear infinite;
}

@keyframes scan {
  0% {
    top: 0;
  }

  50% {
    top: 100%;
  }

  100% {
    top: 0;
  }
}

.visual-search-modal h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.visual-search-modal p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.scan-results.hidden {
  display: none;
}

.scan-results h4 {
  font-size: 0.85rem;
  color: var(--primary-green);
  margin-bottom: 12px;
  text-align: left;
}

.scan-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FAFFFE;
  border: 1px solid rgba(67, 160, 71, 0.2);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: left;
}

.scan-result-item .result-img {
  font-size: 1.8rem;
  background: #E8F5E9;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-result-item .result-info {
  flex: 1;
}

.scan-result-item .result-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.scan-result-item .result-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-red);
}

.scan-result-item .result-go {
  background: var(--primary-green);
  color: #FFF;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
}


/* ============================================
   浠挎窐瀹濆晢鍝佽鎯呴〉鏍峰紡
   ============================================ */
.product-detail-page {
  background: #F5F5F5;
}

.detail-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.back-btn-float,
.action-btn-float {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  backdrop-filter: blur(4px);
  transition: all 0.3s;
}

.detail-header.scrolled .back-btn-float,
.detail-header.scrolled .action-btn-float {
  background: transparent;
  color: #333;
}

.right-actions {
  display: flex;
  gap: 10px;
}

.header-tabs {
  display: flex;
  gap: 16px;
  transition: opacity 0.3s;
}

.header-tabs .tab {
  font-size: 0.9rem;
  color: #666;
  position: relative;
  padding: 4px 0;
}

.header-tabs .tab.active {
  color: var(--primary-green);
  font-weight: 600;
}

.header-tabs .tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--primary-green);
  border-radius: 2px;
}

.detail-gallery {
  position: relative;
  width: 100%;
  background: #FFF;
}

.gallery-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  width: 100%;
  height: 360px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.gallery-indicator {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: rgba(0, 0, 0, 0.4);
  color: #FFF;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
  letter-spacing: 1px;
}

.detail-price-module {
  background: #FFF;
  padding: 16px;
  margin-bottom: 10px;
  border-radius: 0 0 12px 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
}

.current-price {
  color: var(--accent-red);
  font-weight: 700;
  display: flex;
  align-items: baseline;
}

.current-price .symbol {
  font-size: 1rem;
}

.current-price .int {
  font-size: 1.8rem;
}

.current-price .dec {
  font-size: 1rem;
}

.sales-info {
  font-size: 0.75rem;
  color: #999;
}

.title-row {
  margin-bottom: 12px;
}

.tag-brand {
  background: var(--accent-red);
  color: #FFF;
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 4px;
}

.p-title {
  font-size: 1rem;
  font-weight: 700;
  display: inline;
  line-height: 1.4;
  color: #333;
}

.service-row {
  display: flex;
  gap: 16px;
  background: rgba(67, 160, 71, 0.05);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #666;
}

.service-row .icon {
  color: var(--primary-green);
  font-style: normal;
}

.detail-sku-select,
.detail-coupon {
  background: #FFF;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
}

.sku-label,
.coupon-label {
  font-size: 0.85rem;
  color: #999;
  width: 40px;
  flex-shrink: 0;
}

.sku-value {
  flex: 1;
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.sku-arrow,
.coupon-arrow {
  color: #999;
  font-size: 0.85rem;
}

.coupon-list {
  flex: 1;
  display: flex;
  gap: 8px;
}

.coupon-tag {
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  position: relative;
}

.coupon-tag::before,
.coupon-tag::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #FFF;
  border-radius: 50%;
  border-right: 1px solid var(--accent-red);
}

.coupon-tag::before {
  left: -3px;
  border-right: none;
  border-left: 1px solid var(--accent-red);
}

.coupon-tag::after {
  right: -3px;
}

.detail-eval-module {
  background: #FFF;
  padding: 16px;
  margin-bottom: 10px;
  border-radius: 12px;
}

.eval-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.eval-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
}

.eval-more {
  font-size: 0.8rem;
  color: var(--accent-red);
}

.eval-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.e-tag {
  background: #FFF1F0;
  color: #666;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.eval-item {
  border-bottom: 1px solid #F0F0F0;
  padding-bottom: 12px;
}

.eval-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.eval-user .avatar {
  background: #E8F5E9;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.eval-user .name {
  font-size: 0.85rem;
  color: #666;
  flex: 1;
}

.eval-user .stars {
  font-size: 0.7rem;
}

.eval-content {
  font-size: 0.85rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
}

.eval-date {
  font-size: 0.75rem;
  color: #999;
}

.detail-shop-module {
  background: #FFF;
  padding: 16px;
  margin-bottom: 10px;
  border-radius: 12px;
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.shop-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.shop-info {
  flex: 1;
}

.shop-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.shop-tags {
  display: flex;
  gap: 6px;
}

.s-tag {
  font-size: 0.65rem;
  color: #FFF;
  background: #FFB300;
  padding: 1px 4px;
  border-radius: 4px;
}

.shop-btn {
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 14px;
}

.shop-scores {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
}

.score-item .num.up {
  color: var(--accent-red);
}

.detail-content-module {
  background: #FFF;
  padding: 16px;
  border-radius: 12px 12px 0 0;
}

.module-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.module-divider .line {
  height: 1px;
  width: 40px;
  background: #DDD;
}

.module-divider .text {
  font-size: 0.85rem;
  color: #999;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  color: #666;
  margin-top: 10px;
}

.param-table td {
  border: 1px solid #EEE;
  padding: 8px;
}

.param-table td:first-child {
  background: #F9F9F9;
  width: 30%;
  color: #999;
}

.detail-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 60px;
  background: #FFF;
  display: flex;
  align-items: center;
  padding: 0 12px calc(var(--safe-bottom));
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.bar-icons {
  display: flex;
  gap: 16px;
  margin-right: auto;
  padding-left: 8px;
}

.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #666;
  cursor: pointer;
}

.icon-btn .icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.icon-btn .text {
  font-size: 0.65rem;
}

.bar-actions {
  display: flex;
  gap: 8px;
}

.btn-add-cart,
.btn-buy-now {
  height: 40px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #FFF;
  padding: 0 16px;
}

.btn-add-cart {
  background: linear-gradient(90deg, #FFC107, #FF9800);
}

.btn-buy-now {
  background: linear-gradient(90deg, #FF7043, #E64A19);
}

/* 瑙勬牸閫夋嫨寮圭獥 */
.sku-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.sku-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sku-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: #FFF;
  border-radius: 16px 16px 0 0;
  z-index: 201;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 16px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.sku-modal.active {
  transform: translateX(-50%) translateY(0);
}

.sku-modal-header {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #EEE;
  position: relative;
}

.sku-modal-header .sku-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-top: -30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sku-modal-header .sku-info {
  flex: 1;
}

.sku-modal-header .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-red);
}

.sku-modal-header .stock {
  font-size: 0.75rem;
  color: #999;
  margin: 2px 0;
}

.sku-modal-header .selected {
  font-size: 0.8rem;
  color: #333;
}

.sku-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  cursor: pointer;
}

.sku-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.sku-group {
  margin-bottom: 20px;
}

.sku-group h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.sku-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sku-tags .s-tag {
  padding: 6px 16px;
  background: #F5F5F5;
  color: #333;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.sku-tags .s-tag.active {
  background: rgba(67, 160, 71, 0.1);
  color: var(--primary-green);
  border: 1px solid var(--primary-green);
}

.qty-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qty-selector {
  display: flex;
  align-items: center;
}

.qty-btn {
  width: 30px;
  height: 30px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #666;
}

.qty-input {
  width: 40px;
  height: 30px;
  text-align: center;
  background: #F5F5F5;
  margin: 0 2px;
  font-size: 0.9rem;
}

.sku-modal-footer {
  padding-top: 10px;
}

.btn-confirm {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  background: var(--primary-gradient);
  color: #FFF;
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================
   淇濋櫓绛涢€夋爮鏍峰紡
   ============================================ */
.ins-filter-bar {
  display: flex;
  background: var(--bg-card);
  padding: 10px 16px;
  margin: 12px 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  justify-content: space-between;
  align-items: center;
}

.ins-filter-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.ins-filter-item.active {
  color: var(--primary-green);
  font-weight: 600;
}

.ins-filter-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--primary-green);
  border-radius: 2px;
}

.ins-sort-icons {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.ins-sort-icon-up,
.ins-sort-icon-down {
  border: 4px solid transparent;
  width: 0;
  height: 0;
  opacity: 0.4;
}

.ins-sort-icon-up {
  border-bottom-color: var(--text-secondary);
}

.ins-sort-icon-down {
  border-top-color: var(--text-secondary);
}

.ins-filter-item.active.sort-asc .ins-sort-icon-up {
  border-bottom-color: var(--primary-green);
  opacity: 1;
}

.ins-filter-item.active.sort-desc .ins-sort-icon-down {
  border-top-color: var(--primary-green);
  opacity: 1;
}

/* ============================================
   新手引导教程 (Tutorial Overlay)
   ============================================ */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
}

.tutorial-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 高亮被选中的元素 */
.tutorial-highlight {
  position: relative;
  z-index: 10000 !important;
  background-color: var(--bg-card) !important;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 1) !important;
  pointer-events: none;
  /* 防止引导期间误触 */
  transition: all 0.3s ease;
}

/* 如果是底部导航栏，需要修正圆角 */
.bottom-navbar.tutorial-highlight {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* 气泡弹窗 */
.tutorial-popover {
  position: fixed;
  z-index: 10001;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  width: 280px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.tutorial-popover.active {
  opacity: 1;
  transform: translateY(0);
}

/* 气泡小箭头 */
.tutorial-popover::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bg-card);
  transform: rotate(45deg);
}

/* 箭头在上方 */
.tutorial-popover.arrow-top::after {
  top: -6px;
  left: 50%;
  margin-left: -6px;
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

/* 箭头在下方 */
.tutorial-popover.arrow-bottom::after {
  bottom: -6px;
  left: 50%;
  margin-left: -6px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.tutorial-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tutorial-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.tutorial-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 12px;
}

.tutorial-counter {
  font-size: 0.75rem;
  color: var(--text-hint);
  font-weight: 600;
}

.tutorial-btn-group {
  display: flex;
  gap: 10px;
}

.tutorial-btn {
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  transition: all 0.2s;
}

.tutorial-btn.skip {
  color: var(--text-hint);
  background: transparent;
}

.tutorial-btn.next {
  color: var(--text-white);
  background: var(--primary-green);
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.tutorial-btn:active {
  transform: scale(0.95);
}

/* ============================================
   单页应用 (SPA) 子页面覆盖层
   ============================================ */
.sub-page {
  position: fixed;
  inset: 0;
  background-color: var(--bg-page);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sub-page.active {
  transform: translateX(0);
}

.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) 16px 14px;
  background: var(--bg-card);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10;
}

.sub-header .back-btn {
  font-size: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -10px;
  cursor: pointer;
}

.sub-header .title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  text-align: center;
  padding-right: 30px;
  /* Offset for center alignment */
}

.sub-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

/* 选项卡样式 (Orders, Insurance, Coupons) */
.spa-tab-nav {
  display: flex;
  background: var(--bg-card);
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.spa-tab-nav::-webkit-scrollbar {
  display: none;
}

.spa-tab-nav .tab-item {
  padding: 14px 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  transition: color 0.2s;
}

.spa-tab-nav .tab-item.active {
  color: var(--primary-green);
  font-weight: 600;
}

.spa-tab-nav .tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary-green);
}

.spa-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-hint);
  text-align: center;
}

.spa-empty .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* 列表卡片样式 */
.spa-list-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spa-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-hint);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
  padding-bottom: 8px;
}

.spa-card-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

/* 设置项组 */
.settings-group {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.settings-group-title {
  padding: 16px 16px 8px;
  font-size: 0.8rem;
  color: var(--text-hint);
  font-weight: 600;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-item:active {
  background: rgba(0, 0, 0, 0.02);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item-value {
  color: var(--text-hint);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Switch 开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary-green);
}

input:checked+.slider:before {
  transform: translateX(20px);
}
 / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
       MOnSR7Rec
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 . l o c a t i o n - r e f r e s h - b a r   { 
     b a c k g r o u n d :   r g b a ( 2 5 5 ,   1 7 9 ,   0 ,   0 . 1 ) ; 
     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   1 7 9 ,   0 ,   0 . 2 ) ; 
     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - m d ) ; 
     p a d d i n g :   1 0 p x   1 6 p x ; 
     m a r g i n :   0   1 6 p x   1 2 p x ; 
     d i s p l a y :   f l e x ; 
     a l i g n - i t e m s :   c e n t e r ; 
     j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
     f o n t - s i z e :   0 . 8 r e m ; 
     c o l o r :   # B 2 7 B 0 0 ; 
     a n i m a t i o n :   s l i d e D o w n   0 . 4 s   e a s e ; 
 } 
 
 . l o c a t i o n - r e f r e s h - b a r . h i d d e n   { 
     d i s p l a y :   n o n e ; 
 } 
 
 . l o c a t i o n - r e f r e s h - b a r   b u t t o n   { 
     b a c k g r o u n d :   v a r ( - - a c c e n t - g o l d ) ; 
     c o l o r :   w h i t e ; 
     p a d d i n g :   4 p x   1 2 p x ; 
     b o r d e r - r a d i u s :   v a r ( - - r a d i u s - s m ) ; 
     f o n t - s i z e :   0 . 7 5 r e m ; 
     f o n t - w e i g h t :   6 0 0 ; 
 } 
 
 @ k e y f r a m e s   s l i d e D o w n   { 
     f r o m   {   o p a c i t y :   0 ;   t r a n s f o r m :   t r a n s l a t e Y ( - 1 0 p x ) ;   } 
     t o   {   o p a c i t y :   1 ;   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   } 
 } 
 
 . b a n n e r - i t e m . l o a d i n g   { 
     b a c k g r o u n d :   # e e e ; 
     c o l o r :   # 9 9 9 ; 
 } 
 
 . l o a d i n g - s t a t e   { 
     t e x t - a l i g n :   c e n t e r ; 
     p a d d i n g :   3 0 p x ; 
     c o l o r :   v a r ( - - t e x t - h i n t ) ; 
     f o n t - s i z e :   0 . 8 7 5 r e m ; 
 } 
  
 