/* ==========================================================================
   APPLE MAX — Luxury Fintech Design System & Stylesheet
   Platform: Mobile-first Web App / PWA
   Version: 1.0 (Luxury White, Silver, Ice Blue, Dark Navy & Glassmorphism)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --navy-950: #050B14;
  --navy-900: #0B1727;
  --navy-800: #122338;
  --navy-700: #1C344F;
  --navy-600: #2C4D73;
  --silver-100: #F8FAFC;
  --silver-200: #EEF2F6;
  --silver-300: #D9E2EC;
  --silver-400: #BCCCDC;
  --silver-500: #9FB3C8;
  --ice-blue-50: #F5F9FD;
  --ice-blue-100: #EAF4FF;
  --ice-blue-200: #D8ECFF;
  --ice-blue-300: #B8DBFF;
  --white: #FFFFFF;
  
  --success: #0DBB63;
  --success-dark: #099A50;
  --success-light: #E6F9F0;
  --danger: #F04438;
  --danger-dark: #D92D20;
  --danger-light: #FEECEB;
  --warning: #F6A609;
  --warning-light: #FEF6E7;
  
  --bg-main: #F5F9FD;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Roboto, sans-serif;
  
  /* Glassmorphism Specs (PRD Section 37) */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-subtle: rgba(255, 255, 255, 0.52);
  --glass-bg-elevated: rgba(255, 255, 255, 0.88);
  --glass-border: 1px solid rgba(255, 255, 255, 0.8);
  --glass-border-silver: 1px solid rgba(217, 226, 236, 0.6);
  --glass-blur: blur(20px);
  --glass-shadow: 0 10px 30px rgba(31, 50, 80, 0.08);
  --glass-shadow-lg: 0 20px 45px rgba(11, 23, 39, 0.12);
  --glass-shadow-hover: 0 14px 34px rgba(31, 50, 80, 0.12);
  
  /* Radii (PRD Section 36) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-card: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-btn: 28px;
  --radius-pill: 999px;
  
  /* Layout */
  --bottom-nav-height: 68px;
  --header-height: 60px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: var(--font-family);
  background-color: #0c141f; /* Outer backdrop for luxury contrast */
  color: var(--navy-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Reviewer / Desktop Shell Controls */
.desktop-review-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(11, 23, 39, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-size: 13px;
}

.review-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.review-brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-select, .review-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.review-select:hover, .review-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.review-select option {
  background: #0B1727;
  color: #FFFFFF;
}

/* App Viewport Container */
.app-viewport-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 48px);
  padding: 24px 16px 40px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Device Mode Styles */
.mode-iphone {
  width: 390px;
  min-height: 844px;
  max-height: 92vh;
  border-radius: 48px;
  box-shadow: 0 0 0 10px #1E293B, 0 0 0 12px #334155, 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  background: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mode-iphone .iphone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #000000;
  border-radius: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
}

.notch-camera {
  width: 11px;
  height: 11px;
  background: #111a28;
  border-radius: 50%;
  box-shadow: inset 0 0 2px #3b82f6;
}

.mode-tablet {
  width: 768px;
  min-height: 900px;
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
}

.mode-full {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  border-radius: 0;
  box-shadow: 0 0 40px rgba(0,0,0,0.3);
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
}

/* Main App Container (Inside Device) */
#app-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(234, 244, 255, 0.7) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(217, 226, 236, 0.5) 0px, transparent 50%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbars */
#app-container::-webkit-scrollbar {
  width: 4px;
}
#app-container::-webkit-scrollbar-thumb {
  background: rgba(11, 23, 39, 0.15);
  border-radius: 4px;
}

/* Mobile Screen View Component */
.screen-view {
  display: none;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding-bottom: calc(var(--bottom-nav-height) + 24px);
  animation: fadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen-view.active {
  display: flex;
}

.screen-view.no-bottom-nav {
  padding-bottom: 24px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glassmorphism Classes (PRD specs) */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-card);
  transition: all 0.25s ease;
}

.glass-panel-subtle {
  background: var(--glass-bg-subtle);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border-silver);
  box-shadow: 0 4px 16px rgba(31, 50, 80, 0.04);
  border-radius: var(--radius-card);
}

.glass-panel-elevated {
  background: var(--glass-bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow-lg);
  border-radius: var(--radius-lg);
}

/* Buttons (PRD Section 38) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #0B1727 0%, #1C344F 60%, #304E72 100%);
  color: #FFFFFF;
  border: 1px solid rgba(217, 226, 236, 0.6);
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11, 23, 39, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(11, 23, 39, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--navy-900);
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(31, 50, 80, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--silver-300);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-buy {
  background: linear-gradient(135deg, #0DBB63 0%, #099A50 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(13, 187, 99, 0.35);
  font-weight: 700;
  border-radius: var(--radius-btn);
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-buy:active { transform: scale(0.98); }

.btn-sell {
  background: linear-gradient(135deg, #F04438 0%, #D92D20 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(240, 68, 56, 0.35);
  font-weight: 700;
  border-radius: var(--radius-btn);
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sell:active { transform: scale(0.98); }

/* Sticky Mobile Bottom Navigation (PRD Section 42) */
.mobile-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(217, 226, 236, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 100;
  box-shadow: 0 -8px 25px rgba(31, 50, 80, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  text-decoration: none;
  color: var(--silver-500);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
  transition: all 0.2s ease;
}

.nav-item img, .nav-item .nav-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.2s ease;
  filter: grayscale(1) opacity(0.55);
}

