/**
 * UnusualTrader - Modern Professional Theme
 * Clean, centered, modern design with light/dark theme support
 */

:root {
  /* Dark Theme Colors (Default) */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --bg-hover: #475569;
  --bg-input: rgba(255, 255, 255, 0.05);
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-placeholder: #64748b;
  
  /* Accent Colors */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.15);
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --info: #06b6d4;
  
  /* Borders */
  --border: #475569;
  --border-light: rgba(71, 85, 105, 0.5);
  --border-input: rgba(71, 85, 105, 0.8);
  
  /* Shadows */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-input: 0 2px 4px rgba(0, 0, 0, 0.1);
  
  /* Spacing */
  --header-height: 70px;
  --nav-height: 56px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-input: #ffffff;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-placeholder: #94a3b8;
  
  --border: #e2e8f0;
  --border-light: rgba(148, 163, 184, 0.3);
  --border-input: #cbd5e1;
  
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-input: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Auto theme - follow system */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-input: #ffffff;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-placeholder: #94a3b8;
    
    --border: #e2e8f0;
    --border-light: rgba(148, 163, 184, 0.3);
    --border-input: #cbd5e1;
    
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-input: 0 1px 2px rgba(0, 0, 0, 0.05);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  background: var(--bg-primary);
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

/* Disable pointer events and hover states on interactive elements during swipe */
body.swiping button,
body.swiping a,
body.swiping .nav-item,
body.swiping .card,
body.swiping .btn {
  pointer-events: none !important;
}

