/* Capital Pulse — Client Portal shared styles.
   Used by static/portal-*.html. Palette/type matches the main site. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --deep: #0d1719;
  --surface: #15282b;
  --surface-hi: #1c3336;
  --teal: #5db6bf;
  --teal-dim: rgba(93, 182, 191, 0.18);
  --teal-dim-2: rgba(93, 182, 191, 0.32);
  --white: #f5f7f7;
  --muted: #8fa6a9;
  --danger: #e0645a;
  --success: #5db65d;
  --gold: #d4a24c;
  --gold-dim: rgba(212, 162, 76, 0.18);
}

html, body { height: 100%; }

body {
  background: var(--deep);
  min-height: 100vh;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; }

/* ---------- Shell / nav (dashboard and future portal pages) ---------- */
.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 40px;
  border-bottom: 1px solid var(--teal-dim);
}
.shell-header .brand { display: flex; align-items: center; gap: 14px; }
.shell-header .brand img { height: 30px; }
.shell-header .brand-divider { width: 1px; height: 26px; background: var(--teal-dim-2); }
.shell-header .brand-text .org { font-family: 'DM Serif Display', Georgia, serif; font-size: 1.05rem; line-height: 1.1; }
.shell-header .brand-text .email { font-size: 0.74rem; color: var(--muted); }

.shell-nav { display: flex; align-items: center; gap: 6px; }
.shell-nav a {
  text-decoration: none; color: var(--muted); font-size: 0.85rem; font-weight: 500;
  padding: 9px 16px; border-radius: 8px; transition: color 0.15s, background 0.15s;
}
.shell-nav a:hover { color: var(--white); background: var(--surface-hi); }
.shell-nav a.active { color: var(--teal); background: var(--teal-dim); }
.shell-nav .soon {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted); opacity: 0.6;
  font-size: 0.85rem; font-weight: 500; padding: 9px 16px; cursor: default;
}
.shell-nav .soon .soon-tag {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(212,162,76,0.4); border-radius: 20px; padding: 1px 7px;
}

.shell-actions { display: flex; align-items: center; gap: 14px; }
.logout-link {
  color: var(--muted); font-size: 0.8rem; text-decoration: none; border: 1px solid var(--teal-dim);
  padding: 9px 16px; border-radius: 8px; transition: color 0.2s, border-color 0.2s; white-space: nowrap;
}
.logout-link:hover { color: var(--teal); border-color: var(--teal); }

.shell-main { max-width: 1000px; margin: 0 auto; padding: 36px 40px 80px; }

/* ---------- EKG pulse bar (signature motif) ---------- */
.pulse-bar { width: 100%; height: 40px; display: block; overflow: visible; }
.pulse-bar path { fill: none; stroke: url(#pulseGrad); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pulse-trace { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw-pulse 2.6s ease-out forwards; }
@keyframes draw-pulse { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse-trace { animation: none; stroke-dashoffset: 0; } }

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--teal-dim); border-radius: 16px;
  padding: 30px 32px; margin-bottom: 24px;
}
.panel h2 { font-size: 1.15rem; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.panel-head h2 { margin-bottom: 0; }

/* ---------- Forms / buttons ---------- */
label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
label .label-optional { text-transform: none; font-weight: 400; opacity: 0.75; }
.field { margin-bottom: 18px; }
.field-hint { font-size: 0.74rem; color: var(--muted); margin-top: 6px; line-height: 1.5; }
input[type=text], input[type=email], input[type=password], input[type=number] {
  width: 100%; padding: 12px 14px; background: var(--deep); border: 1px solid var(--teal-dim);
  border-radius: 8px; color: var(--white); font-family: 'Poppins', sans-serif; font-size: 0.9rem;
}
input:focus { outline: none; border-color: var(--teal); }
input[type=file] {
  flex: 1; min-width: 220px; color: var(--muted); font-size: 0.85rem;
  background: var(--deep); border: 1px solid var(--teal-dim); border-radius: 8px; padding: 10px 12px;
}

.btn-primary {
  padding: 12px 22px; background: var(--teal); color: var(--deep); font-weight: 600;
  font-size: 0.87rem; border: none; border-radius: 8px; cursor: pointer; transition: filter 0.15s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  padding: 12px 22px; background: transparent; color: var(--teal); font-weight: 600;
  font-size: 0.87rem; border: 1px solid var(--teal-dim-2); border-radius: 8px; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--teal); }
.btn-block { width: 100%; }

.upload-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Banners ---------- */
.banner {
  border-radius: 8px; padding: 12px 14px; font-size: 0.82rem; margin-bottom: 22px; text-align: left;
}
.banner.error { background: rgba(224,100,90,0.12); border: 1px solid rgba(224,100,90,0.4); color: var(--danger); }
.banner.success { background: rgba(93,182,93,0.12); border: 1px solid rgba(93,182,93,0.4); color: var(--success); }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; font-size: 0.85rem; border-bottom: 1px solid var(--teal-dim); }
th { color: var(--muted); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
td.filename { color: var(--white); word-break: break-all; }
td.muted { color: var(--muted); white-space: nowrap; }
a.download-link { color: var(--teal); text-decoration: none; font-weight: 600; }
a.download-link:hover { text-decoration: underline; }
.empty-state { color: var(--muted); font-size: 0.85rem; padding: 8px 0; }

/* ---------- Provider info (NPI lookup) ---------- */
.panel h2 .muted-tag {
  font-family: 'Poppins', sans-serif; font-size: 0.7rem; font-weight: 600; color: var(--muted);
  background: var(--surface-hi); border-radius: 20px; padding: 3px 10px; margin-left: 10px; vertical-align: middle;
}
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px 24px; }
.info-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.info-value { font-size: 0.92rem; line-height: 1.5; }

/* ---------- Roadmap / coming-soon teaser ---------- */
.roadmap-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(212,162,76,0.14), rgba(93,182,191,0.06));
  border: 1px solid rgba(212,162,76,0.35); border-radius: 16px; padding: 22px 28px; margin-bottom: 24px;
}
.roadmap-banner .copy p:first-child { font-weight: 600; margin-bottom: 4px; }
.roadmap-banner .copy p:last-child { color: var(--muted); font-size: 0.85rem; }
.roadmap-banner .soon-tag {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(212,162,76,0.4); border-radius: 20px; padding: 4px 12px;
  white-space: nowrap;
}

/* ---------- Auth cards (login/register/check-email) ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.auth-wrap { width: 90%; max-width: 440px; }
.auth-card {
  background: var(--surface); border: 1px solid var(--teal-dim); border-radius: 16px;
  padding: 44px 40px; box-shadow: 0 24px 64px rgba(0,0,0,0.5); position: relative; overflow: hidden; text-align: center;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent); opacity: 0.6;
}
.auth-card form { text-align: left; }
.auth-logo { margin-bottom: 24px; }
.auth-logo img { height: 40px; }
.auth-title { font-size: 1.5rem; margin-bottom: 6px; }
.auth-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 26px; line-height: 1.6; }
.auth-sub strong { color: var(--teal); font-weight: 600; }
.footer-note { margin-top: 22px; font-size: 0.8rem; color: var(--muted); text-align: center; }
.footer-note a { color: var(--teal); text-decoration: none; }
.footer-note a:hover { text-decoration: underline; }
.auth-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--teal-dim);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-size: 1.6rem;
}
