/* ============================================
   FranklinWH AI Demo - Style Sheet
   Mobile-first (390x844) Prototype
   ============================================ */

/* CSS Variables */
:root {
  --primary: #EE8E25;
  --primary-light: rgba(238, 142, 37, 0.1);
  --primary-dark: #D47A1A;
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --danger: #F53F3F;
  --danger-light: rgba(245, 63, 63, 0.1);
  --info: #0792FB;
  --info-light: rgba(7, 146, 251, 0.1);
  --warning: #f97316;
  --text: #0D1316;
  --text-secondary: rgba(13, 19, 22, 0.5);
  --text-tertiary: rgba(13, 19, 22, 0.35);
  --bg-page: #F7F8FA;
  --bg-card: #FFFFFF;
  --border: #EEEEEE;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  --nav-height: 80px;
  --status-bar: 44px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.5;
  max-width: 390px;
  margin: 0 auto;
  min-height: 844px;
  overflow-x: hidden;
  position: relative;
}

/* Page Container */
.page {
  display: none;
  padding-bottom: var(--nav-height);
  min-height: 844px;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Header / Status Bar
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-page);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__title {
  font-size: 1.125rem;
  font-weight: 600;
}

.header__logo {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.profile-switcher {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}

.profile-switcher:active {
  transform: scale(0.9);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Home Page
   ============================================ */
.status-banner {
  margin: 0 20px 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #FFF8F0, #FFFDF9);
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(238, 142, 37, 0.15);
}

.status-banner__text {
  color: var(--text);
  font-weight: 500;
}

/* Core Metrics - removed (existing App) */

/* Device Cards - removed (existing App) */

/* Energy Flow - removed (existing App) */

/* AI Floating Character (左侧全局浮动，匹配现有 App) */
.ai-fab {
  position: fixed;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  transition: transform 0.2s;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ai-fab:active {
  transform: scale(0.9);
}

.ai-fab--global {
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
}

.ai-fab--global:active {
  transform: translateY(-50%) scale(0.9);
}

.ai-fab__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: var(--nav-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 16px;
  z-index: 200;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 8px 16px;
  transition: color 0.2s;
  color: var(--text-tertiary);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item__icon {
  font-size: 1.3rem;
}

.nav-item__label {
  font-size: 0.65rem;
  font-weight: 500;
}

/* ============================================
   Chat Page
   ============================================ */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 844px;
}

.chat-header {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.chat-header__title {
  font-size: 1rem;
  font-weight: 600;
}

.chat-header__lang {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-page);
  padding: 4px 10px;
  border-radius: 12px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  padding-bottom: 160px;
}

.chat-bubble {
  margin-bottom: 16px;
  animation: bubbleIn 0.3s ease;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble--user {
  display: flex;
  justify-content: flex-end;
}

.chat-bubble--user .chat-bubble__content {
  background: var(--primary);
  color: white;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  max-width: 80%;
  font-size: 0.9rem;
}

.chat-bubble--ai {
  display: flex;
  justify-content: flex-start;
}

.chat-bubble--ai .chat-bubble__content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 16px;
  max-width: 90%;
  font-size: 0.85rem;
  line-height: 1.7;
  box-shadow: var(--shadow);
}

.chat-bubble__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  margin-right: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-light), rgba(238, 142, 37, 0.2));
}

.chat-section {
  margin-bottom: 12px;
}

.chat-section__title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.chat-section__list {
  list-style: none;
  padding: 0;
}

.chat-section__list li {
  padding: 3px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Collapsible reasoning */
.reasoning-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--info);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 8px 0;
  border: none;
  background: none;
  font-family: var(--font);
}

.reasoning-toggle__arrow {
  transition: transform 0.2s;
}

.reasoning-toggle.open .reasoning-toggle__arrow {
  transform: rotate(90deg);
}

.reasoning-content {
  display: none;
  padding: 10px 12px;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 6px;
}

.reasoning-content.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* Execute button */
.execute-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s, background 0.2s;
  font-family: var(--font);
}

.execute-btn:active {
  transform: scale(0.95);
  background: #0d9668;
}

.execute-btn--done {
  background: var(--text-tertiary);
  pointer-events: none;
}

.execute-btn--done .undo-link {
  color: var(--info);
  text-decoration: underline;
  font-size: 0.75rem;
  margin-left: 8px;
  pointer-events: auto;
  cursor: pointer;
}

/* Quick questions chips */
.quick-chips {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  white-space: nowrap;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  font-family: var(--font);
}

.quick-chip:active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Chat input */
.chat-input-area {
  position: fixed;
  bottom: var(--nav-height);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 8px 16px 8px;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font);
  background: var(--bg-page);
}