body.swiping button:hover,
body.swiping button:active,
body.swiping a:hover,
body.swiping a:active,
body.swiping .nav-item:hover,
body.swiping .nav-item:active {
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

/* App Header Container - With iOS Safe Area Support */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Main Header */
.header {
  padding: 12px 16px;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Brand Section */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.header-banner {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Currency Selector - matches market-status size */
.currency-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  padding: 3px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  height: 36px;
  box-sizing: border-box;
}

.currency-chip {
  padding: 2px 8px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 26px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-chip:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.currency-chip.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Login Selector (same style as currency selector) */
.login-selector {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
}

.login-chip {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-chip:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.login-chip.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Compact Button (for header - matches currency-chip size exactly) */
.btn-compact {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1;
}

.btn-compact:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
  border-color: var(--primary);
}

.btn-compact-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-compact-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Market Status - matches currency-selector style */
.market-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  white-space: nowrap;
  height: 36px;
  box-sizing: border-box;
}

.market-label {
  color: var(--text-primary);
  font-weight: 600;
}

.status-text {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Auth Status */
.auth-status {
  display: flex;
  align-items: center;
}

.auth-status:empty {
  display: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  box-shadow: 0 0 6px var(--error);
}

.status-dot.open {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

/* User Badge */
.user-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-badge:hover {
  background: var(--primary);
  color: white;
}

/* Navigation Bar */
.main-nav {
  background: rgba(30, 41, 59, 0.95);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .main-nav {
  background: rgba(255, 255, 255, 0.95);
}

.nav-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  gap: 4px;
}

.nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Toggle Button Groups - Analysis Mode, News Source, Language */
.analysis-mode-toggle,
.news-source-toggle,
.language-selector,
.calendar-view-toggle {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--radius-full);
}

.analysis-mode-btn,
.news-source-btn,
.language-btn,
.calendar-view-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.analysis-mode-btn:hover,
.news-source-btn:hover,
.language-btn:hover,
.calendar-view-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.analysis-mode-btn.active,
.news-source-btn.active,
.language-btn.active,
.calendar-view-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Ticker Filter Box */
.ticker-filter-box {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ticker-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.ticker-filter-header:hover {
  background: var(--bg-hover);
}

.ticker-filter-count {
  color: var(--primary);
  font-weight: 600;
  margin-left: 8px;
}

.ticker-filter-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.ticker-filter-dropdown {
  display: none;
  padding: 12px;
  background: var(--bg-card);
  max-height: 200px;
  overflow-y: auto;
}

.ticker-filter-dropdown.open {
  display: block;
}

.ticker-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.ticker-checkbox:hover {
  background: var(--bg-hover);
}

.ticker-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.ticker-filter-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-small:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* Danger Button */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--error);
}

/* Icon Buttons (Edit/Delete) */
.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}

/* Main Content - With iOS Safe Area Support */
.main-app {
  padding-top: calc(var(--header-height) + var(--nav-height) + env(safe-area-inset-top, 0px) + 8px);
  min-height: 100vh;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Mobile fix - ensure content not under menu */
@media (max-width: 768px) {
  .main-app {
    padding-top: calc(var(--header-height) + var(--nav-height) + env(safe-area-inset-top, 0px) + 16px);
  }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 16px;
  padding-left: max(16px, env(safe-area-inset-left, 16px));
  padding-right: max(16px, env(safe-area-inset-right, 16px));
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Card Text (for login prompt) */
.card-text {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Profile Info (when logged in) */
.profile-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.profile-details {
  flex: 1;
}

.profile-nickname {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Account Actions - Edit Profile & Logout */
.account-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.account-actions .btn-secondary,
.account-actions .btn-danger {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.9rem;
}

/* Account Section - Centered */
.card > .btn-primary,
.card > .btn-secondary {
  display: block;
  width: 100%;
  margin-top: 8px;
}

/* Portfolio Summary */
.portfolio-summary {
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.portfolio-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.portfolio-change {
  font-size: 1rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.portfolio-change.positive {
  color: var(--success);
  background: rgba(34, 197, 94, 0.15);
}

.portfolio-change.negative {
  color: var(--error);
  background: rgba(239, 68, 68, 0.15);
}

/* Demo Alert in Portfolio Summary */
.demo-alert {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.demo-alert-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.btn-demo-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
  transition: all 0.2s ease;
}

.btn-demo-signin:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

/* Holdings */
.holding-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.holding-item:hover {
  background: rgba(59, 130, 246, 0.05);
  transform: translateX(4px);
  border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================
   HOLDING CARD VARIATIONS - 4 TRADER DESIGNS
   ============================================ */

/* VERSION 1: COMPACT DASHBOARD - Clean horizontal layout */
.holding-card-v1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

[data-theme="light"] .holding-card-v1 {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.holding-card-v1:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .holding-card-v1:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.holding-card-v1 .v1-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.holding-card-v1 .v1-ticker {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.holding-card-v1 .v1-position {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.holding-card-v1 .v1-center {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.holding-card-v1 .v1-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.holding-card-v1 .v1-change {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.holding-card-v1 .v1-change.positive {
  color: var(--success);
  background: rgba(34, 197, 94, 0.15);
}

.holding-card-v1 .v1-change.negative {
  color: var(--error);
  background: rgba(239, 68, 68, 0.15);
}

.holding-card-v1 .v1-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.holding-card-v1 .v1-signal {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
}

.holding-card-v1 .v1-signal.buy {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.holding-card-v1 .v1-signal.sell {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.holding-card-v1 .v1-signal.hold {
  background: rgba(234, 179, 8, 0.2);
  color: var(--warning);
}

/* VERSION 2: RICH DATA CARD - Vertical with detailed stats */
.holding-card-v2 {
  display: flex;
  flex-direction: column;
  padding: 20px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .holding-card-v2 {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.holding-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
}

.holding-card-v2:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .holding-card-v2:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.holding-card-v2 .v2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.holding-card-v2 .v2-ticker {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  text-transform: uppercase;
}

.holding-card-v2 .v2-signal-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid;
}

.holding-card-v2 .v2-signal-badge.buy {
  border-color: var(--success);
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.holding-card-v2 .v2-signal-badge.sell {
  border-color: var(--error);
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.holding-card-v2 .v2-signal-badge.hold {
  border-color: var(--warning);
  color: var(--warning);
  background: rgba(234, 179, 8, 0.1);
}

.holding-card-v2 .v2-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.holding-card-v2 .v2-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-input);
  border-radius: 12px;
}

.holding-card-v2 .v2-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.holding-card-v2 .v2-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.holding-card-v2 .v2-main-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .holding-card-v2 .v2-main-price {
  border-top: 1px solid var(--border);
}

.holding-card-v2 .v2-current-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.holding-card-v2 .v2-change-pill {
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
}

.holding-card-v2 .v2-change-pill.positive {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
  color: var(--success);
}

.holding-card-v2 .v2-change-pill.negative {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
  color: var(--error);
}

/* VERSION 3: TRADING TERMINAL - Aggressive dark styling */
.holding-card-v3 {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(23, 23, 23, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
  border-radius: 8px;
  border-left: 4px solid;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  position: relative;
}

[data-theme="light"] .holding-card-v3 {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-left: 4px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.holding-card-v3.buy-border {
  border-left-color: var(--success);
}

.holding-card-v3.sell-border {
  border-left-color: var(--error);
}

.holding-card-v3.hold-border {
  border-left-color: var(--warning);
}

.holding-card-v3:hover {
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.95) 0%, rgba(15, 15, 15, 0.98) 100%);
  transform: translateX(4px);
}

[data-theme="light"] .holding-card-v3:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.holding-card-v3 .v3-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.holding-card-v3 .v3-ticker {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: 'SF Mono', monospace;
  letter-spacing: 1px;
}

.holding-card-v3 .v3-position {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.holding-card-v3 .v3-numbers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.holding-card-v3 .v3-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'SF Mono', monospace;
  letter-spacing: -0.5px;
}

.holding-card-v3 .v3-pnl {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'SF Mono', monospace;
}

.holding-card-v3 .v3-pnl.positive {
  color: var(--success);
}

.holding-card-v3 .v3-pnl.negative {
  color: var(--error);
}

.holding-card-v3 .v3-signal-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-input);
  border-radius: 6px;
  min-width: 70px;
}

.holding-card-v3 .v3-signal-text {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.holding-card-v3 .v3-signal-text.buy {
  color: var(--success);
}

.holding-card-v3 .v3-signal-text.sell {
  color: var(--error);
}

.holding-card-v3 .v3-signal-text.hold {
  color: var(--warning);
}

.holding-card-v3 .v3-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.holding-card-v3 .v3-indicator.buy {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.holding-card-v3 .v3-indicator.sell {
  background: var(--error);
  box-shadow: 0 0 10px var(--error);
}

.holding-card-v3 .v3-indicator.hold {
  background: var(--warning);
  box-shadow: 0 0 10px var(--warning);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* VERSION 4: MODERN GRID - Visual hierarchy with accent colors */
.holding-card-v4 {
  display: flex;
  flex-direction: column;
  padding: 24px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .holding-card-v4 {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.holding-card-v4::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

[data-theme="light"] .holding-card-v4::after {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
}

.holding-card-v4:hover {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .holding-card-v4:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

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

.holding-card-v4 .v4-ticker-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.holding-card-v4 .v4-ticker {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.holding-card-v4 .v4-shares {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid var(--border-light);
}

.holding-card-v4 .v4-signal-pill {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.holding-card-v4 .v4-signal-pill.buy {
  background: var(--success);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.holding-card-v4 .v4-signal-pill.sell {
  background: var(--error);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.holding-card-v4 .v4-signal-pill.hold {
  background: var(--warning);
  color: #000;
}

.holding-card-v4 .v4-mid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
}

.holding-card-v4 .v4-price-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.holding-card-v4 .v4-price-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.holding-card-v4 .v4-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.holding-card-v4 .v4-change-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.holding-card-v4 .v4-change-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.holding-card-v4 .v4-change-value.positive {
  color: var(--success);
}

.holding-card-v4 .v4-change-value.negative {
  color: var(--error);
}

.holding-card-v4 .v4-change-percent {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 10px;
}

.holding-card-v4 .v4-change-percent.positive {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.holding-card-v4 .v4-change-percent.negative {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.holding-card-v4 .v4-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .holding-card-v4 .v4-bottom {
  border-top: 1px solid var(--border-light);
}

.holding-card-v4 .v4-avg-price {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.holding-card-v4 .v4-avg-price strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Edit and Delete Buttons for Holdings */
.holding-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.holding-btn {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.holding-btn.edit {
  background: var(--primary);
  color: #fff;
}

.holding-btn.edit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.holding-btn.delete {
  background: var(--error);
  color: #fff;
}

.holding-btn.delete:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Empty State / Error Message - Centered */
.error-message,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  min-height: 300px;
}

.error-message h3,
.empty-state h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.error-message p,
.empty-state p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 400px;
}

/* Retry Button - Modern Design */
.btn-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-retry::before {
  content: '↻';
  margin-right: 8px;
  font-size: 1.1rem;
}

/* ============================================
   LOGIN SCREEN - MODERN DESIGN
   ============================================ */

.login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  padding-top: max(24px, env(safe-area-inset-top, 24px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  padding-left: max(16px, env(safe-area-inset-left, 16px));
  padding-right: max(16px, env(safe-area-inset-right, 16px));
  z-index: 3000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-container {
  width: 100%;
  max-width: 420px;
  margin: auto;
}

.login-branding {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .login-icon {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.login-banner {
  height: 40px;
  width: auto;
  max-width: 80%;
  display: block;
  margin: 0 auto;
}

.login-form-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Auth Tabs - styled like analysis selector */
.analysis-selector-card .auth-tabs {
  width: 100%;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--radius-full);
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-tab:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
}

.auth-form.hidden {
  display: none;
}

/* Form Groups - Modern Design */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern Input Fields */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-input);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Time Input Specific Styling */
.form-group input[type="time"] {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

/* Remove default time picker icon styling issues */
.form-group input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.6;
  width: 20px;
  height: 20px;
}

[data-theme="light"] .form-group input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
}

.form-group input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-placeholder);
  font-weight: 400;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.03);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--shadow-input);
}

/* Form group in auth forms */
.auth-form .form-group {
  flex-shrink: 0;
}

/* Checkbox styling */
.form-group.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.form-group.checkbox label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  cursor: pointer;
}

.form-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Form hint text */
.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Auth Extras (Google Sign In) */
.auth-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
  flex-shrink: 0;
}

.auth-extras.hidden {
  display: none;
}

/* Auth Spacer (to match Google section height) */
.auth-spacer {
  height: 80px;
  flex-shrink: 0;
}

/* Login Form Buttons */
.btn-login-submit {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  transition: all 0.2s ease;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.btn-skip-login {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-skip-login:hover {
  background: var(--bg-input);
  border-color: var(--primary);
  color: var(--primary);
}

/* Login Divider */
.login-divider {
  display: flex;
  align-items: center;
  margin: 16px 0 12px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  padding: 0 12px;
}

/* Login Error */
.login-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 4px;
  text-align: center;
  min-height: 0;
  font-weight: 500;
}

.login-error:empty {
  display: none;
}

/* Google Sign-In Container */
.google-signin-container {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

/* Login Hint */
.login-register-hint {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-register-hint a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.login-register-hint a:hover {
  text-decoration: underline;
}

/* Responsive Scaling */
@media (max-width: 480px) {
  .login-container {
    max-width: 100%;
  }
  
  .login-icon {
    width: 64px;
    height: 64px;
  }
  
  .login-banner {
    height: 32px;
  }
  
  .login-form-container {
    padding: 24px 20px;
  }
  
  .auth-tab {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

@media (min-width: 768px) {
  .login-container {
    max-width: 460px;
  }
  
  .login-icon {
    width: 96px;
    height: 96px;
  }
  
  .login-banner {
    height: 44px;
  }
  
  .login-form-container {
    padding: 40px;
  }
}

/* ============================================
   NEWS PAGE - MODERN LINKS DESIGN
   ============================================ */

/* News List Container */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* News Item - Modern Card Link */
.news-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-input);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--text-muted);
  transition: all 0.2s ease;
}

.news-item.positive::before {
  background: var(--success);
}

.news-item.negative::before {
  background: var(--error);
}

.news-item.neutral::before {
  background: var(--warning);
}

.news-item:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.news-item.clickable {
  cursor: pointer;
}

.news-item.clickable:hover {
  background: rgba(59, 130, 246, 0.08);
}

/* News Headline */
.news-headline {
  font-size: 1rem;
  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 Meta Information */
.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.news-ticker {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* News Link Icon */
.news-link-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-muted);
  opacity: 0;
  transition: all 0.2s ease;
}

.news-item:hover .news-link-icon {
  opacity: 1;
  color: var(--primary);
}

/* No Data Message */
.no-data {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* News Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* ============================================
   CALENDAR - BEAUTIFUL MODERN DESIGN
   ============================================ */

/* Calendar Summary - Integrated Stats */
.calendar-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--bg-input);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.calendar-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calendar Date Card */
.calendar-date-card {
  padding: 0;
  overflow: hidden;
}

.calendar-date-card.today {
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Calendar Date Header */
.calendar-date-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border-light);
}

.calendar-day {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-monthday {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.today-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calendar Events Container */
.calendar-events {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

/* Calendar Event */
.calendar-event {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--text-muted);
  transition: all 0.2s ease;
}

.calendar-event:hover {
  background: var(--bg-hover);
  transform: translateX(4px);
}

.calendar-event.earnings {
  border-left-color: var(--primary);
}

.calendar-event.dividend {
  border-left-color: var(--success);
}

.calendar-event.ex-dividend {
  border-left-color: var(--warning);
}

.calendar-event.meeting {
  border-left-color: var(--info);
}

/* Event Header */
.event-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-ticker {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.event-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.event-type-badge.earnings {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.event-type-badge.dividend {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.3);
}

.event-type-badge.ex-dividend {
  background: rgba(234, 179, 8, 0.15);
  color: var(--warning);
  border-color: rgba(234, 179, 8, 0.3);
}

.event-type-badge.meeting {
  background: rgba(6, 182, 212, 0.15);
  color: var(--info);
  border-color: rgba(6, 182, 212, 0.3);
}

/* Event Description */
.event-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================
   PORTFOLIO SENTIMENT & STATS COMBINED
   ============================================ */

/* Sentiment Card with Integrated Stats */
.sentiment-stats-card {
  padding: 20px;
  margin-bottom: 16px;
}

.sentiment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.sentiment-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sentiment-emoji {
  font-size: 2rem;
}

.sentiment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sentiment-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sentiment-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sentiment-value.positive {
  color: var(--success);
}

.sentiment-value.negative {
  color: var(--error);
}

.sentiment-value.neutral {
  color: var(--warning);
}

.sentiment-score {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

/* Stats Grid inside Sentiment Card */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.stat-item:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.stat-icon {
  font-size: 1.4rem;
  line-height: 1;
}

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

.stat-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   MODAL & OVERLAY
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 4000;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}

.modal-body {
  padding: 24px;
}

/* ============================================
   LOADING & SPINNER
   ============================================ */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alerts-container {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.08) 100%);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--error) 0%, #dc2626 100%);
}

.alert.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(22, 163, 74, 0.06) 100%);
  border-color: rgba(34, 197, 94, 0.25);
}

.alert.success::before {
  background: linear-gradient(90deg, var(--success) 0%, #16a34a 100%);
}

.alert.warning {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(202, 138, 4, 0.06) 100%);
  border-color: rgba(234, 179, 8, 0.25);
}

.alert.warning::before {
  background: linear-gradient(90deg, var(--warning) 0%, #ca8a04 100%);
}

.alert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.alert-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.alert-text strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   ANALYSIS CARD
   ============================================ */

.analysis-selector-card {
  padding: 20px;
  margin-bottom: 16px;
}

.analysis-selector-card .analysis-mode-toggle {
  width: 100%;
}

/* Calendar Events Table - styled like analysis table */
.calendar-events-table {
  margin-bottom: 0;
}

.calendar-event-row {
  border-left: 3px solid transparent;
}

.calendar-event-row.earnings {
  border-left-color: var(--primary);
}

.calendar-event-row.dividend {
  border-left-color: var(--success);
}

.calendar-event-row.ex-dividend {
  border-left-color: var(--warning);
}

.calendar-event-row.meeting {
  border-left-color: var(--info);
}

.calendar-event-row.ipo {
  border-left-color: var(--info);
}

.calendar-event-row .event-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.calendar-event-row .event-ticker {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'SF Mono', SFMono-Regular, monospace;
}

.calendar-event-row .event-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.calendar-event-row .event-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Signal badge variations for calendar */
.signal-badge.primary {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.signal-badge.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.3);
}

.signal-badge.warning {
  background: rgba(234, 179, 8, 0.15);
  color: var(--warning);
  border-color: rgba(234, 179, 8, 0.3);
}

.signal-badge.info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--info);
  border-color: rgba(6, 182, 212, 0.3);
}

/* IPO Event Styling */
.calendar-event.ipo {
  border-left-color: var(--info);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(6, 182, 212, 0.02) 100%);
}

.calendar-event.ipo:hover {
  border-left-color: var(--info);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0.04) 100%);
}

.event-type-badge.upcoming {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.3);
}

.event-type-badge.recent {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.event-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.event-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.analysis-card {
  padding: 20px;
  margin-bottom: 16px;
}

.analysis-table {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.analysis-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  transition: background 0.2s ease;
}

.analysis-row:hover {
  background: var(--bg-hover);
}

.analysis-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.analysis-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'SF Mono', SFMono-Regular, monospace;
  letter-spacing: -0.5px;
}

.analysis-value.price {
  color: var(--primary);
  font-size: 1.1rem;
}

.analysis-value.positive {
  color: var(--success);
}

.analysis-value.negative {
  color: var(--error);
}

.analysis-value.overbought {
  color: var(--error);
}

.analysis-value.oversold {
  color: var(--success);
}

.analysis-value.neutral {
  color: var(--warning);
}

/* Signal Badge */
.signal-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.signal-badge.buy {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.signal-badge.sell {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.signal-badge.hold,
.signal-badge.neutral {
  background: rgba(234, 179, 8, 0.2);
  color: var(--warning);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.signal-badge.small {
  padding: 4px 10px;
  font-size: 0.7rem;
}

/* Signals List */
.signals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.signal-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  border-left: 3px solid transparent;
}

.signal-item.buy {
  border-left-color: var(--success);
}

.signal-item.sell {
  border-left-color: var(--error);
}

.signal-item.hold {
  border-left-color: var(--warning);
}

.signal-indicator {
  font-weight: 700;
  color: var(--text-primary);
  min-width: 80px;
}

.signal-reason {
  color: var(--text-secondary);
}

/* TradingView Card */
.tradingview-card {
  padding: 20px;
}

.tv-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
}

.tv-score {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tv-counts {
  display: flex;
  gap: 12px;
}

.tv-counts span {
  font-size: 0.8rem;
  font-weight: 600;
}

.tv-buy {
  color: var(--success);
}

.tv-neutral {
  color: var(--warning);
}

.tv-sell {
  color: var(--error);
}

.tv-section {
  margin-bottom: 16px;
}

.tv-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.tv-indicators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.tv-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.tv-ind-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.tv-ind-value {
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'SF Mono', monospace;
}

.tv-ind-signal {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.tv-ind-signal.buy {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.tv-ind-signal.sell {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.tv-ind-signal.neutral {
  background: rgba(234, 179, 8, 0.2);
  color: var(--warning);
}

/* ============================================
   OFFLINE BANNER
   ============================================ */

.offline-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.95) 0%, rgba(202, 138, 4, 0.95) 100%);
  color: #000;
  padding: 16px 20px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  display: none;
  backdrop-filter: blur(10px);
}

.offline-banner.visible {
  display: block;
}

/* Dismiss Button for Offline Banner */
.btn-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.4);
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ============================================
   LAST UPDATED
   ============================================ */

.last-updated {
  text-align: center;
  padding: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 600px) {
  .header-banner {
    display: none;
  }
  
  .nav-item {
    font-size: 0.75rem;
    padding: 8px 6px;
  }
  
  .portfolio-value {
    font-size: 1.8rem;
  }
  
  .card {
    padding: 16px;
  }
  
  .holding-card-v4 {
    padding: 18px;
  }
  
  .holding-card-v4 .v4-ticker {
    font-size: 1.1rem;
  }
  
  .holding-card-v4 .v4-price {
    font-size: 1.4rem;
  }
  
  .news-item {
    padding: 14px 16px;
  }
  
  .news-headline {
    font-size: 0.95rem;
  }
  
  .calendar-summary {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .tv-indicators {
    grid-template-columns: 1fr;
  }
  
  /* Mobile form improvements */
  .form-group {
    gap: 8px;
  }
  
  .form-group label {
    font-size: 0.8rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 16px;
    min-height: 48px;
    font-size: 16px; /* Prevent iOS zoom */
  }
  
  /* Better touch targets for mobile */
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-compact,
  .nav-item,
  .auth-tab,
  .language-btn,
  .news-source-btn,
  .analysis-mode-btn,
  .btn-demo-signin {
    min-height: 44px;
    min-width: 44px;
  }
  
  .page-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Form actions on mobile */
  .form-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: 100%;
  }
  
  /* Better time input on mobile */
  .form-group input[type="time"] {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 16px;
    min-height: 48px;
  }
  
  /* Checkbox improvements */
  .form-group.checkbox {
    padding: 8px 0;
  }
  
  .form-group input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
  }
}

@media (max-width: 380px) {
  .header-logo {
    width: 32px;
    height: 32px;
  }
  
  .portfolio-value {
    font-size: 1.6rem;
  }
  
  .container {
    padding: 8px 12px;
  }
  
  .card {
    padding: 14px;
    margin-bottom: 12px;
  }
  
  .nav-content {
    padding: 4px 8px;
  }
  
  .nav-item {
    font-size: 0.7rem;
    padding: 8px 4px;
  }
  
  .holding-card-v4 {
    padding: 14px;
  }
  
  .holding-card-v4 .v4-ticker {
    font-size: 1rem;
  }
  
  .holding-card-v4 .v4-price {
    font-size: 1.2rem;
  }
  
  .sentiment-emoji {
    font-size: 1.6rem;
  }
  
  .stat-value {
    font-size: 1.4rem;
  }
}

/* ============================================
   SELECTION & FOCUS STATES
   ============================================ */

::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================
   FORM ACTIONS
   ============================================ */

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
  flex: 1;
}
