/* Customers home, customer page, and the "inside a customer" top bar in the tools.
 *
 * Idea: every customer walks an ant trail of six steps. Done steps are Ant
 * green, the one step to do next is signal orange, the rest are open dots.
 * Orange is used for nothing else. */

:root {
  --leaf: #0f2a1d;      /* ink, top bar */
  --ant: #00a651;       /* brand green: done, primary actions */
  --ant-deep: #007a3c;
  --signal: #ff6600;    /* the next step, only */
  --paper: #f4f7f3;
  --moss: #dce7de;      /* lines, borders, open dots */
  --slate: #51615a;     /* secondary text */
  --white: #fff;
  --cu-font: Inter, "Noto Sans Devanagari", "Noto Sans Bengali", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --cu-display: Poppins, "Noto Sans Devanagari", "Noto Sans Bengali", var(--cu-font);  /* the website's heading font */
}

/* ================= customer pages ================= */

body.cu-page { font-family: var(--cu-font); background: var(--paper); color: var(--leaf); }
body.cu-page .topbar { background: var(--leaf); padding: 10px 24px; min-height: 56px; }
body.cu-page .switcher { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
body.cu-page .switcher__item { font-family: var(--cu-font); }
/* the official Ant Method mark (dark green) on a white tile, with the site's stacked wordmark */
.cu-brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; margin-right: 14px; }
.cu-brand__tile { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--white); flex: none; }
.cu-brand__mark { display: block; width: 28px; height: 28px; object-fit: contain; }
.cu-brand__word { display: flex; flex-direction: column; font-family: var(--cu-display); font-weight: 700; font-size: 12.5px; line-height: 1.1; letter-spacing: .02em; }
.cu-brand__word sup { font-family: var(--cu-font); font-weight: 400; font-size: 8px; top: -.2em; }

.cu-main { flex: 1 1 auto; overflow-y: auto; padding: 40px 24px 80px; }
.cu-wrap { width: min(1040px, 100%); margin: 0 auto; }

:where(body.cu-page) :focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }

/* ---- buttons & inputs ---- */
.cu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 999px; padding: 11px 20px;
  font: 700 15px/1.2 var(--cu-font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.cu-btn--primary { background: var(--ant); color: var(--white); }
.cu-btn--primary:hover { background: var(--ant-deep); }
.cu-btn--primary:disabled { opacity: .55; cursor: default; }
.cu-btn--light { background: var(--white); color: var(--leaf); border-color: var(--moss); }
.cu-btn--light:hover { border-color: var(--ant); color: var(--ant-deep); }
.cu-btn--small { padding: 8px 14px; font-size: 14px; }
.cu-btn svg { width: 16px; height: 16px; flex: none; }
.cu-link { background: none; border: none; padding: 4px 0; font: 600 14px var(--cu-font); color: var(--ant-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.cu-input {
  width: 100%; border: 1.5px solid var(--moss); border-radius: 12px; background: var(--white);
  padding: 12px 14px; font: 500 16px var(--cu-font); color: var(--leaf);
}
.cu-input::placeholder { color: #8a9a92; }
.cu-input:hover { border-color: #b9cbbd; }
.cu-input:focus { outline: none; border-color: var(--ant); box-shadow: 0 0 0 4px rgba(0,166,81,.14); }

/* ---- the trail (small) ---- */
.trail-mini { --dot: 14px; --gap: 12px; display: inline-flex; align-items: center; gap: var(--gap); }
.trail-mini__dot { position: relative; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--white); border: 2px solid #bfd2c4; flex: none; }
.trail-mini__dot + .trail-mini__dot::before {  /* connector from the previous dot */
  content: ""; position: absolute; top: 50%; right: calc(100% + 2px); width: var(--gap); height: 2px; transform: translateY(-50%); background: #bfd2c4;
}
.trail-mini__dot.is-done { background: var(--ant); border-color: var(--ant); }
.trail-mini__dot.is-done + .trail-mini__dot::before { background: var(--ant); }
.trail-mini__dot.is-next { border-color: var(--signal); background: #ffe3cc; box-shadow: 0 0 0 3px rgba(255,102,0,.18); }
.hub-progress .trail-mini { --dot: 20px; --gap: 16px; }
.hub-progress .trail-mini__dot { border-width: 3px; }
.hub-progress .trail-mini__dot + .trail-mini__dot::before { height: 3px; right: calc(100% + 3px); }

/* ================= home ================= */

.cu-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 24px; margin-bottom: 32px; }
.cu-title { margin: 0; font-family: var(--cu-display); font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.cu-sub { margin: 12px 0 0; max-width: 52ch; font-size: 17px; line-height: 1.45; color: var(--slate); }

/* new customer */
.cu-new { background: var(--white); border: 1.5px solid var(--moss); border-radius: 22px; padding: 28px; margin-bottom: 36px; }
.cu-new[hidden] { display: none; }
.cu-new h2 { margin: 0 0 22px; font-family: var(--cu-display); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.cu-field { margin-bottom: 22px; max-width: 640px; }
.cu-field--wide { max-width: none; }
.cu-label { display: block; font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.cu-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cu-choice {
  display: grid; grid-template-columns: 56px 1fr; gap: 4px 14px; align-items: center; text-align: left;
  background: var(--paper); border: 2px solid transparent; border-radius: 16px; padding: 16px; cursor: pointer; font-family: var(--cu-font); color: var(--leaf);
}
.cu-choice:hover { border-color: var(--moss); }
.cu-choice[aria-pressed="true"] { background: #e6f6ec; border-color: var(--ant); }
.cu-choice__art { grid-row: span 2; width: 56px; height: 56px; }
.cu-choice__title { font-size: 17px; font-weight: 700; }
.cu-choice__desc { font-size: 14.5px; color: var(--slate); line-height: 1.35; }
.cu-error { min-height: 22px; margin: -6px 0 14px; color: #b42318; font-weight: 600; font-size: 15px; }
.cu-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* list */
.cu-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cu-search { max-width: 380px; border-radius: 999px; padding-left: 44px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2351615a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m16.5 16.5-4-4'/%3E%3C/svg%3E") no-repeat 16px center; }
.cu-list-title { margin: 0 0 14px; font-family: var(--cu-display); font-size: 20px; font-weight: 700; }
.cu-list-title[hidden] { display: none; }

.cu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.cu-cust {
  display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 18px;
  background: var(--white); border: 1.5px solid var(--moss); border-radius: 18px;
  color: inherit; text-decoration: none; transition: border-color .15s;
}
.cu-cust:hover { border-color: var(--ant); }
.cu-cust__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cu-cust__name { margin: 0; font-family: var(--cu-display); font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cu-cust__owner { margin: 4px 0 0; font-size: 14.5px; color: var(--slate); }
.cu-cust__next { margin: 0; font-size: 15px; font-weight: 700; color: #c24e00; }
.cu-cust__next.is-ready { color: var(--ant-deep); }
.cu-cust__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--moss); font-size: 13px; color: var(--slate); }

.cu-chip { flex: none; display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #e3f1fb; color: #0b4a6f; }
.cu-chip--orders { background: #fff0cc; color: #7a4a00; }

.cu-empty {
  grid-column: 1 / -1; margin: 0; padding: 48px 24px; text-align: center;
  border: 2px dashed var(--moss); border-radius: 18px; color: var(--slate); font-size: 17px;
}
.cu-empty[hidden] { display: none; }

/* older work */
.cu-unsorted { margin-top: 56px; }
.cu-unsorted[hidden] { display: none; }
.cu-unsorted h2 { margin: 0; font-family: var(--cu-display); font-size: 22px; font-weight: 700; }
.cu-unsorted > p { margin: 6px 0 16px; max-width: 64ch; color: var(--slate); font-size: 15.5px; line-height: 1.45; }
.cu-items { background: var(--white); border: 1.5px solid var(--moss); border-radius: 18px; }
.cu-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; }
.cu-item + .cu-item { border-top: 1px solid var(--moss); }
.cu-item__main { flex: 1 1 240px; min-width: 0; }
.cu-item__name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.cu-item__sub { font-size: 14px; color: var(--slate); margin-top: 2px; }
.cu-item__kind { font-weight: 600; color: var(--leaf); }
.cu-item select { flex: 0 1 240px; padding: 9px 12px; font-size: 15px; border-radius: 999px; }

/* ================= customer page ================= */

.hub { display: grid; grid-template-columns: minmax(260px, 320px) 1fr; gap: 40px; align-items: start; }
.hub[hidden] { display: none; }
.hub-side { position: sticky; top: 0; }
.hub-name {
  width: 100%; margin: 0; padding: 0 0 4px; border: none; border-bottom: 2px solid transparent; background: transparent;
  font: 700 clamp(30px, 3.6vw, 40px)/1.15 var(--cu-display); letter-spacing: -.01em; color: var(--leaf);
}
.hub-name:hover { border-bottom-color: var(--moss); }
.hub-name:focus { outline: none; border-bottom-color: var(--ant); }
.hub-type { margin-top: 12px; }
.hub-owner { display: block; margin-top: 22px; }
.hub-owner span { display: block; font-size: 14px; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.hub-owner input { padding: 10px 12px; font-size: 15px; }

.hub-progress { margin-top: 26px; padding-top: 22px; border-top: 1.5px solid var(--moss); }
.hub-progress__count { margin: 12px 0 0; font-size: 15px; color: var(--slate); }
.hub-next { display: flex; gap: 10px; align-items: baseline; margin: 16px 0 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.hub-next::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); transform: translateY(-1px); }
.hub-next.is-ready::before { background: var(--ant); }
.hub-side__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 26px; }
.hub-saved { font-size: 14px; color: var(--ant-deep); font-weight: 600; min-height: 1em; }
.hub-archived { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: #fff0cc; color: #7a4a00; font-weight: 600; font-size: 15px; }
.hub-archived[hidden] { display: none; }

/* the trail (large) */
.trail { list-style: none; margin: 0; padding: 0; }
.trail-step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 0 18px; padding-bottom: 18px; }
.trail-step::before {  /* the line to the next step */
  content: ""; position: absolute; left: 21px; top: 44px; bottom: -2px; width: 3px; border-radius: 3px; background: var(--moss);
}
.trail-step:last-child::before { display: none; }
.trail-step.is-done::before { background: var(--ant); }
.trail-dot {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--cu-display); font-weight: 600; font-size: 16px;
  background: var(--white); border: 3px solid var(--moss); color: var(--slate);
}
.trail-step.is-done .trail-dot { background: var(--ant); border-color: var(--ant); color: var(--white); }
.trail-step.is-next .trail-dot { border-color: var(--signal); color: #c24e00; }
.trail-step.is-next .trail-dot::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 3px solid var(--signal); opacity: 0;
  animation: trail-call 1.8s ease-out .4s 3;
}
@keyframes trail-call { 0% { opacity: .55; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.25); } }

.trail-card { background: var(--white); border: 1.5px solid var(--moss); border-radius: 18px; padding: 18px 20px 20px; }
.trail-step.is-next .trail-card { border-color: #ffb27a; box-shadow: 0 10px 30px -18px rgba(255,102,0,.55); }
.trail-step.is-done .trail-card { background: transparent; border-style: dashed; }
.trail-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.trail-card__title { margin: 6px 0 0; font-family: var(--cu-display); font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.trail-card__desc { margin: 6px 0 0; max-width: 60ch; font-size: 15.5px; line-height: 1.45; color: var(--slate); }
.trail-card__status { margin: 10px 0 0; font-size: 14px; color: var(--slate); }
.trail-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* done toggle: a real checkbox dressed as a pill */
.done-toggle { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1.5px solid var(--moss); background: var(--white); font-size: 14px; font-weight: 700; color: var(--slate); cursor: pointer; user-select: none; }
.done-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.done-toggle__box { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b9cbbd; display: grid; place-items: center; }
.done-toggle__box svg { width: 12px; height: 12px; opacity: 0; }
.done-toggle:hover { border-color: var(--ant); color: var(--leaf); }
.done-toggle:has(input:checked) { background: #e6f6ec; border-color: var(--ant); color: var(--ant-deep); }
.done-toggle:has(input:checked) .done-toggle__box { background: var(--ant); border-color: var(--ant); }
.done-toggle:has(input:checked) .done-toggle__box svg { opacity: 1; }
.done-toggle:has(input:focus-visible) { outline: 3px solid var(--signal); outline-offset: 2px; }

@media (max-width: 820px) {
  .cu-main { padding: 28px 16px 64px; }
  .cu-head { grid-template-columns: 1fr; }
  .hub { grid-template-columns: 1fr; gap: 28px; }
  .hub-side { position: static; }
  .trail-step { grid-template-columns: 32px 1fr; gap: 0 12px; }
  .trail-dot { width: 32px; height: 32px; font-size: 14px; border-width: 2.5px; }
  .trail-step::before { left: 15px; top: 32px; }
  .trail-card { padding: 16px; }
  .trail-card__head { flex-direction: column; }
  body.cu-page .switcher { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .trail-step.is-next .trail-dot::after { animation: none; }
  .cu-btn, .cu-cust { transition: none; }
}

/* ================= inside a customer (tool pages) ================= */

.cm-back {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 7px 14px 7px 10px;
  border-radius: 999px; background: var(--ant); color: var(--white);
  font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.cm-back:hover { background: var(--ant-deep); }
.cm-status { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-size: 13px; color: #a7c4b1; white-space: nowrap; }
.cm-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ant); }
.cm-status.is-error { color: #ffb27a; font-weight: 600; }
.cm-status.is-error::before { background: var(--signal); }
body.in-customer [data-outside-customer],
body.in-customer .switcher { display: none !important; }
body.customer-loading .layout,
body.customer-loading main { visibility: hidden; }


/* the same dark green top bar everywhere; buttons never wrap onto two lines */
.topbar { background: var(--leaf); }
.topbar .btn, .topbar .cu-guide-link { white-space: nowrap; }
body.in-customer .topbar__logo { display: none; }
.cu-guide-link { color: #cfe3d6; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.cu-guide-link:hover { color: #fff; }

/* tools opened on their own: one way back to Customers instead of a tool menu */
.cm-home {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 7px 14px 7px 10px;
  border-radius: 999px; border: 1px solid #3b4a54; color: #d1d7db; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.cm-home:hover { background: #2a3942; color: #fff; }
body.in-customer .cm-home { display: none; }

/* customer page side panel: next step first, archive as a quiet link */
.hub-progress .hub-next { margin-top: 0; }
.hub-archive { color: var(--slate); font-weight: 500; }
.hub-archive:hover { color: #b42318; }

@media (max-width: 820px) {
  /* on phones the side panel is a compact header, so the steps start sooner */
  .hub-side { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
  .hub-side .hub-name, .hub-side .hub-archived { grid-column: 1 / -1; }
  .hub-type { margin: 0; }
  .hub-owner { grid-column: 1 / -1; margin-top: 4px; }
  .hub-progress { grid-column: 1 / -1; margin-top: 8px; padding-top: 14px; }
  .hub-side__foot { grid-column: 1 / -1; margin-top: 4px; }
}
@media (max-width: 560px) {
  .cu-guide-link { display: none; }
}
.cm-failed { position: fixed; inset: 56px 0 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; background: #f4f7f3; font-family: Inter, -apple-system, sans-serif; }
.cm-failed p { margin: 0; font-size: 17px; color: #0f2a1d; max-width: 44ch; }
body.cm-is-failed .topbar__actions, body.cm-is-failed .cm-status { display: none; }

/* language menu in the top bar */
.cu-lang {
  appearance: none; -webkit-appearance: none; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px;
  padding: 6px 30px 6px 12px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23cfe3d6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: #e6f1ea; font: 600 13.5px var(--cu-font); cursor: pointer;
}
.cu-lang:hover { border-color: rgba(255, 255, 255, .5); }
.cu-lang option { color: #0f2a1d; background: #fff; }
.topbar__actions { display: flex; align-items: center; gap: 12px; }

/* ================= older flows ================= */
.cu-back { display: inline-block; margin-bottom: 14px; }
.of-count { font-size: 14px; color: var(--slate); }
.of-list[hidden] { display: none; }
.of-entry + .of-entry { border-top: 1px solid var(--moss); }
.of-actions { flex: none; }
.of-form { margin: 0 18px 18px; padding: 20px; border-radius: 14px; background: var(--paper); border: 1.5px solid var(--moss); }
.of-form__title { margin: 0 0 16px; font: 700 18px/1.3 var(--cu-display); overflow-wrap: anywhere; }
.of-form .cu-field { margin-bottom: 16px; }
.of-types { display: flex; flex-wrap: wrap; gap: 10px; }
.of-type { display: inline-flex; padding: 10px 18px; font-size: 15.5px; font-weight: 600; }
.of-note { margin: 0 0 10px; font-size: 14px; color: var(--slate); }
.of-more-row { display: flex; justify-content: center; margin-top: 16px; }
.of-more-row .cu-btn[hidden] { display: none; }
.of-types .of-type { display: inline-flex; align-items: center; min-height: 44px; background: var(--white); border: 1.5px solid var(--moss); border-radius: 999px; }
.of-types .of-type:hover { border-color: var(--ant); }
.of-types .of-type[aria-pressed="true"] { background: #e6f6ec; border-color: var(--ant); color: var(--leaf); }
