:root {
  --bg: #f7f8f5;
  --paper: #ffffff;
  --paper-2: #f0f3ee;
  --ink: #101914;
  --muted: #6c746e;
  --soft: #8b938d;
  --line: rgba(16, 25, 20, 0.1);
  --green: #00c578;
  --green-dark: #08784d;
  --black: #08110d;
  --shadow: 0 20px 60px rgba(8, 17, 13, 0.1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-bg {
  background:
    radial-gradient(circle at 82% 12%, rgba(0, 197, 120, 0.12), transparent 34%),
    linear-gradient(90deg, #08110d 0%, #102019 58%, #edf4ee 58.1%, #f7f8f5 100%);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 48px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px;
}
.login-brand, .side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand {
  position: absolute;
  top: 38px;
  color: white;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: var(--black);
  font-weight: 800;
  font-family: Poppins, Inter, sans-serif;
}
.login-brand strong, .side-brand strong { display: block; font-family: Poppins, Inter, sans-serif; }
.login-brand span, .side-brand span { display: block; color: var(--soft); font-size: 12px; margin-top: 2px; }
.login-copy { max-width: 650px; color: white; padding-top: 70px; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.login-copy h1 {
  font: 700 clamp(42px, 6.2vw, 72px)/0.98 Poppins, Inter, sans-serif;
  max-width: 600px;
  margin-bottom: 22px;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.42);
}
.login-copy p:last-child {
  max-width: 560px;
  color: rgba(255,255,255,.9);
  font-size: 17px;
  line-height: 1.7;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}
.login-card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 12px;
}
.login-card .lock {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: rgba(0,197,120,.12);
  border-radius: 8px;
}
.login-card h2 { font: 700 24px/1.1 Poppins, Inter, sans-serif; margin: 8px 0 4px; }
.login-card label { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--paper-2);
  color: var(--ink);
}
.auth-error {
  color: #b42318;
  background: #fff1f0;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}
.login-card button, .primary, .secondary, .ghost {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
}
.login-card button, .primary {
  background: var(--green);
  color: var(--black);
}
.login-card button:disabled {
  opacity: 0.65;
  cursor: progress;
}
.secondary, .ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.login-card small { color: var(--muted); line-height: 1.5; }

.portal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--black);
  color: white;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav button {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.64);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  text-align: left;
}
.sidebar nav button.active, .sidebar nav button:hover {
  background: rgba(255,255,255,.08);
  color: white;
}
.client-chip {
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 5px;
}
.client-chip span, .client-chip small { color: rgba(255,255,255,.52); font-size: 12px; }
.client-chip strong { line-height: 1.3; }
.workspace { padding: 28px; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.crumb { color: var(--muted); font-size: 12px; }
.topbar h1 { font: 700 32px/1.1 Poppins, Inter, sans-serif; margin: 6px 0 0; }
.hero-panel {
  min-height: 320px;
  background:
    radial-gradient(circle at 92% 18%, rgba(0,197,120,.22), transparent 26%),
    linear-gradient(135deg, #0b1510, #16241d);
  color: white;
  border-radius: 8px;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: end;
  box-shadow: var(--shadow);
}
.hero-panel h2 { font: 700 clamp(34px, 5vw, 56px)/1 Poppins, Inter, sans-serif; margin-bottom: 14px; }
.hero-panel p { color: rgba(255,255,255,.72); max-width: 680px; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.status-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 20px;
}
.status-card span { color: rgba(255,255,255,.55); font-size: 12px; }
.status-card strong { display: block; font-size: 26px; line-height: 1.1; margin: 10px 0; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.metric-grid article, .panel, .automation-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric-grid article { padding: 18px; }
.metric-grid span, .panel-head span, .automation-top span { color: var(--muted); font-size: 12px; }
.metric-grid strong { display: block; font-size: 28px; margin: 7px 0 4px; }
.metric-grid small { color: var(--soft); }
.two-col, .support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .75fr);
  gap: 18px;
}
.panel { padding: 22px; }
.panel.wide { max-width: 980px; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-head h3 { font-size: 17px; margin: 0; }
.timeline { display: grid; gap: 12px; }
.step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
}
.step i, .activity i, .doc-row i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: white;
  color: var(--green-dark);
}
.step.active { border-color: rgba(0,197,120,.55); background: rgba(0,197,120,.08); }
.step strong, .step span { display: block; }
.step span { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.activity { display: grid; gap: 11px; }
.activity div { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 11px; align-items: center; }
.activity span { color: var(--muted); line-height: 1.45; }
.section-intro p { color: var(--muted); max-width: 720px; font-size: 16px; line-height: 1.7; }
.automation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.automation-card { padding: 20px; display: grid; gap: 14px; }
.automation-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.automation-top h3 { margin: 0 0 6px; font-size: 17px; }
.automation-top b { color: var(--green-dark); }
.automation-card p, .muted { color: var(--muted); line-height: 1.6; }
.automation-card small { color: var(--soft); line-height: 1.45; }
.progress {
  height: 8px;
  background: var(--paper-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.doc-list { display: grid; gap: 10px; }
.doc-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.doc-row span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.doc-row em { color: var(--green-dark); font-size: 12px; font-style: normal; font-weight: 800; }
.billing-card { display: grid; gap: 14px; }
.billing-card strong { font-size: 28px; }
.billing-card p { color: var(--muted); line-height: 1.6; }
.billing-card div {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .login-shell, .portal, .hero-panel, .two-col, .support-grid { grid-template-columns: 1fr; }
  .login-bg { background: #08110d; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid, .automation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .login-shell, .workspace, .sidebar { padding: 18px; }
  .login-brand { position: static; margin-bottom: 28px; }
  .login-copy { padding-top: 0; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .hero-panel { padding: 24px; }
  .metric-grid, .automation-grid, .sidebar nav { grid-template-columns: 1fr; }
  .doc-row { grid-template-columns: 38px 1fr; }
  .doc-row em { grid-column: 2; }
}
