/* Northwind: invoicing for small teams. A demo product for HelpLayer's demo help center. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --brand: #3b5bdb;
  --brand-ink: #2b44ad;
  --brand-tint: #edf1fd;
  --ink: #101828;
  --text: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #eaecf0;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --green: #067647;
  --green-bg: #ecfdf3;
  --amber: #b54708;
  --amber-bg: #fffaeb;
  --red: #b42318;
  --red-bg: #fef3f2;
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
p, .hint, .sub { text-wrap: pretty; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -0.02em; }

.app { display: flex; min-height: 100vh; }

/* Sidebar */
.side { width: 248px; flex: none; background: #0f1b3d; color: #c7d0ea; display: flex; flex-direction: column; padding: 18px 14px; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; padding: 2px 8px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #5b7cfa, #3b5bdb); display: grid; place-items: center; }
.org { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.org-badge { width: 28px; height: 28px; border-radius: 7px; background: #f79009; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.org small { display: block; color: #8e9bc4; font-size: 12px; }
.org b { color: #fff; font-weight: 600; font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #6f7ca8; padding: 8px 10px 6px; margin-top: 16px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a.on { background: rgba(91, 124, 250, 0.22); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; font-size: 12px; background: #f04438; color: #fff; border-radius: 999px; padding: 1px 7px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #f4ebff; color: #6941c6; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.side-foot b { color: #fff; font-size: 13px; display: block; font-weight: 600; }
.side-foot small { color: #8e9bc4; font-size: 12px; }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 8px; width: 360px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--faint); background: var(--bg); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--muted); position: relative; }
.dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: #f04438; border: 2px solid #fff; }
.page { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1240px; width: 100%; }
.head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.head h1 { font-size: 26px; font-weight: 700; }
.head p { margin: 4px 0 0; color: var(--muted); }
.head .actions { margin-left: auto; display: flex; gap: 8px; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.crumb a:hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px; border-radius: 9px; border: 1px solid #d0d5dd; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { color: var(--red); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }

/* Cards, KPIs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; font-weight: 600; }
.card-head .more { margin-left: auto; color: var(--brand); font-weight: 600; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; }
.kpi small { color: var(--muted); font-weight: 500; }
.kpi b { display: block; font-size: 28px; color: var(--ink); letter-spacing: -0.03em; margin: 6px 0 4px; }
.kpi span { font-size: 13px; color: var(--green); font-weight: 500; }
.kpi span.bad { color: var(--red); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.grid2 > .card { display: flex; flex-direction: column; }
@media (max-width: 1240px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
td:first-child { white-space: nowrap; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); background: #f9fafb; padding: 11px 20px; border-bottom: 1px solid var(--line); }
td { padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--text); }
tr:last-child td { border-bottom: 0; }
td b { color: var(--ink); font-weight: 600; }
td .sub { display: block; color: var(--muted); font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.paid { color: var(--green); background: var(--green-bg); }
.pill.sent { color: var(--brand-ink); background: var(--brand-tint); }
.pill.overdue { color: var(--red); background: var(--red-bg); }
.pill.draft { color: #475467; background: #f2f4f7; }
.pill.partial { color: var(--amber); background: var(--amber-bg); }

/* Tabs and toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; padding: 3px; background: #f2f4f7; border-radius: 10px; height: 40px; align-items: stretch; }
.tabs a { display: flex; align-items: center; }
.tabs a { padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.tabs a i { font-style: normal; color: var(--faint); margin-left: 4px; }
.filter { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: var(--muted); }

/* Menus (details) */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: 46px; z-index: 5; width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(16, 24, 40, 0.22); padding: 6px; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; color: var(--ink); font-weight: 500; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: #f9fafb; }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menu-list svg { width: 16px; height: 16px; color: var(--muted); }
.menu-list .red { color: var(--red); }

/* Forms */
.form { display: grid; gap: 18px; padding: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label.f { display: grid; gap: 6px; font-weight: 500; color: var(--ink); font-size: 13px; }
.input { height: 42px; border: 1px solid #d0d5dd; border-radius: 9px; padding: 0 12px; display: flex; align-items: center; gap: 8px; color: var(--ink); background: #fff; font-weight: 400; font-size: 14px; }
.input.placeholder { color: var(--faint); }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.switch { width: 40px; height: 22px; border-radius: 999px; background: #d0d5dd; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.switch.on { background: var(--brand); }
.switch.on::after { left: 20px; }
.setting { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting div { flex: 1; }
.setting b { display: block; color: var(--ink); font-weight: 600; }
.setting span { color: var(--muted); font-size: 13px; }

/* Settings layout */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 2px; }
.subnav a { padding: 9px 12px; border-radius: 8px; font-weight: 500; color: var(--muted); }
.subnav a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 0 0 1px var(--line); }

/* Invoice */
.doc { padding: 34px 38px; display: grid; gap: 26px; }
.doc-top { display: flex; justify-content: space-between; gap: 20px; }
.doc-top h2 { font-size: 22px; }
.doc .from { color: var(--muted); line-height: 1.6; }
.totals { margin-left: auto; width: 300px; display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 10px; font-size: 18px; font-weight: 700; color: var(--ink); }
.timeline { display: grid; gap: 14px; padding: 18px 20px; }
.timeline div { display: flex; gap: 12px; }
.timeline i { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex: none; }
.timeline small { color: var(--muted); display: block; }

/* Chart */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 20px 22px 8px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.bars span { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #5b7cfa, #3b5bdb); }
.bars span.light { background: #c7d4fd; }

/* Modal */
.scrim { position: fixed; inset: 0; background: rgba(16, 24, 40, 0.45); display: grid; place-items: start center; padding-top: 110px; z-index: 10; }
.modal { width: 520px; background: #fff; border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(16, 24, 40, 0.45); overflow: hidden; }
.modal-head { padding: 22px 24px 4px; }
.modal-head p { color: var(--muted); margin: 6px 0 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; background: #f9fafb; border-top: 1px solid var(--line); }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.plan .btn { margin-top: auto; justify-content: center; }
.plan .btn:disabled { background: #f2f4f7; color: var(--muted); border-color: var(--line); box-shadow: none; cursor: default; }
.plan.current { border: 2px solid var(--brand); }
.plan .price { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { margin: 0 0 6px; padding: 0; list-style: none; color: var(--text); line-height: 1.9; }
.plan { position: relative; }
.plan > .tag { position: absolute; top: 18px; right: 18px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; margin-bottom: 7px; }
.plan li::before { margin-top: 2px; }
.plan li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%233b5bdb%27 stroke-width=%273.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27m6 12 4 4 8-8%27/%3E%3C/svg%3E") center / 10px no-repeat; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--brand-ink); background: var(--brand-tint); padding: 3px 9px; border-radius: 999px; }

/* Integrations */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.app-card { padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.logo { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.logo img { width: 24px; height: 24px; filter: invert(1); }
.card-chip { width: 52px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; flex: none; }
.card-chip img { width: 44px; height: 22px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.grid-lines { position: relative; flex: 1; display: flex; flex-direction: column; }
.grid-lines .bars { flex: 1; background: repeating-linear-gradient(to top, transparent 0 49px, #f2f4f7 49px 50px); margin: 0 22px 0 52px; padding: 20px 0 8px; }
.axis { position: absolute; left: 18px; top: 14px; bottom: 30px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--faint); }
.app-card div { flex: 1; }
.app-card b { color: var(--ink); font-size: 15px; }
.app-card p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.connected { color: var(--green); font-weight: 600; font-size: 13px; }
