/*
 * Anchanto Demo Studio. Anchanto Design System (New Library): Inter, neutral surfaces, near-black secondary actions,
 * the brand gradient (#f40042 -> #620091) only on the wordmark rule, the sidebar accent and the sign-in action.
 */
:root {
  --bg: #f4f4f7; --surface: #ffffff; --surface-alt: #fafafc;
  --text: #23232f; --muted: #6b6b7b; --faint: #9a9aa8; --border: #e3e3ea;
  --ink: #23232f; --on-ink: #ffffff; --brand: #620091; --brand-2: #f40042;
  --brand-grad: linear-gradient(90deg, #f40042, #620091);
  --nav-bg: #15141f; --nav-text: #d9d8e6; --nav-muted: #8d8ba3; --nav-hover: #22202f; --nav-active: #2a2740;
  --pos-bg: #e6f6ec; --pos: #11733b; --neg-bg: #fdecef; --neg: #b3122f;
  --alert-bg: #fff4e0; --alert: #8a5300; --info-bg: #f1eafb; --info: #5a1a8f;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --focus: #8b3fd1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111018; --surface: #1b1a25; --surface-alt: #201f2b; --text: #ececf3; --muted: #a9a8b8; --faint: #7d7c8e;
    --border: #2f2d3d; --ink: #ececf3; --on-ink: #15141f; --brand: #c08cf0; --brand-2: #ff5c86;
    --nav-bg: #0c0b12; --nav-hover: #1a1924; --nav-active: #24223a;
    --pos-bg: #173a25; --pos: #7fd8a0; --neg-bg: #47182a; --neg: #ff9db5;
    --alert-bg: #3f2f12; --alert: #ffcf7a; --info-bg: #2a1f3d; --info: #d6b5ff; --focus: #c08cf0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/22px var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: 24px; line-height: 30px; font-weight: 700; }
h2 { font-size: 16px; line-height: 24px; font-weight: 650; }
h3 { font-size: 15px; line-height: 22px; font-weight: 650; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 17px; }
.center { text-align: center; }
.over { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ic { flex: none; display: block; }

/* the anchanto wordmark and the gradient rule under it */
/* The wordmark is the brand's own drawing, painted in the text colour (white on the sidebar, ink on the sign-in card);
   the word stays in the page for screen readers and search, hidden behind the drawing */
.wordmark { display: block; width: calc(var(--wm-h, 1em) * 4.865); height: var(--wm-h, 1em); line-height: 1; overflow: hidden;
  color: inherit; text-indent: -9999px; background-color: currentColor;
  -webkit-mask: url("/assets/anchanto-wordmark-fd641720.svg") no-repeat left center / contain; mask: url("/assets/anchanto-wordmark-fd641720.svg") no-repeat left center / contain; }
.rule { display: block; height: 3px; border-radius: 3px; background: var(--brand-grad); }

/* shell: dark sidebar, content on the right */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--nav-bg); color: var(--nav-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: grid; gap: 0; padding: 22px 20px 18px; text-decoration: none; color: #fff; }
.brand .wordmark { font-size: 26px; color: #fff; }
.brand .rule { width: 40px; margin: 12px 0 12px; }
.brand .brand-name { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.brand .tagline { font-size: 12px; color: var(--nav-muted); margin-top: 2px; }
.nav { display: grid; gap: 2px; padding: 8px 12px; flex: 1; align-content: start; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nav-muted); padding: 14px 10px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); color: var(--nav-text); text-decoration: none; font-weight: 500; }
.nav-item:hover { background: var(--nav-hover); color: #fff; }
.nav-item.on { background: var(--nav-active); color: #fff; font-weight: 600; }
.nav-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad); background: linear-gradient(180deg, #f40042, #620091); }
.nav-item .ic { opacity: 0.85; }
.me { display: flex; align-items: center; gap: 10px; margin: 8px 12px 14px; padding: 10px; border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand-grad); }
.who { display: grid; min-width: 0; flex: 1; line-height: 17px; }
.who b { font-size: 13px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { font-size: 11.5px; color: var(--nav-muted); }
.signout { margin: 0; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--nav-muted); cursor: pointer; }
.icon-btn:hover { background: var(--nav-hover); color: #fff; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 32px 56px; display: grid; gap: 20px; align-content: start; min-width: 0; }
.bare { min-height: 100vh; }
.head-text { display: grid; gap: 4px; }
.narrow { max-width: 640px; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* Phone and tablet: the brand and the person on one line, the menu under them as a scrolling row */
  .side { position: static; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand me" "nav nav"; align-items: center; padding: 8px 12px 6px; }
  .brand { grid-area: brand; padding: 6px 4px; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 10px; }
  .brand .wordmark { font-size: 20px; }
  .brand .rule, .brand .tagline { display: none; }
  .nav { grid-area: nav; display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 4px 0 2px; gap: 2px; }
  .nav-label { display: none; }
  .nav-item { flex: none; padding: 6px 10px; }
  .nav-item.on::before { display: none; }
  .me { grid-area: me; margin: 0; padding: 0; gap: 4px; background: none; border: 0; }
  .who { display: none; }
  .page { padding: 20px 16px 40px; }
}

/* flashes */
.flash { border-radius: var(--r-md); padding: 10px 14px; font-weight: 600; font-size: 13px; }
.flash.ok { background: var(--pos-bg); color: var(--pos); }
.flash.err { background: var(--neg-bg); color: var(--neg); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-md); padding: 7px 14px; font: 600 14px/22px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-pri { background: var(--brand); color: #fff; }
.btn-sec:hover { filter: brightness(1.15); }
.btn-sec { background: var(--ink); color: var(--on-ink); }
.btn-ter { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ter:hover { border-color: var(--muted); }
.btn-sm { padding: 3px 10px; font-size: 13px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.head p { max-width: 640px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: 0 1px 2px rgba(20, 16, 40, 0.04); display: grid; gap: 12px; min-width: 0; }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

.badge { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-md); white-space: nowrap; }
.b-pos { background: var(--pos-bg); color: var(--pos); }
.b-neg { background: var(--neg-bg); color: var(--neg); }
.b-alert { background: var(--alert-bg); color: var(--alert); }
.b-info { background: var(--info-bg); color: var(--info); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.filters .field { margin: 0; min-width: 150px; }
.filters .field.grow { flex: 1 1 240px; }
.filters .field input, .filters .field select { width: 100%; }
.filters .btn { flex: none; }
.pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); }
.pager [aria-disabled="true"] { opacity: .45; pointer-events: none; }
.std-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.std-card { display: grid; gap: 12px; align-content: start; }
.std-card .btn { justify-self: start; }
.b-neu { background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); }

/* forms */
form.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.field input[type=text], .field input[type=search], .field input[type=email], .field input[type=password], .field input[type=url], .field input[type=number], .field select, .field textarea {
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; width: 100%; min-width: 0;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border: 2px solid var(--ink); padding: 7px 9px; }
.field input[type=color] { width: 56px; height: 36px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 2px; }
.fields2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .fields2 { grid-template-columns: minmax(0, 1fr); } }
.errors { background: var(--neg-bg); color: var(--neg); border-radius: var(--r-md); padding: 10px 14px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

/* tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 20px; }
th { font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); text-align: left; padding: 8px 18px; background: var(--surface-alt); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 32px 18px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }

/* customer identity */
.ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ident > div { min-width: 0; }
.logo { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; overflow: hidden; flex: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.logo.lg { width: 56px; height: 56px; font-size: 18px; }

/* products and branches */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.product { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; background: var(--surface); text-decoration: none; display: grid; gap: 6px; }
.product:hover { border-color: var(--muted); }
.product.on { border: 2px solid var(--ink); padding: 11px; }
.mark { width: 30px; height: 30px; border-radius: var(--r-md); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 11px; }
.mark-ic { display: block; width: 70%; height: 70%; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.branches { display: grid; gap: 8px; }
.branch { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.branch form { margin: 0; }
.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.counts div { border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; display: grid; min-width: 0; }
.counts span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counts b { font-size: 20px; line-height: 26px; font-variant-numeric: tabular-nums; }
.preview-list { margin: 0; padding-left: 18px; display: grid; gap: 2px; }

/* demo build progress */
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.progress .step { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
/* a step's marker, drawn so it sits centred at any font: an empty ring while waiting, a pulsing dot while running,
   a tick once done, a cross when it failed */
.progress .step .mark { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--border); }
.progress .step .mark::before, .progress .step .mark::after { content: ""; position: absolute; }
.progress .step.done { color: var(--text); }
.progress .step.done .mark { background: var(--pos); border-color: var(--pos); }
.progress .step.done .mark::after { left: 50%; top: 45%; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg); }
.progress .step.running { color: var(--text); font-weight: 600; }
.progress .step.running .mark { border-color: var(--alert); }
.progress .step.running .mark::after { inset: 3px; border-radius: 50%; background: var(--alert); animation: pulse 1.4s ease-in-out infinite; }
.progress .step.failed .mark { background: var(--neg); border-color: var(--neg); }
.progress .step.failed .mark::before, .progress .step.failed .mark::after { left: 50%; top: 50%; width: 8px; height: 2px; border-radius: 1px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
.progress .step.failed .mark::after { transform: translate(-50%, -50%) rotate(-45deg); }
@keyframes pulse { 50% { opacity: 0.45; } }

/* sign in: the brand on the left, the form on the right */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px 48px; color: #fff;
  background: radial-gradient(120% 80% at 0% 100%, rgba(244, 0, 66, 0.35), transparent 55%), radial-gradient(90% 70% at 100% 0%, rgba(98, 0, 145, 0.55), transparent 60%), #15141f; }
.auth-brand-top .wordmark { font-size: 40px; color: #fff; }
.auth-brand-top .rule { width: 56px; margin-top: 16px; }
.auth-pitch { display: grid; gap: 18px; max-width: 460px; }
.auth-pitch .over { color: rgba(255, 255, 255, 0.7); }
.pitch { font-size: 28px; line-height: 36px; font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; }
.points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, 0.85); }
.points .ic { margin-top: 2px; color: #ff7aa0; }
.auth-foot { font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(400px, 100%); display: grid; gap: 18px; }
.auth-head { display: grid; gap: 6px; }
.auth-head .wordmark.sm { display: none; font-size: 24px; color: var(--text); margin-bottom: 6px; }
.auth-head h1 { font-size: 28px; line-height: 34px; }
.btn-block { width: 100%; }
.btn-brand { background: var(--brand-grad); color: #fff; padding: 10px 16px; }
.btn-brand:hover { filter: brightness(1.06); }
.btn-ms { gap: 10px; padding: 9px 16px; }
.ms { display: grid; grid-template-columns: repeat(2, 8px); gap: 2px; }
.ms i { width: 8px; height: 8px; display: block; }
.ms i:nth-child(1) { background: #f25022; } .ms i:nth-child(2) { background: #7fba00; } .ms i:nth-child(3) { background: #00a4ef; } .ms i:nth-child(4) { background: #ffb900; }
/* Microsoft sign-in not configured yet: crisp, in its own colours, with a "Coming soon" label instead of faded */
.btn-soon[disabled] { opacity: 1; cursor: not-allowed; background: var(--surface); border-color: var(--border); color: var(--text); }
.soon { margin-left: 2px; font-size: 11px; line-height: 16px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--info-bg); color: var(--info); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-head .wordmark.sm { display: block; }
  .auth-panel { align-items: start; padding-top: 12vh; }
}

/* inputs with an icon inside, and the password show/hide button */
.input-icon { position: relative; }
.input-icon .lead { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.field .input-icon input { padding-left: 36px; }
.field .input-icon input:focus { padding-left: 35px; }
.input-icon.password input, .field .input-icon.password input:focus { padding-right: 42px; }
.reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 30px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; }
.reveal:hover { color: var(--text); }
.reveal .when-shown, .reveal[aria-pressed="true"] .when-hidden { display: none; }
.reveal[aria-pressed="true"] .when-shown { display: block; }
fieldset.group { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin: 0; display: grid; gap: 12px; }
fieldset.group legend { padding: 0 6px; font-size: 12px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.row.tight { gap: 4px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Product pictures */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pics-meter { height: 6px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--border); overflow: hidden; }
.pics-meter i { display: block; height: 100%; background: var(--brand-grad); }
.pics-drop { margin: 0; }
.pics-drop-area { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed rgba(98, 0, 145, 0.35); border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(244, 0, 66, 0.035), rgba(98, 0, 145, 0.05)); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.pics-drop-area:hover, .pics-drop-area:focus-within { border-color: var(--brand); background: linear-gradient(135deg, rgba(244, 0, 66, 0.06), rgba(98, 0, 145, 0.09)); }
.pics-drop-area .ic { color: var(--brand); flex: none; }
.pics-drop-area > span { display: grid; gap: 2px; }
.pics { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.pic { display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.pic:hover { border-color: var(--faint); box-shadow: 0 2px 8px rgba(20, 16, 40, 0.06); }
.pic-img { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #fff; border-bottom: 1px solid var(--border); overflow: hidden; }
.pic-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pic-img.tile { background: var(--tile); color: #fff; font-size: 30px; font-weight: 700; letter-spacing: 0.02em; border-bottom: 0; }
.pic-body { display: grid; gap: 4px; padding: 10px 12px 4px; min-width: 0; align-content: start; }
.pic-name { font-size: 13px; line-height: 18px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pic-sku { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pic-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 12px; }
.pic-actions form { margin: 0; }
.pic-actions label.btn { cursor: pointer; }
.pic.none .pic-actions label.btn { border-color: rgba(98, 0, 145, 0.35); color: var(--brand); }
.notice-box { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; gap: 12px; flex-wrap: wrap; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* Demo data being generated: a panel across the top of the customer page, so it holds the eye */
.gen { position: relative; overflow: hidden; display: grid; gap: 18px; padding: 22px 24px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(244, 0, 66, 0.06), rgba(98, 0, 145, 0.09)), var(--surface); border: 1px solid rgba(98, 0, 145, 0.22); }
.gen::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand-grad); }
.gen-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.gen-title { display: flex; gap: 14px; align-items: center; min-width: 0; }
.gen-title h2 { font-size: 18px; line-height: 24px; }
.gen-spin { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 3px solid rgba(98, 0, 145, 0.18); border-top-color: var(--brand); border-right-color: var(--brand-2); animation: spin 0.9s linear infinite; }
.gen-left { display: grid; justify-items: end; line-height: 1.1; }
.gen-left b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gen-bar { height: 10px; border-radius: 999px; background: rgba(98, 0, 145, 0.12); overflow: hidden; }
.gen-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand-grad); background-size: 200% 100%; animation: flow 2.4s linear infinite; transition: width 0.6s ease; }
.gen-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gen-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.gen-steps .dot { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); border: 2px solid var(--border); }
.gen-steps .label { font-weight: 600; font-size: 13px; line-height: 18px; color: var(--muted); }
.gen-steps .state { color: var(--faint); }
.gen-steps li.done .dot { background: var(--pos); border-color: var(--pos); color: #fff; }
.gen-steps li.done .label { color: var(--text); }
.gen-steps li.done .state { color: var(--pos); }
.gen-steps li.running { border-color: rgba(98, 0, 145, 0.45); box-shadow: 0 0 0 3px rgba(98, 0, 145, 0.08); }
.gen-steps li.running .dot { border-color: transparent; background: var(--brand-grad); color: #fff; animation: pulse 1.4s ease-in-out infinite; }
.gen-steps li.running .label { color: var(--text); }
.gen-steps li.running .state { color: var(--brand); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { background-position: -200% 0; } }
@media (max-width: 720px) { .gen-steps { grid-template-columns: minmax(0, 1fr); } .gen-left { justify-items: start; } }

/* demo builds on the customer page: why a product or branch has no demo to open yet */
.tile-status { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; }
.tile-status .muted { overflow-wrap: anywhere; }
.build-detail { flex-basis: 100%; display: grid; gap: 10px; justify-items: start; padding-top: 10px; border-top: 1px solid var(--border); }
.build-detail p { margin: 0; }
.build-error { color: var(--neg); overflow-wrap: anywhere; }

/* A customer request's journey: five steps on a line, the current one highlighted */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.journey li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12px; line-height: 16px; color: var(--faint); }
.journey li::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--border); z-index: 0; }
.journey li:first-child::before { display: none; }
.journey .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface); border: 2px solid var(--border); color: #fff; }
.journey li.done { color: var(--text); }
.journey li.done .dot { background: var(--pos); border-color: var(--pos); }
.journey li.done::before, .journey li.running::before, .journey li.failed::before { background: var(--pos); }
.journey li.running { color: var(--text); font-weight: 600; }
.journey li.running .dot { border-color: transparent; background: var(--brand-grad); animation: pulse 1.4s ease-in-out infinite; }
.journey li.failed { color: var(--neg); font-weight: 600; }
.journey li.failed .dot { background: var(--neg); border-color: var(--neg); }
@media (max-width: 560px) { .journey li span:last-child { font-size: 10.5px; } }

/* The customer page as one process: numbered steps on a line, the one to do now highlighted */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.flow-step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; row-gap: 14px; padding: 18px 20px 18px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.flow-step::after { content: ""; position: absolute; left: 35px; top: calc(100% + 1px); height: 14px; width: 2px; background: var(--border); }
.flow-step:last-child::after { display: none; }
.flow-marker { grid-row: span 2; align-self: start; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--muted); background: var(--surface-alt); border: 2px solid var(--border); }
.flow-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; min-width: 0; }
.flow-head > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 320px; }
.flow-head h2 { font-size: 17px; line-height: 24px; }
.flow-head h2 .muted { font-weight: 500; }
.flow-body { grid-column: 2; display: grid; gap: 14px; min-width: 0; }
.flow-chip { flex: none; }
/* done: a green tick, the step settles back */
.flow-step.done .flow-marker { background: var(--pos); border-color: var(--pos); color: #fff; }
.flow-step.done::after { background: var(--pos); }
/* now / attention: the step to act on stands out */
.flow-step.now, .flow-step.attention { border-color: rgba(98, 0, 145, 0.35); box-shadow: 0 0 0 3px rgba(98, 0, 145, 0.06), 0 4px 16px rgba(20, 16, 40, 0.05); }
.flow-step.now .flow-marker { background: var(--brand-grad); border-color: transparent; color: #fff; }
.flow-step.attention { border-color: rgba(179, 18, 47, 0.4); }
.flow-step.attention .flow-marker { background: var(--neg); border-color: var(--neg); color: #fff; }
/* locked / later: waits for an earlier step */
.flow-step.locked, .flow-step.later { background: var(--surface-alt); }
.flow-step.locked .flow-head h2, .flow-step.later .flow-head h2 { color: var(--muted); }
/* folded parts (pictures, history, samples) */
.flow-fold > summary, .flow-more > summary { list-style: none; cursor: pointer; width: max-content; }
.flow-fold > summary::-webkit-details-marker, .flow-more > summary::-webkit-details-marker { display: none; }
.flow-fold[open] > summary { margin-bottom: 4px; }
.flow-more > summary { font-size: 13px; font-weight: 600; color: var(--brand); }
.flow-more[open] { display: grid; gap: 8px; }
.flow-step .gen { margin: 0; }
@media (max-width: 640px) {
  .flow-step { grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; padding: 14px; }
  .flow-marker { width: 30px; height: 30px; font-size: 13px; }
  .flow-step::after { left: 28px; }
  .flow-body { grid-column: 1 / -1; }
}

/* Disabled customers: the row, the banner on its page, and the confirmation dialog to disable or enable it */
.btn-danger { color: var(--neg); }
.btn-danger:hover { border-color: var(--neg); }
.btn-danger-solid { background: var(--neg); color: #fff; }
.btn-danger-solid:hover { filter: brightness(1.1); }
.status-action { display: inline-flex; }
.row.end { justify-content: flex-end; }
td .row.end { flex-wrap: nowrap; }
tr.is-disabled .ident .logo { opacity: 0.5; }
.disabled-line { margin-top: 4px; font-size: 12px; line-height: 17px; color: var(--muted); max-width: 440px; overflow-wrap: anywhere; }
.disabled-note { border-color: var(--neg); background: var(--neg-bg); }
.disabled-note h2 { color: var(--neg); }
.reason { white-space: pre-line; overflow-wrap: anywhere; border-left: 3px solid var(--neg); padding: 2px 0 2px 10px; }
.dialog { width: min(480px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(20, 16, 40, 0.25); text-align: left; white-space: normal; font-size: 14px; }
.dialog::backdrop { background: rgba(17, 16, 24, 0.45); }
.dialog form.stack { gap: 12px; }

/* Admin › Architecture: tabs over a framed archify diagram */
.arch-tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.arch-tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.arch-tab:hover { color: var(--text); }
.arch-tab.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.arch-frame { position: relative; overflow: hidden; }
.arch-loading { position: absolute; top: 24px; left: 0; right: 0; margin: 0; text-align: center; }
.arch-frame iframe { position: relative; display: block; width: 100%; height: calc(100vh - 210px); min-height: 640px; border: 0; background: transparent; }
/* Full page: while the viewer's presentation stage is on, the frame covers the browser window like a popup */
.arch-frame.is-max { position: fixed; inset: 0; z-index: 1000; margin: 0; border-radius: 0; border: 0; background: var(--bg); }
.arch-frame.is-max iframe { height: 100vh; min-height: 0; }
html.arch-max-open { overflow: hidden; }

/* How it works: the guide button (top right, Sales and Country Heads) and the guide page */
.topbar { display: flex; justify-content: flex-end; margin: -12px 0 -8px; }
.help-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(20, 16, 40, .06); }
.help-btn .ic { color: var(--brand); }
.help-btn:hover, .help-btn.on { border-color: var(--brand); }
.guide-video video { display: block; width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.guide-video h2 { display: inline-flex; align-items: center; gap: 8px; }
.guide-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.guide-step { display: flex; gap: 14px; align-items: flex-start; }
.guide-step h3 { margin: 2px 0 4px; font-size: 15px; }
.guide-step p { margin: 0; }
.guide-tips ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