.nav-item.active {
  color: var(--navy-900);
  font-weight: 700;
}

.nav-item.active img, .nav-item.active .nav-icon {
  filter: none;
  transform: translateY(-2px) scale(1.1);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 16px;
  height: 3px;
  background: var(--navy-900);
  border-radius: 2px;
}

/* Floating App Top Bar for Sub-screens */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: rgba(245, 249, 253, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 50;
  border-bottom: 1px solid rgba(217, 226, 236, 0.4);
}

.header-back-btn, .header-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(217, 226, 236, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31, 50, 80, 0.05);
  transition: all 0.15s ease;
}

.header-back-btn:active, .header-action-btn:active {
  transform: scale(0.92);
}

.header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.2px;
}

/* Form Inputs & Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 50px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(217, 226, 236, 0.85);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--navy-900);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--navy-600);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(44, 77, 115, 0.12);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon-left {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--silver-500);
}

.input-with-icon .form-input {
  padding-left: 42px;
}

.input-with-icon .input-icon-right {
  position: absolute;
  right: 14px;
  cursor: pointer;
  color: var(--silver-500);
}

/* Onboarding Screens Styling */
.onboarding-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 24px 28px;
  min-height: 100%;
  background: radial-gradient(circle at 50% 25%, rgba(234, 244, 255, 0.95), #F5F9FD 75%);
  position: relative;
}

.floating-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 32px 0 20px;
  position: relative;
}

.floating-saturn-logo {
  width: 220px;
  max-width: 80%;
  filter: drop-shadow(0 15px 35px rgba(28, 52, 79, 0.18));
  animation: floatSlow 4s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.candlestick-glow-bg {
  position: absolute;
  bottom: -20px;
  width: 100%;
  opacity: 0.35;
  pointer-events: none;
}

.onboarding-text-center {
  text-align: center;
}

.onboarding-brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--navy-900);
  margin-top: 14px;
  text-transform: uppercase;
}

.onboarding-tagline {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-600);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.onboarding-desc {
  font-size: 15px;
  color: var(--navy-700);
  max-width: 280px;
  margin: 0 auto 24px;
  line-height: 1.45;
}

.stepper-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--silver-300);
  transition: all 0.3s ease;
}

.step-dot.active {
  width: 24px;
  background: var(--navy-900);
}

/* Vertical Stepper (PRD Screen 04) */
.vertical-stepper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 14px rgba(31, 50, 80, 0.04);
}

.stepper-number {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-700);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ice-blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ice-blue-300);
}

.stepper-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-900);
}

/* Dashboard / Home Components */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(31, 50, 80, 0.12);
  overflow: hidden;
}

.user-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #FFFFFF;
}

.user-greeting-label {
  font-size: 12px;
  color: var(--navy-600);
  font-weight: 500;
}

.user-greeting-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.2px;
}

.notification-bell-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(31, 50, 80, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.notification-badge-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid #FFFFFF;
}

/* Portfolio Hero Card (PRD Section 14) */
.portfolio-hero-card {
  margin: 10px 20px 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(234,244,255,0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 35px rgba(31, 50, 80, 0.09);
}

.portfolio-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.portfolio-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-600);
}

.portfolio-visibility-btn {
  background: none;
  border: none;
  color: var(--silver-500);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.portfolio-nominal {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.portfolio-gain-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--success-light);
  color: var(--success-dark);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

/* Interactive Mini Chart Container */
.portfolio-chart-container {
  height: 90px;
  margin: 14px -10px 10px;
  position: relative;
}

.portfolio-chart-canvas {
  width: 100%;
  height: 100%;
}

.timeframe-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(217, 226, 236, 0.5);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-top: 10px;
}

.timeframe-btn {
  flex: 1;
  padding: 4px 0;
  text-align: center;
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-600);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeframe-btn.active {
  background: var(--navy-900);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(11, 23, 39, 0.2);
}

/* Quick Action Grid (PRD Section 14 & 39) */
.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 20px;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.quick-action-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(31, 50, 80, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-action-icon-box img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.quick-action-item:hover .quick-action-icon-box {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 50, 80, 0.12);
}

.quick-action-item:active .quick-action-icon-box {
  transform: scale(0.94);
}

.quick-action-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-900);
}

/* Promo Banner (PRD Section 14) */
.promo-banner-card {
  margin: 0 20px 22px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #0B1727 0%, #1C344F 100%);
  color: #FFFFFF;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 30px rgba(11, 23, 39, 0.25);
  cursor: pointer;
}

.promo-copy {
  max-width: 60%;
  z-index: 2;
}

