/* ==========================================================================
   Helpiz client portal
   Tokens mirror the marketing theme (design 4a) so the two feel like one
   product, but this file is standalone — the theme is never loaded here.
   ========================================================================== */

:root {
  --hzp-page: #f5f7fa;
  --hzp-surface: #fff;
  --hzp-ink: #0f172a;
  --hzp-body: #475569;
  --hzp-muted: #64748b;
  --hzp-faint: #94a3b8;
  --hzp-line: #dfe4ec;
  --hzp-line-soft: #e5e9f0;

  --hzp-blue: #1e7ae0;
  --hzp-blue-grad: linear-gradient(135deg, #0aa5ff 0%, #1e7ae0 55%, #1e5fd8 100%);
  --hzp-blue-tint: #e4effc;
  --hzp-orange-grad: linear-gradient(135deg, #ffb020 0%, #ff7a1a 55%, #ff4e1a 100%);

  --hzp-r: 14px;
  --hzp-r-lg: 20px;
  --hzp-pill: 999px;
  --hzp-shadow: 0 12px 40px rgba(15, 23, 42, .05);
}

* { box-sizing: border-box; }

body.hzp {
  margin: 0;
  background: var(--hzp-page);
  color: var(--hzp-ink);
  font: 16px/1.6 'Public Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }

.hzp-h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
.hzp-h2 { font-size: 1.2rem; }

.hzp-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hzp-faint);
  margin-bottom: 6px;
}

.hzp-muted { color: var(--hzp-muted); font-size: 15px; }
.hzp-link { color: var(--hzp-blue); text-decoration: none; font-weight: 600; }
.hzp-crumb { margin-bottom: 12px; font-size: 15px; }
.hzp-crumb a { color: var(--hzp-muted); text-decoration: none; }

/* -------------------------------------------------------------- chrome --- */

.hzp-top {
  background: var(--hzp-surface);
  border-bottom: 1px solid var(--hzp-line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hzp-top__inner {
  max-width: 960px;
  margin-inline: auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.hzp-logo { font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -.02em; }

.hzp-nav { display: flex; gap: 4px; margin-left: auto; }

.hzp-nav a {
  padding: 8px 14px;
  border-radius: var(--hzp-pill);
  text-decoration: none;
  font-weight: 500;
  color: var(--hzp-body);
}

.hzp-nav a:hover { background: var(--hzp-page); }
.hzp-nav a[aria-current] { background: var(--hzp-blue-tint); color: var(--hzp-blue); font-weight: 600; }

.hzp-top__out { font-size: 15px; color: var(--hzp-muted); text-decoration: none; }
.hzp-top__out:hover { color: var(--hzp-ink); }

.hzp-main { flex: 1; }

.hzp--auth .hzp-main { display: grid; place-items: center; padding: 24px; }

.hzp-foot {
  max-width: 960px;
  margin-inline: auto;
  width: 100%;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--hzp-faint);
}

.hzp-foot a { text-decoration: none; }

/* --------------------------------------------------------------- layout --- */

.hzp-wrap { max-width: 960px; margin-inline: auto; padding: 40px 24px; }
.hzp-wrap--narrow { max-width: 720px; }

.hzp-section { margin-top: 40px; }

.hzp-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hzp-grid { display: grid; gap: 16px; }
.hzp-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------------------------------------------------------------- cards --- */

.hzp-card {
  background: var(--hzp-surface);
  border: 1px solid var(--hzp-line);
  border-radius: var(--hzp-r-lg);
  padding: 24px;
  box-shadow: var(--hzp-shadow);
}

.hzp-card + .hzp-card { margin-top: 16px; }
.hzp-card--auth { width: 100%; max-width: 420px; }
.hzp-stat { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.hzp-empty { text-align: center; display: grid; gap: 16px; justify-items: center; }
.hzp-prose { font-size: 16px; color: var(--hzp-body); }
.hzp-prose > * + * { margin-top: 1em; }
.hzp-billing { margin-top: 16px; display: grid; gap: 12px; }

/* --------------------------------------------------------------- pills ---- */

.hzp-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--hzp-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--hzp-page);
  color: var(--hzp-muted);
}

.hzp-pill--queued { background: #eef2f7; color: #475569; }
.hzp-pill--in_progress { background: #dbeafe; color: #1d4ed8; }
.hzp-pill--review { background: #fef3c7; color: #92400e; }
.hzp-pill--done { background: #dcfce7; color: #15803d; }
.hzp-pill--active { background: #dcfce7; color: #15803d; }
.hzp-pill--past_due { background: #fee2e2; color: #b91c1c; }
.hzp-pill--paused { background: #fef3c7; color: #92400e; }
.hzp-pill--canceled { background: #f1f5f9; color: #64748b; }

/* ---------------------------------------------------------------- lists --- */

.hzp-list { display: grid; gap: 8px; }

.hzp-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--hzp-surface);
  border: 1px solid var(--hzp-line);
  border-radius: var(--hzp-r);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}

.hzp-row:hover { border-color: var(--hzp-blue); transform: translateY(-1px); }
.hzp-row__title { font-weight: 600; flex: 1; }
.hzp-row__meta { font-size: 14px; color: var(--hzp-faint); white-space: nowrap; }

.hzp-files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hzp-files li { display: flex; gap: 12px; align-items: baseline; }
.hzp-files a { color: var(--hzp-blue); font-weight: 600; }

/* ------------------------------------------------------------- timeline --- */

.hzp-timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }

.hzp-timeline__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hzp-line-soft);
}

.hzp-timeline__item:last-child { border-bottom: 0; }

.hzp-timeline__dot {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--hzp-line);
  background: var(--hzp-surface);
}

.hzp-timeline__item--done .hzp-timeline__dot { background: var(--hzp-blue-grad); border-color: transparent; }
.hzp-timeline__item--current .hzp-timeline__dot { border-color: var(--hzp-blue); box-shadow: 0 0 0 4px var(--hzp-blue-tint); }
.hzp-timeline__item--todo { color: var(--hzp-faint); }
.hzp-timeline__label { font-weight: 600; }
.hzp-timeline__time { margin-left: auto; font-size: 14px; color: var(--hzp-faint); }

/* --------------------------------------------------------------- thread --- */

.hzp-thread { display: grid; gap: 12px; margin-bottom: 20px; }

.hzp-msg {
  padding: 16px 20px;
  border-radius: var(--hzp-r);
  border: 1px solid var(--hzp-line);
  background: var(--hzp-surface);
}

.hzp-msg--client { background: var(--hzp-blue-tint); border-color: transparent; }

.hzp-msg__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--hzp-muted);
  margin-bottom: 6px;
}

.hzp-msg__body { font-size: 15px; color: var(--hzp-body); }
.hzp-msg__body > * + * { margin-top: .75em; }

.hzp-review { border-color: var(--hzp-blue); }

/* ---------------------------------------------------------------- forms --- */

.hzp-form { display: grid; gap: 18px; }
.hzp-field { display: grid; gap: 6px; }
.hzp-field > span { font-weight: 600; font-size: 15px; }

.hzp-field input[type="text"],
.hzp-field input[type="email"],
.hzp-field input[type="url"],
.hzp-field input[type="password"],
.hzp-field input[type="number"],
.hzp-field select,
.hzp-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hzp-line);
  border-radius: 10px;
  font: inherit;
  background: var(--hzp-surface);
  color: var(--hzp-ink);
}

