/* ── Foreclosure Decoded — Dashboard (My Hub) ──────────────────────────────
   Companion to styles.css. All vars, resets, and global typography live
   in styles.css — this file contains only dashboard-specific rules.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Action / Tab Bar ──────────────────────────────────────────────────────── */
.hub-action-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}
.hub-action-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: 1rem;
}
@media (max-width: 1024px) { .hub-action-inner { padding: 0 24px; } }
@media (max-width: 640px)  { .hub-action-inner { padding: 0 16px; } }
@media (max-width: 480px)  {
  .hub-action-inner {
    flex-wrap: wrap;
    padding: 0.45rem 16px 0.4rem;
    min-height: auto;
    gap: 0.25rem;
  }
  .hub-action-label { font-size: 0.75rem; }
  .hub-pills { width: 100%; padding: 0.2rem 0 0.1rem; }
}

.hub-action-label {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.hub-pills {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-behavior: smooth;
  padding-right: 16px; /* keeps last pill from being clipped on mobile */
}
.hub-pills::-webkit-scrollbar { display: none; }

.hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--surface-alt);
  color: var(--text-muted);
  transition: all 0.12s;
  line-height: 1;
}
.hub-pill:hover  { border-color: var(--teal); color: var(--teal); background: rgba(31,122,114,.06); }
.hub-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Page Layout ──────────────────────────────────────────────────────────── */
.hub-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 32px 4rem;
}
@media (max-width: 1024px) { .hub-page { padding: 1.25rem 24px 3rem; } }
@media (max-width: 640px)  { .hub-page { padding: 1rem 16px 2.5rem; } }

.hub-columns {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 960px) { .hub-columns { grid-template-columns: 1fr; } }

.hub-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }

/* ── Milestone Train ──────────────────────────────────────────────────────── */
.milestone-train {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 20px 18px;
  display: flex;
  justify-content: space-between;
  position: relative;
  background: #fff;
  box-shadow: var(--shadow);
}
.train-line {
  position: absolute;
  top: 30px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.train-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 2;
}
.train-node {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px var(--border);
  margin-bottom: 8px;
  transition: background .2s, transform .2s;
}
.train-step.completed .train-node { background: var(--teal); box-shadow: 0 0 0 1.5px var(--teal); }
.train-step.active    .train-node { background: var(--amber); box-shadow: 0 0 0 1.5px var(--amber); transform: scale(1.2); }
.train-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}
.train-step.completed .train-label { color: var(--teal); }
.train-step.active    .train-label { color: var(--navy); font-weight: 800; }

/* ── Hub Panels ───────────────────────────────────────────────────────────── */
.hub-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hub-panel-title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Gray section header — matches sidebar .ls-card-head style */
.hub-panel-head {
  margin: -1.35rem -1.5rem 1.25rem;
  padding: 0.55rem 1.5rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  font-family: 'Inter', system-ui, sans-serif;
}
.hub-phase-chip {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
}
.hub-phase-chip.amber { background: rgba(184,134,11,.12); color: #7a6008; }
.hub-phase-chip.teal  { background: rgba(31,122,114,.12); color: var(--teal); }
.hub-phase-chip.navy  { background: rgba(30,43,74,.1);   color: var(--navy); }

/* ── Case Meta Strip ──────────────────────────────────────────────────────── */
.case-meta-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.1rem;
}
@media (max-width: 480px) { .case-meta-strip { grid-template-columns: 1fr; gap: 0.75rem; } }
.meta-item label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.meta-item span { font-size: 0.85rem; font-weight: 700; color: var(--navy); }

/* ── Action Alert Box ─────────────────────────────────────────────────────── */
.action-alert {
  background: var(--surface-alt);
  border-left: 3px solid var(--amber);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.1rem;
}
.action-alert.teal { border-left-color: var(--teal); }
.action-alert h4 { margin: 0 0 4px; font-size: 0.82rem; font-weight: 700; color: var(--navy); font-family: 'Poppins', system-ui, sans-serif; }
.action-alert p  { margin: 0; font-size: 0.77rem; color: var(--text); line-height: 1.55; }

