/* stockwatch — custom styles (mobile-first, dark) */
:root {
  --sw-accent: #17614e;
}

.sw-body {
  background: #151515;
  color: #e8e8e8;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 720px;
  margin: 0 auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #2a2a2a;
  position: sticky;
  top: 0;
  background: #151515;
  z-index: 20;
}

.app-title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

.app-main {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 84px;
}

.page { display: none; }
.page.active { display: block; }

/* bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;
  display: flex;
  background: #1b1b1b;
  border-top: 1px solid #2a2a2a;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 30;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  background: none;
  border: none;
  color: #9aa0a6;
  font-size: 0.68rem;
}

.nav-item.active {
  color: #4cd6a8;
}

/* card compact per mobile */
.card { border-color: #2a2a2a; }
.card-header { background: #1d1d1d; font-weight: 600; }
.list-group-item { background: #1a1a1a; border-color: #2a2a2a; }

.sym-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px 12px;
}

.sym-head { display: flex; justify-content: space-between; align-items: center; }
.sym-name { font-weight: 700; }
.sym-sym { color: #9aa0a6; font-size: 0.8rem; }
.sym-price { font-size: 1.15rem; font-weight: 700; }
.sym-change-up { color: #4cd6a8; }
.sym-change-down { color: #ff6b6b; }
.sym-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 0.75rem; }

.badge-signal-buy { background: #17614e; color: #fff; }
.badge-signal-sell { background: #7a2f2f; color: #fff; }
.badge-signal-hold { background: #3d3d3d; color: #ccc; }
.badge-signal-na { background: #55524d; color: #e8e6e3; }

.conf-bar {
  height: 6px;
  border-radius: 3px;
  background: #2a2a2a;
  overflow: hidden;
}
.conf-fill { height: 100%; border-radius: 3px; }

.toast-msg {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #eee;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
  max-width: 90vw;
}

.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.news-item { border-bottom: 1px solid #262626; padding: 8px 0; }
.news-item a { color: #d0d0d0; text-decoration: none; }
.news-item .src { color: #9aa0a6; font-size: 0.7rem; }

/* Chart.js responsive richiede altezza esplicita sul canvas/container */
#price-chart {
  display: block;
  height: 180px !important;
  width: 100% !important;
}

details.card summary { cursor: pointer; list-style: none; }
details.card summary::before { content: "+ "; }
details[open].card summary::before { content: "- "; }