.hzp-field textarea { resize: vertical; }

.hzp-field input:focus,
.hzp-field select:focus,
.hzp-field textarea:focus {
  outline: 3px solid rgba(30, 122, 224, .35);
  outline-offset: 1px;
  border-color: var(--hzp-blue);
}

.hzp-check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.hzp-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hzp-inline { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }

.hzp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: var(--hzp-pill);
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s;
}

.hzp-btn:hover { transform: translateY(-1px); }
.hzp-btn--cta { background: var(--hzp-orange-grad); color: #fff; box-shadow: 0 6px 18px rgba(255, 110, 26, .3); }
.hzp-btn--ghost { background: var(--hzp-surface); border: 1px solid var(--hzp-line); color: var(--hzp-ink); font-weight: 600; }

/* --------------------------------------------------------------- flash ---- */

.hzp-flash {
  max-width: 960px;
  margin: 20px auto 0;
  padding: 14px 20px;
  border-radius: var(--hzp-r);
  font-size: 15px;
  font-weight: 500;
}

.hzp-flash--error { background: #fee2e2; color: #991b1b; }
.hzp-flash--notice { background: var(--hzp-blue-tint); color: #134a8a; }
.hzp--auth .hzp-flash { margin-bottom: 16px; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 720px) {
  .hzp-grid--3 { grid-template-columns: 1fr; }
  .hzp-wrap { padding: 24px 16px; }
  .hzp-top__inner { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .hzp-nav { margin-left: 0; width: 100%; order: 3; overflow-x: auto; }
  .hzp-top__out { margin-left: auto; }
  .hzp-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .hzp-btn, .hzp-row { transition: none; }
  .hzp-btn:hover, .hzp-row:hover { transform: none; }
}
