* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

main { width: min(480px, 96vw); }

.account-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  font-size: 0.85rem;
}
.account-strip > div { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.account-strip .value {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: center;
}

.symbol-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.symbol-row select,
.symbol-row input,
.symbol-row button {
  background: #0d1117;
  color: #e6edf3;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
}
.symbol-row select { flex: 1; min-width: 0; }
.symbol-row input { flex: 1; min-width: 0; }
.symbol-row button { cursor: pointer; }
.symbol-row button:hover { background: #1c2128; }
#add-preset { background: #1f6feb; border-color: #1f6feb; color: white; }
#add-preset:hover { background: #1158c7; }
#manage-toggle { padding: 0.35rem 0.55rem; }

.manage-panel {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.5rem;
  margin-bottom: 1rem;
  text-align: left;
  font-size: 0.85rem;
  max-height: 180px;
  overflow-y: auto;
}
.manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
}
.manage-row + .manage-row { border-top: 1px solid #21262d; }
.manage-row button {
  background: transparent;
  color: #f85149;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.manage-row button:hover { background: rgba(248, 81, 73, 0.12); }

.symbol-label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.big-price {
  font-size: 3.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.25rem;
  transition: color 0.4s ease;
  color: #e6edf3;
}
.big-price.up { color: #3fb950; }
.big-price.down { color: #f85149; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid #30363d;
  border-bottom: 1px solid #30363d;
}
.grid > div { display: flex; flex-direction: column; gap: 0.25rem; }
.label {
  font-size: 0.7rem;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.value {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.meta {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.sep { opacity: 0.4; }

.status {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.status.ok   { background: rgba(63, 185, 80, 0.15); color: #3fb950; }
.status.warn { background: rgba(210, 153, 34, 0.18); color: #d29922; }
.status.err  { background: rgba(248, 81, 73, 0.15); color: #f85149; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #161b22;
  border: 1px solid #30363d;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  max-width: 90vw;
}
.toast.warn { color: #d29922; border-color: rgba(210, 153, 34, 0.4); }
.toast.err  { color: #f85149; border-color: rgba(248, 81, 73, 0.4); }
.toast.ok   { color: #3fb950; border-color: rgba(63, 185, 80, 0.4); }

.footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.72rem;
  opacity: 0.4;
}