.promo-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.promo-subtitle {
  font-size: 12px;
  color: var(--silver-300);
  line-height: 1.35;
}

.promo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.promo-graphic-art {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

/* Market Section Header */
.section-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 12px;
}

.section-main-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.3px;
}

.section-link-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-600);
  text-decoration: none;
  cursor: pointer;
}

/* Stock Card & List Item */
.stock-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
}

.stock-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 16px rgba(31, 50, 80, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.stock-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 50, 80, 0.08);
  border-color: rgba(217, 226, 236, 0.9);
}

.stock-card-item:active {
  transform: scale(0.99);
}

.stock-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stock-logo-box {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 226, 236, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(31, 50, 80, 0.05);
}

.stock-logo-box img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.stock-ticker-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-900);
}

.stock-company-name {
  font-size: 12px;
  color: var(--silver-500);
}

.stock-sparkline-wrap {
  width: 70px;
  height: 32px;
}

.stock-item-right {
  text-align: right;
}

.stock-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
}

.stock-item-change {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stock-item-change.up {
  color: var(--success);
}

.stock-item-change.down {
  color: var(--danger);
}

/* Filter Chips / Tabs (PRD Section 16 & 25) */
.filter-chips-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 20px 14px;
  -webkit-overflow-scrolling: touch;
}

.filter-chips-scroll::-webkit-scrollbar { display: none; }

.filter-chip-btn {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(217, 226, 236, 0.7);
  color: var(--navy-700);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip-btn.active {
  background: var(--navy-900);
  color: #FFFFFF;
  border-color: var(--navy-900);
  box-shadow: 0 4px 12px rgba(11, 23, 39, 0.2);
}

/* Stock Detail Screen (PRD Section 17) */
.stock-detail-hero {
  padding: 20px;
  text-align: center;
}

.stock-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.stock-detail-ticker {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy-900);
}

.stock-detail-company {
  font-size: 14px;
  color: var(--silver-500);
  margin-bottom: 12px;
}

.stock-detail-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.5px;
}

.stock-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  margin: 14px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-card);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--silver-500);
  font-weight: 500;
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
}

/* Sticky Action Footer for Detail */
.sticky-action-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(217, 226, 236, 0.8);
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  z-index: 60;
  box-shadow: 0 -8px 25px rgba(31, 50, 80, 0.06);
}

/* Stepper Counter Widget */
.quantity-stepper-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(217, 226, 236, 0.8);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  margin: 14px 0;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ice-blue-100);
  border: 1px solid var(--ice-blue-300);
  color: var(--navy-900);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stepper-btn:active { transform: scale(0.9); }

.stepper-value-display {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy-900);
}

/* Bottom Sheet / Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 39, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 900;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: overlayFade 0.2s ease forwards;
}

.modal-overlay.active {
  display: flex;
}

.bottom-sheet {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 24px 20px 32px;
  box-shadow: 0 -15px 40px rgba(11, 23, 39, 0.2);
  animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--silver-300);
  margin: 0 auto 16px;
}

/* Success Card View */
.success-screen-card {
  text-align: center;
  padding: 36px 20px;
}

.success-hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin: 0 auto 18px;
  box-shadow: 0 10px 25px rgba(13, 187, 99, 0.25);
  border: 2px solid rgba(13, 187, 99, 0.3);
}

.receipt-summary-box {
  background: var(--ice-blue-50);
  border: 1px solid var(--silver-300);
  border-radius: var(--radius-card);
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.receipt-row.bold {
  font-weight: 700;
  color: var(--navy-900);
  border-top: 1px dashed var(--silver-300);
  margin-top: 6px;
  padding-top: 10px;
}

/* Portfolio Allocation Donut (PRD Section 22) */
.allocation-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  margin: 14px 20px;
}

.donut-chart-box {
  width: 140px;
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center-label {
  position: absolute;
  text-align: center;
}

.donut-center-title {
  font-size: 10px;
  color: var(--silver-500);
  text-transform: uppercase;
}

.donut-center-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-900);
}

.allocation-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding-left: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.legend-dot-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-700);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Live Chat Messenger (PRD Section 29) */
.chat-messages-container {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

.chat-bubble.support {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid rgba(217, 226, 236, 0.8);
  border-bottom-left-radius: 4px;
  color: var(--navy-900);
  box-shadow: 0 4px 12px rgba(31, 50, 80, 0.04);
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0B1727, #1C344F);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(11, 23, 39, 0.2);
}

.chat-timestamp {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  display: block;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(217, 226, 236, 0.8);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(11, 23, 39, 0.2);
}

/* Skeleton Loading State (PRD Section 32) */
.skeleton {
  background: linear-gradient(90deg, #EEF2F6 25%, #E2E8F0 50%, #EEF2F6 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .desktop-review-bar {
    display: none;
  }
  .app-viewport-wrapper {
    padding: 0;
    min-height: 100vh;
  }
  .mode-iphone, .mode-tablet, .mode-full {
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
  .mode-iphone .iphone-notch {
    display: none;
  }
}