.chat-input:focus {
  border-color: var(--primary);
}

.mic-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.attach-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.attach-btn:active {
  background: var(--bg-page);
}

.mic-btn:active {
  transform: scale(0.9);
  background: var(--primary-dark);
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s;
  display: none;
}

.send-btn.show {
  display: flex;
}

.send-btn:active {
  transform: scale(0.9);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* ============================================
   Schedule Page
   ============================================ */
.schedule-page .header {
  background: var(--bg-card);
}

/* Price chart */
.price-chart {
  margin: 0 20px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.price-chart__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.price-chart__subtitle {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.price-chart__canvas {
  width: 100%;
  height: 120px;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#chartGradient);
  opacity: 0.3;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.6rem;
  color: var(--text-tertiary);
}

/* Schedule Timeline */
.timeline {
  margin: 0 20px 20px;
}

.timeline__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 30px;
  bottom: -10px;
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.timeline-dot--gray { background: #E5E7EB; }
.timeline-dot--green { background: var(--success); }
.timeline-dot--yellow { background: #FBBF24; }
.timeline-dot--orange { background: var(--primary); }

.timeline-content {
  flex: 1;
}

.timeline-content__time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.timeline-content__action {
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 2px;
}

.timeline-content__note {
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 500;
  margin-top: 2px;
}

.timeline-content__note--orange {
  color: var(--primary);
}

/* AI reasoning summary */
.ai-summary-card {
  margin: 0 20px 16px;
  background: linear-gradient(135deg, #FFF8F0, #FFFDF9);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid rgba(238, 142, 37, 0.15);
}

.ai-summary-card__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-summary-card__text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Savings comparison */
.savings-card {
  margin: 0 20px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.savings-card__amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

.savings-card__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.savings-card__comparison {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-light);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 500;
}

/* ============================================
   Profile Page
   ============================================ */
.profile-section {
  padding: 20px;
}

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.profile-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 auto 12px;
}

.profile-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-card__detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
}

.profile-menu-item--coming-soon {
  opacity: 0.5;
}

.profile-menu-item__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-menu-item__icon {
  font-size: 1.1rem;
}

.profile-menu-item__text {
  font-size: 0.85rem;
  font-weight: 500;
}

.profile-menu-item__arrow {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.profile-menu-item__badge {
  font-size: 0.65rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

/* ============================================
   Settings Page
   ============================================ */
.settings-section {
  padding: 16px 20px;
}

.settings-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.settings-menu-item__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-menu-item__icon {
  font-size: 1.2rem;
}

.settings-menu-item__text {
  font-size: 0.9rem;
  font-weight: 500;
}

.settings-menu-item__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-menu-item__value {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.settings-menu-item__arrow {
  color: var(--text-tertiary);
  font-size: 1rem;
}

/* ============================================
   Mode Page — AI 内嵌推荐
   ============================================ */
.back-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-mode-recommend {
  margin: 0 20px 16px;
  background: linear-gradient(135deg, #FFF8F0, #FFFDF9);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid rgba(238, 142, 37, 0.2);
  box-shadow: var(--shadow);
}

.ai-mode-recommend__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-mode-recommend__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.ai-mode-recommend__img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.ai-mode-recommend__bubble {
  flex: 1;
}

.ai-mode-recommend__answer {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
}

.ai-mode-recommend__ask {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  margin-top: 16px;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
}

/* AI Mode Info */
.ai-mode-info {
  margin: 0 20px 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ai-mode-info__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.ai-mode-info__factors {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-mode-info__factor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-mode-info__factor-icon {
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
}

.ai-mode-info__factor-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* AI Mode Status */
.ai-mode-status {
  margin: 0 20px 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ai-mode-status__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.ai-mode-status__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.ai-mode-status__item:last-child {
  border-bottom: none;
}

.ai-mode-status__label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ai-mode-status__value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

/* ============================================
   AI Notify Card (merged notification + explain)
   ============================================ */
.ai-notify-card {
  margin: 0 20px 16px;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.ai-notify-card.hidden {
  display: none !important;
}

.ai-notify-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ai-notify-card__icon {
  font-size: 0.9rem;
}

.ai-notify-card__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  flex: 1;
}

.ai-notify-card__dots {
  display: flex;
  gap: 4px;
}

.ai-notify-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}

.ai-notify-card__dot--active {
  background: var(--primary);
}

.ai-notify-card__dismiss {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.ai-notify-card__body {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}

/* ============================================
   现有 App 占位块
   ============================================ */
.existing-app-placeholder {
  margin: 20px;
}

.placeholder-block {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
}

.placeholder-block__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.placeholder-block__text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}

.placeholder-block__note {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* ============================================
   Utility classes
   ============================================ */
.hidden {
  display: none !important;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-info { color: var(--info); }

/* ============================================
   Welcome Overlay (PRD 3.4.2)
   ============================================ */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: 844px;
  background: linear-gradient(180deg, #FFF8F0 0%, #FFFFFF 50%, #FFF5E6 100%);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

.welcome-overlay.hidden {
  display: none !important;
}

.welcome-overlay__content {
  text-align: center;
  padding: 40px 30px;
}

.welcome-overlay__logo {
  margin-bottom: 24px;
}

.welcome-overlay__logo-img {
  width: 80px;
  height: 80px;
}

.welcome-overlay__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.welcome-overlay__subtitle {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.welcome-overlay__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.welcome-overlay__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.welcome-overlay__btn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: var(--font);
  border: none;
}

.welcome-overlay__btn:active {
  transform: scale(0.97);
}

.welcome-overlay__btn--guided {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(238, 142, 37, 0.3);
}

.welcome-overlay__btn--free {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ============================================
   Notification Card — REMOVED (merged into AI Notify Card)
   ============================================ */

/* ============================================
   AI Review Card (PRD 3.5.3) — Schedule Page
   ============================================ */
.ai-review-card {
  margin: 0 20px 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #F0F9FF, #FFFFFF);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(7, 146, 251, 0.15);
  box-shadow: var(--shadow);
}

.ai-review-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ai-review-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), rgba(238, 142, 37, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ai-review-card__summary {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.ai-review-card__suggestion {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 38px;
  margin-bottom: 8px;
}

.ai-review-card__link {
  display: block;
  text-align: right;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
}

.ai-review-card__link:active {
  opacity: 0.7;
}

/* ============================================
   Tariff Settings Page (PRD 3.5.4)
   ============================================ */
.tariff-ai-card {
  margin: 16px 20px;
  padding: 16px;
  background: linear-gradient(135deg, #FFF8F0, #FFFDF9);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(238, 142, 37, 0.2);
  box-shadow: var(--shadow);
}

.tariff-ai-card__question {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.tariff-ai-card__result {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 10px 12px;
  background: white;
  border-radius: var(--radius-sm);
}

.tariff-info {
  margin: 0 20px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.tariff-info__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.tariff-info__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.tariff-info__item:last-child {
  border-bottom: none;
}

.tariff-info__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tariff-info__value {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.tariff-detail-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.2s;
}

.tariff-detail-btn:active {
  transform: scale(0.97);
}

/* ============================================
   Backup Reserve Page (PRD 3.5.5)
   ============================================ */
.backup-ai-card {
  margin: 16px 20px;
  padding: 16px;
  background: linear-gradient(135deg, #F0FDF4, #FFFFFF);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: var(--shadow);
}

.backup-ai-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.backup-ai-card__icon {
  font-size: 1rem;
}

.backup-ai-card__title {
  font-size: 0.88rem;
  color: var(--text);
}

.backup-ai-card__reason {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 28px;
}

.backup-slider-section {
  margin: 20px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.backup-slider-section__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.backup-slider-section__value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.backup-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  margin-bottom: 10px;
}

.backup-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(238, 142, 37, 0.4);
}

.backup-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(238, 142, 37, 0.4);
}

.backup-slider-section__range {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.backup-slider-marker {
  position: relative;
  height: 0;
  margin-bottom: 6px;
}

.backup-slider-marker__label {
  position: absolute;
  left: 20%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-light);
  padding: 1px 6px;
  border-radius: 4px;
}

.backup-slider-marker__label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--primary);
}

.backup-ai-feedback {
  margin: 0 20px;
  padding: 14px 16px;
  background: var(--success-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.backup-ai-feedback--warning {
  background: rgba(249, 115, 22, 0.1);
}

.backup-ai-feedback--danger {
  background: var(--danger-light);
}

.backup-ai-feedback__icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.backup-ai-feedback__text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   Health Score Card (PRD 3.5.6) — Profile Page
   ============================================ */
.health-score-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.health-score-card__circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid var(--success);
  background: var(--success-light);
  transition: border-color 0.3s, background 0.3s;
}

.health-score-card__circle--green {
  border-color: var(--success);
  background: var(--success-light);
}

.health-score-card__circle--yellow {
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.1);
}

.health-score-card__circle--red {
  border-color: var(--danger);
  background: var(--danger-light);
}

.health-score-card__number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.health-score-card__info {
  flex: 1;
}

.health-score-card__label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.health-score-card__assessment {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}
