* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0f1115;
  color: #e6e6e6;
  font-size: 15px;
  line-height: 1.5;
}
a { color: #6aa9ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Login */
.login-box {
  max-width: 320px;
  margin: 15vh auto;
  padding: 24px;
  background: #161a22;
  border-radius: 8px;
}
.login-box h1 { margin-bottom: 16px; font-weight: 500; }
.login-box input,
.login-box button {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border-radius: 4px;
  border: 1px solid #2a3040;
  background: #0f1115;
  color: #e6e6e6;
  margin-bottom: 10px;
}
.login-box button {
  background: #6aa9ff;
  color: #0f1115;
  font-weight: 500;
  cursor: pointer;
  border: none;
}
.login-box .error { color: #ff6a6a; margin-top: 8px; font-size: 13px; }

/* Dashboard */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: #161a22;
  border-bottom: 1px solid #2a3040;
}
.brand { font-weight: 600; letter-spacing: 0.5px; }
.logout {
  background: none;
  border: 1px solid #2a3040;
  color: #e6e6e6;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 49px);
}
.sidebar {
  background: #161a22;
  border-right: 1px solid #2a3040;
  overflow-y: auto;
  padding: 12px;
}
.sidebar h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
  margin-bottom: 8px;
  padding: 6px;
}
.sidebar ul { list-style: none; }
.sidebar li a {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  color: #e6e6e6;
  margin-bottom: 2px;
}
.sidebar li a:hover { background: #1f2430; text-decoration: none; }
.sidebar li a.active { background: #1f2430; outline: 1px solid #2a3040; }
.sidebar .status-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  background: #4a3a1a;
  color: #ffd9a4;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
}
.kind-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-right: 4px;
  vertical-align: middle;
}
.kind-video { background: #2a3550; color: #b9cdff; }
.kind-tweet { background: #1d3a3a; color: #9fe4d8; }
.sidebar .title { display: block; }
.sidebar .meta {
  display: block;
  font-size: 12px;
  opacity: 0.55;
  margin-top: 3px;
}
.content {
  padding: 28px 36px;
  overflow-y: auto;
}
.empty { opacity: 0.5; }

/* Report detail (phase 2) */
.report h1 { font-weight: 600; margin-bottom: 6px; }
.report .pub { opacity: 0.6; font-size: 13px; margin-bottom: 20px; }
.report .summary { margin: 16px 0 24px; padding: 14px 16px; background: #161a22; border-radius: 6px; }
.report .signals { margin: 16px 0; }
.report .signals li { margin-left: 18px; }
.report .severity {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-left: 8px;
  vertical-align: middle;
}
.severity-info { background: #2a3040; color: #b6c2d4; }
.severity-watch { background: #305a82; color: #cfe1f6; }
.severity-actionable { background: #8a5b1a; color: #ffd9a4; }
.severity-urgent { background: #82303a; color: #ffc4cc; }
.report .meta-line { font-size: 13px; opacity: 0.7; margin: 12px 0; }
.report .meta-line code { background: #2a3040; padding: 1px 6px; border-radius: 3px; font-size: 12px; }
.report .model { font-family: ui-monospace, monospace; font-size: 11px; opacity: 0.7; }
.report .summary.error { background: #3a1a20; color: #ffc4cc; }
.report h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; opacity: 0.6; margin: 18px 0 6px; }
.report .transcript {
  margin-top: 24px;
  padding: 14px 16px;
  background: #161a22;
  border-radius: 6px;
  font-size: 14px;
}
.report .transcript-body {
  max-height: 360px;
  overflow-y: auto;
  margin-top: 10px;
  line-height: 1.6;
  opacity: 0.9;
}
.report .transcript summary { cursor: pointer; opacity: 0.7; padding: 4px 0; }
.report .notes-box { margin-top: 28px; }
.report .notes-box label { display: block; font-size: 13px; opacity: 0.6; margin-bottom: 6px; }
.report .notes-box textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  background: #161a22;
  color: #e6e6e6;
  border: 1px solid #2a3040;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.report .notes-box .save-status {
  font-size: 12px;
  opacity: 0.55;
  margin-top: 4px;
  height: 14px;
}
.report .chart-wrapper {
  margin-top: 12px;
  height: 320px;
  background: #161a22;
  border-radius: 6px;
  overflow: hidden;
}

/* Generic block (market overview + chart wrapper section) */
.report .block { margin: 22px 0 14px; }
.report .block .block-thesis { margin-bottom: 8px; line-height: 1.55; }
.report .bullets { margin-left: 20px; }
.report .bullets li { margin-bottom: 3px; line-height: 1.45; }

/* Asset cards */
.assets { display: grid; gap: 10px; margin: 22px 0 24px; }
.asset-card {
  background: #161a22;
  border: 1px solid #2a3040;
  border-radius: 6px;
  overflow: hidden;
}
.asset-card[open] { border-color: #364158; }
.asset-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.asset-card > summary::-webkit-details-marker { display: none; }
.asset-symbol {
  font-weight: 700;
  font-family: ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 0.5px;
  min-width: 56px;
}
.asset-stance, .asset-bias, .asset-tf {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 99px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.asset-stance-bullish { background: #1c4a2a; color: #9be3b1; }
.asset-stance-bearish { background: #4a1c1c; color: #ffb0b0; }
.asset-stance-neutral { background: #2a3040; color: #c5c9d4; }
.asset-bias-up      { background: #1c4a2a; color: #9be3b1; }
.asset-bias-down    { background: #4a1c1c; color: #ffb0b0; }
.asset-bias-range   { background: #3d3a1a; color: #ddc880; }
.asset-bias-neutral { background: #2a3040; color: #c5c9d4; }
.asset-tf { background: #20283a; color: #aab4cc; }
.asset-body { padding: 4px 14px 14px; }
.asset-thesis { margin: 6px 0 10px; line-height: 1.55; opacity: 0.95; }

.levels {
  margin: 10px 0;
  border-collapse: collapse;
  font-size: 13px;
  font-family: ui-monospace, monospace;
}
.levels th {
  text-align: left;
  padding: 4px 14px 4px 0;
  font-weight: 500;
  opacity: 0.6;
  width: 100px;
}
.levels td { padding: 4px 0; }
