/* AlphaPick App CSS — Mobile-first dark finance theme */

/* Auth pages */
.auth-body { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-container { width: 100%; max-width: 400px; }
.auth-logo { font-family: 'Fraunces', Georgia, serif; font-size: 28px; font-weight: 700; color: var(--text); display: block; margin-bottom: 32px; text-align: center; }
.auth-logo span { color: var(--accent); }
.auth-title { font-family: 'Fraunces', Georgia, serif; font-size: 28px; font-weight: 700; margin-bottom: 24px; color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.auth-form label { font-size: 13px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.05em; }
.auth-form input, .auth-form textarea, .auth-form select { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; color: var(--text); font-size: 15px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.15s; width: 100%; }
.auth-form input:focus, .auth-form textarea:focus { border-color: var(--accent); }
.auth-form input::placeholder { color: var(--text-muted); }
.btn-auth { background: var(--accent); color: #0c0c0e; border: none; border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: opacity 0.15s; margin-top: 8px; display: inline-block; text-decoration: none; text-align: center; }
.btn-auth:hover { opacity: 0.9; }
.auth-error { background: rgba(255, 80, 80, 0.1); border: 1px solid rgba(255, 80, 80, 0.3); border-radius: 10px; padding: 12px 16px; color: #ff7070; font-size: 14px; margin-bottom: 16px; }
.auth-success { background: rgba(80, 200, 120, 0.1); border: 1px solid rgba(80, 200, 120, 0.3); border-radius: 10px; padding: 12px 16px; color: #70ff98; font-size: 14px; margin-bottom: 16px; }
.auth-footer { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 20px; }
.auth-footer a { color: var(--accent); text-decoration: none; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 10px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  margin-bottom: 12px;
  text-decoration: none;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.btn-google svg { flex-shrink: 0; }
.google-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--text-muted); font-size: 13px; }
.google-divider::before, .google-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.error-code { font-family: 'Fraunces', Georgia, serif; font-size: 80px; font-weight: 900; color: var(--accent); text-align: center; margin-bottom: 16px; }

/* Dashboard */
.dash-body { background: var(--bg); min-height: 100vh; }
.dashboard-container { max-width: 100%; padding: 0 0 80px; }
.dash-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.dash-header-left { display: flex; align-items: center; gap: 12px; }
.back-link { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.back-link:hover { color: var(--text); }
.dash-logo { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 700; color: var(--text); }
.dash-logo span { color: var(--accent); }
.dash-tier-badge { background: var(--accent-dim); color: var(--accent); font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 20px; letter-spacing: 0.05em; text-transform: uppercase; }
.dash-nav { display: flex; gap: 4px; }
.dash-nav-link { font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 6px 12px; border-radius: 20px; transition: all 0.15s; }
.dash-nav-link:hover { color: var(--text); background: var(--surface); }
.dash-nav-link.active { color: var(--accent); background: var(--accent-dim); }

/* Banners */
.install-banner, .notif-banner { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.btn-install, .btn-enable-notif { background: var(--accent); color: #0c0c0e; border: none; border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-dismiss { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
.stat-card { background: var(--surface); padding: 20px 16px; text-align: center; }
.stat-val { font-family: 'Fraunces', Georgia, serif; font-size: 28px; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* Picks grid */
.picks-section { padding: 20px 16px; }
.section-title { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.picks-grid { display: grid; gap: 12px; }
.pick-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.pick-card:hover { border-color: rgba(245, 200, 66, 0.3); transform: translateY(-1px); }
.pick-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pick-ticker-wrap { display: flex; align-items: center; gap: 8px; }
.pick-ticker { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 900; color: var(--text); }
.signal-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; }
.signal-long { background: rgba(80, 200, 120, 0.15); color: #50c878; }
.signal-short { background: rgba(255, 80, 80, 0.15); color: #ff7070; }
.signal-watch { background: rgba(245, 200, 66, 0.15); color: var(--accent); }
.sector-tag { font-size: 11px; color: var(--text-muted); background: var(--surface-2); padding: 3px 10px; border-radius: 20px; }
.pick-company { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.pick-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.price-row { display: flex; flex-direction: column; gap: 2px; }
.price-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.price-val { font-size: 15px; font-weight: 600; color: var(--text); }
.price-target { color: #50c878; }
.price-stop { color: #ff7070; }
.pick-upside { border-top: 1px solid var(--border); padding-top: 12px; }
.upside-pct { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 700; color: #50c878; }

/* Stock detail */
.detail-container { max-width: 100%; padding: 0 0 80px; }
.detail-hero { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.detail-ticker-block { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.detail-ticker { font-family: 'Fraunces', Georgia, serif; font-size: 36px; font-weight: 900; color: var(--text); }
.detail-signal { font-size: 11px; }
.detail-company { font-size: 15px; color: var(--text-muted); margin-bottom: 8px; }
.price-targets-card { display: flex; align-items: center; padding: 20px; gap: 16px; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
.pt-item { text-align: center; min-width: 80px; }
.pt-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.pt-value { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 900; color: var(--text); }
.pt-target .pt-value { color: #50c878; }
.pt-stop .pt-value { color: #ff7070; }
.pt-arrow { font-size: 20px; color: var(--text-muted); }
.upside-card { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-bottom: 1px solid var(--border); }
.upside-metric { padding: 20px 12px; text-align: center; border-right: 1px solid var(--border); }
.upside-metric:last-child { border-right: none; }
.metric-val { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.metric-val.positive { color: #50c878; }
.metric-val.negative { color: #ff7070; }
.metric-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.detail-section { padding: 20px 20px; border-bottom: 1px solid var(--border); }
.ai-section { background: var(--surface); }
.detail-body { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-top: 8px; }
.detail-actions { padding: 20px; }
.btn-add-position { background: var(--accent); color: #0c0c0e; border: none; border-radius: 12px; padding: 14px 24px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.btn-upgrade { display: block; text-align: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); text-decoration: none; padding: 14px; border-radius: 12px; font-size: 14px; }

/* Portfolio */
.portfolio-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; }
.page-title { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 700; }
.btn-add-positions { background: var(--accent); color: #0c0c0e; border: none; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Fraunces', Georgia, serif; font-size: 20px; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.positions-list { padding: 0 16px; }
.position-row { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.pos-ticker { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 900; color: var(--text); }
.pos-shares { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pos-metrics { display: flex; gap: 20px; flex-wrap: wrap; }
.pos-metric { display: flex; flex-direction: column; gap: 2px; }
.pos-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.pos-val { font-size: 14px; font-weight: 600; color: var(--text); }
.pos-val.positive { color: #50c878; }
.pos-val.negative { color: #ff7070; }
.pos-actions { display: flex; gap: 6px; }
.btn-icon { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; padding: 6px 8px; font-size: 14px; }
.btn-delete:hover { background: rgba(255, 80, 80, 0.2); border-color: rgba(255, 80, 80, 0.4); }

/* Account */
.account-info { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.account-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.account-row:last-child { border-bottom: none; }
.account-label { font-size: 13px; color: var(--text-muted); }
.account-val { font-size: 14px; font-weight: 500; color: var(--text); }
.tier-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px; color: #0c0c0e; text-transform: uppercase; letter-spacing: 0.05em; }
.tier-comparison { margin-bottom: 24px; }
.tier-feature { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text); }
.tier-feature.feature-locked { color: var(--text-muted); }
.feature-check { font-size: 14px; width: 20px; text-align: center; }
.account-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-secondary { display: block; text-align: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; padding: 12px; border-radius: 10px; font-size: 14px; }
.btn-logout { display: block; text-align: center; background: rgba(255, 80, 80, 0.1); border: 1px solid rgba(255, 80, 80, 0.3); color: #ff7070; text-decoration: none; padding: 12px; border-radius: 10px; font-size: 14px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: flex-end; justify-content: center; z-index: 100; padding: 20px; }
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: 20px 20px 0 0; padding: 28px 24px; width: 100%; max-width: 480px; }
.modal-content h3 { font-family: 'Fraunces', Georgia, serif; font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; color: var(--text); font-size: 15px; font-family: 'DM Sans', sans-serif; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-primary { flex: 1; background: var(--accent); color: #0c0c0e; border: none; border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.btn-secondary-modal { flex: 1; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 14px; cursor: pointer; font-family: 'DM Sans', sans-serif; }

/* Responsive: tablet/desktop */
@media (min-width: 768px) {
  .picks-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-header { padding: 16px 48px; }
  .picks-section, .portfolio-header, .detail-hero, .detail-section { padding-left: 48px; padding-right: 48px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); max-width: 500px; margin: 20px 48px; border-radius: 14px; border: 1px solid var(--border); background: transparent; gap: 1px; }
  .stat-card { border-radius: 12px; }
  .price-targets-card, .upside-card { margin: 0 48px; border-radius: 14px; border: 1px solid var(--border); }
  .modal { align-items: center; }
  .modal-content { border-radius: 20px; }
  .auth-container { max-width: 440px; }
}