/* ── Progress Track ───────────────────────────────────────────────────────── */
.progress-track { background: var(--border); height: 5px; border-radius: 3px; margin: 1.25rem 0 5px; }
.progress-fill  { background: var(--navy); height: 100%; border-radius: 3px; transition: width .4s; }
.progress-fill.teal { background: var(--teal); }
.progress-track-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* ── Panel Action Row ─────────────────────────────────────────────────────── */
.panel-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; flex-wrap: wrap; }
.panel-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--teal); color: #fff;
  padding: 0.45rem 0.9rem; border-radius: 6px;
  font-size: 0.78rem; font-weight: 700;
  border: none; cursor: pointer; text-decoration: none;
  transition: opacity .15s; white-space: nowrap; font-family: 'Inter', system-ui, sans-serif;
}
.panel-btn:hover { opacity: .85; color: #fff; text-decoration: none; }
.panel-btn.navy { background: var(--navy); }
.panel-link {
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  text-decoration: none; cursor: pointer; background: none; border: none;
}
.panel-link:hover { color: var(--navy); text-decoration: underline; }

/* ── Upgrade callout (free users only, shown via JS) ─────────────────────── */
.hub-upgrade-callout {
  display: none;
  background: linear-gradient(135deg, #1f2b47 0%, #1a3a36 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 20px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(30,43,74,.18);
}
.hub-upgrade-callout.visible { display: flex; }

.hub-upgrade-callout-eyebrow {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 5px;
}
.hub-upgrade-callout-copy h4 {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Poppins', system-ui, sans-serif;
  line-height: 1.25;
}
.hub-upgrade-callout-copy p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,.62);
  line-height: 1.55;
  max-width: 480px;
}
.hub-upgrade-callout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  color: var(--navy);
  padding: 0.5rem 1.1rem;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .15s;
  font-family: 'Inter', system-ui, sans-serif;
}
.hub-upgrade-callout-btn:hover { opacity: .88; color: var(--navy); text-decoration: none; }

/* ── Workspace view routing ───────────────────────────────────────────────── */
.workspace-view { display: none; }
.workspace-view.active-view { display: flex; flex-direction: column; gap: 1.25rem; animation: hubFadeIn .15s ease; }
@keyframes hubFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Document Vault ───────────────────────────────────────────────────────── */
.vault-section-label {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 8px;
}
.vault-row {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--border); padding: 10px 14px; border-radius: 8px; margin-bottom: 8px;
  gap: 0.75rem;
}
.vault-file-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vault-file-name { font-size: 0.82rem; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-file-meta { font-size: 0.72rem; color: var(--text-muted); }
.vault-empty { font-size: 0.82rem; color: var(--text-muted); padding: 1rem 0; }

/* ── Court Docket ─────────────────────────────────────────────────────────── */
.docket-feed {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
  border-left: 2px solid var(--border);
  margin-left: 4px;
  padding-left: 20px;
}
.docket-feed::-webkit-scrollbar { width: 6px; }
.docket-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.docket-entry { position: relative; margin-bottom: 22px; }
.docket-entry::before {
  content: ''; position: absolute; left: -26px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-light); border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.docket-entry.active::before { background: var(--amber); }
.docket-date  { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.docket-title { font-size: 0.86rem; font-weight: 700; color: var(--navy); margin: 3px 0; font-family: 'Poppins', system-ui, sans-serif; }
.docket-desc  { font-size: 0.77rem; color: var(--text); line-height: 1.5; }

/* ── Lender Logs ──────────────────────────────────────────────────────────── */
.log-grid { display: grid; grid-template-columns: 4.5fr 5.5fr; gap: 1.5rem; margin-top: 0.25rem; }
@media (max-width: 640px) { .log-grid { grid-template-columns: 1fr; } }
.log-input-pane { display: flex; flex-direction: column; gap: 10px; padding-right: 1.5rem; border-right: 1px solid var(--border); }
@media (max-width: 640px) { .log-input-pane { border-right: none; padding-right: 0; } }
.log-field label {
  display: block; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px;
}
.log-field input,
.log-field textarea {
  width: 100%; box-sizing: border-box; padding: 7px 11px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.8rem; background: var(--surface-alt); font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
}
.log-field textarea { height: 72px; resize: none; }
.log-history { max-height: 320px; overflow-y: auto; padding-right: 8px; }
.log-history::-webkit-scrollbar { width: 6px; }
.log-history::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.log-entry {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; background: var(--surface-alt); margin-bottom: 8px;
}
.log-entry-meta { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.log-entry p { margin: 0; font-size: 0.77rem; line-height: 1.5; color: var(--text); }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.hub-sidebar { display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 68px; }
@media (max-width: 960px) { .hub-sidebar { position: static; } }

.ls-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ls-card-head {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1rem;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}
.ls-card-body { padding: 0.35rem 0.5rem; }

.sidebar-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.42rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background .12s;
}
.sidebar-tool-row:hover { background: var(--surface-alt); color: var(--navy); text-decoration: none; }
.sidebar-tool-row.locked { opacity: .4; pointer-events: none; }
.sidebar-tool-left { display: flex; align-items: center; gap: 9px; }

.micro-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.micro-avatar.gold { background: rgba(184,134,11,.1); color: #7a6008; border-color: rgba(184,134,11,.3); }

.acct-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--surface-alt);
}
.acct-data-row:last-child { border-bottom: none; }
.acct-data-row label { color: var(--text-muted); font-weight: 500; }
.acct-data-row span  { font-weight: 700; color: var(--navy); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .milestone-train { flex-wrap: wrap; gap: 12px; justify-content: center; }
  .train-line { display: none; }
  .train-step { flex: 0 0 auto; min-width: 60px; }
}
