/* =============================================================================
 * Hoosier Weather — Dashboard page
 * Palette / card / nav / footer styling matches css/alerts.css so this page
 * drops into the live site without visual seams:
 *   ground        #212529      accent    #5bc8f5 (sky blue)
 *   panel header  navy gradient 135deg    body copy rgba(220,235,248,.88)
 *   card shell    4px accent left border + hairline sky-blue box
 * ========================================================================== */

:root {
  --hw-bg:          #212529;
  --hw-text:        #dee2e6;
  --hw-accent:      #5bc8f5;
  --hw-border:      rgba(91, 200, 245, 0.2);
  --hw-panel-grad:  linear-gradient(135deg, rgba(14, 34, 64, 0.95) 0%, rgba(20, 55, 100, 0.85) 100%);
  --hw-panel-body:  rgba(6, 14, 30, 0.7);
  --hw-inset:       rgba(10, 20, 40, 0.6);
  --hw-body-dim:    rgba(220, 235, 248, 0.88);
  --hw-muted:       rgba(255, 255, 255, 0.5);
}

body {
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--hw-bg);
  color: var(--hw-text);
  margin-bottom: 60px;
}

/* ---- nav (mirrors css/alerts.css) -------------------------------------- */
.navbar {
  background: var(--hw-panel-grad) !important;
  border-bottom: 1px solid var(--hw-border);
}
.navbar .navbar-brand {
  color: var(--hw-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hw-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: coral;
  display: inline-block;
}
.navbar .nav-link {
  color: rgba(220, 235, 248, 0.75) !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--hw-accent) !important;
}
.navbar-toggler { border-color: rgba(91, 200, 245, 0.4); }
.navbar-toggler-icon { filter: invert(70%) sepia(60%) saturate(400%) hue-rotate(170deg); }

/* ---- page head ------------------------------------------------------- */
.top-buffer { margin-top: 28px; }

.hw-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.hw-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hw-accent);
}
.hw-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2px 0 0;
  color: var(--hw-text);
}
.hw-page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hw-session-slot {
  font-size: 0.72rem;
  color: var(--hw-muted);
  letter-spacing: 0.04em;
}

/* ---- buttons (accent-filled, matches site's primary action) ---------- */
.btn-hw {
  background: var(--hw-accent);
  border: 1px solid var(--hw-accent);
  color: #062033;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 6px;
}
.btn-hw:hover,
.btn-hw:focus {
  background: #7bd6f7;
  border-color: #7bd6f7;
  color: #062033;
}

/* ---- card shell (mirrors css/alerts.css .hw-card) -------------------- */
.hw-card {
  border: none;
  border-left: 4px solid var(--hw-accent);
  border-right: 1px solid var(--hw-border);
  border-top: 1px solid var(--hw-border);
  border-bottom: 1px solid var(--hw-border);
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
}
.hw-card-header {
  background: var(--hw-panel-grad);
  border-bottom: 1px solid var(--hw-border);
  color: var(--hw-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 14px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hw-card-body {
  background: var(--hw-panel-body);
  padding: 12px 16px 14px;
  color: var(--hw-body-dim);
}

/* ---- dashboard grid ------------------------------------------------- */
/* Plain responsive grid. Widget state carries {w,h}; buildCard() maps w -> a
 * column span (1–3). A drag/resize engine can replace this later without
 * touching the widget data model. */
.hw-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 20px;
}
.hw-widget { grid-column: span 1; min-width: 0; }

@media (max-width: 720px) {
  .hw-widget { grid-column: 1 / -1 !important; }
}

/* ---- widget chrome ------------------------------------------------ */
.hw-widget-card { height: 100%; }
.hw-widget-card .hw-card-header { justify-content: space-between; }

.hw-widget-drag {
  color: var(--hw-muted);
  cursor: grab;
  font-size: 0.9rem;
  line-height: 1;
  user-select: none;
}
.hw-widget-title {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hw-widget-remove {
  background: none;
  border: none;
  color: var(--hw-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.hw-widget-remove:hover { color: #ff5a5a; }

.hw-widget-body { min-height: 120px; }

.hw-widget-placeholder,
.hw-widget-error {
  font-size: 0.8rem;
  color: var(--hw-muted);
  line-height: 1.5;
}
.hw-widget-error { color: #ffb0b0; }

.hw-widget-status {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hw-muted);
  margin-top: 8px;
}

/* ---- empty state ------------------------------------------------ */
.hw-empty-state {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}
.hw-empty-state-inner {
  max-width: 460px;
  text-align: center;
  border: 1px dashed var(--hw-border);
  border-radius: 10px;
  padding: 40px 28px;
  background: var(--hw-panel-body);
}
.hw-empty-icon {
  font-size: 2rem;
  color: var(--hw-accent);
  opacity: 0.7;
}
.hw-empty-state h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 12px 0 6px;
  color: var(--hw-text);
}
.hw-empty-state p {
  font-size: 0.82rem;
  color: var(--hw-body-dim);
  line-height: 1.6;
  margin-bottom: 18px;
}
.hw-empty-note {
  font-size: 0.72rem !important;
  color: var(--hw-muted) !important;
  margin: 18px 0 0 !important;
}

/* ---- widget picker modal -------------------------------------- */
.hw-modal {
  background: var(--hw-bg);
  border: 1px solid var(--hw-border);
  border-left: 4px solid var(--hw-accent);
}
.hw-modal .modal-header {
  background: var(--hw-panel-grad);
  border-bottom: 1px solid var(--hw-border);
}
.hw-modal .modal-title {
  color: var(--hw-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hw-modal .btn-close { filter: invert(80%) sepia(40%) saturate(500%) hue-rotate(170deg); }

.hw-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.hw-picker-card {
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--hw-inset);
  text-align: left;
  cursor: pointer;
  color: var(--hw-text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.hw-picker-card:hover {
  border-color: var(--hw-accent);
  background: rgba(91, 200, 245, 0.1);
}
.hw-picker-card .name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hw-text);
}
.hw-picker-card .desc {
  font-size: 0.74rem;
  color: var(--hw-muted);
  line-height: 1.45;
  margin-top: 4px;
}
.hw-picker-empty {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--hw-muted);
  line-height: 1.6;
  text-align: center;
  padding: 20px;
}

/* ---- footer (mirrors live site) ------------------------------ */
.hw-footer {
  border-top: 1px solid var(--hw-border);
  padding: 16px 0;
  margin-top: 32px;
  font-size: 0.78rem;
  color: var(--hw-muted);
}
