.ha-card {
  overflow: hidden;
}
.ha-card .card-header {
  background: linear-gradient(135deg, #14532d 0%, #15803d 55%, #166534 100%) !important;
}
.ha-search-wrap {
  position: relative;
  margin-bottom: 0.55rem;
}
.ha-search-wrap i {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 0.85rem;
}
.ha-search-wrap input {
  width: 100%;
  border: 1px solid #d1fae5;
  border-radius: 8px;
  padding: 0.4rem 0.7rem 0.4rem 2rem;
  font-size: 0.85rem;
}
.ha-search-wrap input:focus {
  outline: none;
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}
.ha-browse-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.45rem;
}
.ha-login {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.6rem;
}
.ha-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.65rem;
}
.ha-back {
  border: 0;
  background: #ecfdf5;
  color: #166534;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
}
.ha-crumb {
  font-weight: 700;
  color: #14532d;
  font-size: 0.85rem;
}
.ha-months,
.ha-dates {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.ha-month,
.ha-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid #d1fae5;
  background: #fff;
  border-radius: 8px;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
  gap: 0.5rem;
}
.ha-month:hover,
.ha-date:hover {
  background: #f0fdf4;
}
.ha-date-note {
  cursor: default;
  flex-direction: column;
  align-items: flex-start;
  background: #fffbeb;
  border-color: #fde68a;
  gap: 0.12rem;
}
.ha-date-note:hover {
  background: #fffbeb;
}
.ha-date-note .ha-date-sub {
  white-space: normal;
  color: #92400e;
  font-weight: 600;
}
.ha-month-main,
.ha-date-main {
  font-weight: 700;
  color: #14532d;
  font-size: 0.84rem;
  line-height: 1.2;
}
.ha-month-count,
.ha-date-sub {
  color: #6b7280;
  font-size: 0.72rem;
  white-space: nowrap;
}
.ha-date-group {
  margin-top: 0.45rem;
}
.ha-date-group:first-child {
  margin-top: 0;
}
.ha-date-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #166534;
  padding: 0.15rem 0.15rem 0.25rem;
}
.ha-status {
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.8rem;
}
.ha-sheet .table-responsive {
  overflow: visible;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  font-weight: bold;
}
.ha-sheet .table-bordered {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
  border: 1px solid #dee2e6;
}
.ha-sheet .table-bordered td {
  border: 1px solid #dee2e6;
  padding: 6px 3px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.ha-sheet td.ha-disclaimer,
.ha-sheet td.ha-disclaimer h6 {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  padding: 8px 10px;
}
.ha-sheet .first-column {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  white-space: normal;
  word-wrap: break-word;
}
.ha-sheet .data-column {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}
.ha-sheet .data-column.ha-stack {
  white-space: normal;
  line-height: 1.25;
  vertical-align: middle;
}
.ha-sheet .ha-level-row .first-column {
  background: #fff;
}
.ha-sheet .header-row {
  height: 60px;
  vertical-align: middle;
  line-height: 1.2;
  white-space: normal;
}
.ha-sheet img {
  width: 20px;
  height: 20px;
}
.ha-preview {
  position: relative;
  margin: 0;
  padding: 0;
  line-height: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ha-preview canvas,
.ha-preview img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.ha-preview-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  cursor: default;
}

/* NT-style Areas chart under historic day sheet */
.ha-nt-chart-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}
.ha-nt-chart-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.7rem 1rem;
  background: #111827;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}
.ha-nt-market-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ha-nt-market-select strong {
  font-size: 0.82rem;
  color: #94a3b8;
}
.ha-nt-market-select select {
  background: #1f2937;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  font-weight: 700;
  font-size: 0.82rem;
  min-width: 12rem;
}
.ha-nt-market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: min(100%, 52rem);
}
.ha-nt-chart-wrap .sa-nt-market-tab {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #1f2937;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.32rem 0.65rem;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  line-height: 1.1;
}
.ha-nt-chart-wrap .sa-nt-market-tab small {
  font-weight: 600;
  font-size: 0.68rem;
  color: #94a3b8;
}
.ha-nt-chart-wrap .sa-nt-market-tab:hover {
  border-color: rgba(96, 165, 250, 0.7);
  color: #fff;
}
.ha-nt-chart-wrap .sa-nt-market-tab.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #fff;
}
.ha-nt-chart-wrap .sa-nt-market-tab.active small {
  color: rgba(255, 255, 255, 0.85);
}
.ha-nt-chart-status {
  font-size: 0.8rem;
  color: #94a3b8;
}
.ha-nt-chart-wrap .sa-nt-preview {
  position: relative;
  background: #1f2937;
  overflow: hidden;
}
.ha-nt-chart-wrap .sa-nt-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  padding: 0.85rem 1rem 0.55rem;
  color: #e2e8f0;
  font-size: 0.84rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.55);
}
@media (min-width: 768px) {
  .ha-nt-chart-wrap .sa-nt-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ha-nt-chart-wrap .sa-nt-top span { color: #94a3b8; }
.ha-nt-chart-wrap .sa-nt-top strong { color: #fff; font-weight: 700; }
.ha-nt-chart-wrap .sa-nt-canvas-wrap {
  position: relative;
  width: 100%;
  background: #2b3440;
}
.ha-nt-chart-wrap .sa-nt-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}
.ha-nt-chart-caption {
  padding: 0.65rem 0.85rem 0.8rem;
  font-size: 0.8rem;
  color: #94a3b8;
  background: #0f172a;
}
