/* ===================================================================
   Whizs.ai ACP - the small set of pieces Metronic has no component for.

   The panel's chrome is stock Metronic demo3: layout, header, sidebar,
   navbar, cards, tables, badges, tabs, progress bars and buttons all come
   from assets/css/styles.css untouched. Nothing here restyles them - no
   gradients, lifts, glows or entrance animations - so the UI matches the
   reference demo exactly.
   =================================================================== */

/* Nunito everywhere. Metronic reads --default-font-family from --font-sans,
   so overriding both here covers every element including the auth screens
   and the tenant portals, which sit outside the panel shell. */
:root {
  --font-sans: 'Nunito', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --default-font-family: var(--font-sans);
}

/* Brand blue. Metronic resolves every primary button, link, ring, active
   nav item and badge from --primary, so the panel follows from this one
   token. The dark value is the same hue lifted for contrast on dark
   surfaces. Charts read --primary too (public/js/acp.js). */
:root {
  --brand-primary: #2F529F;
  --primary: var(--brand-primary);
  --primary-foreground: #FFFFFF;
}

.dark {
  --primary: #4A73C9;
  --primary-foreground: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  .acp-toast { animation: none !important; }
}

/* Numeric columns line up when digits are tabular. */
.acp-mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Inline monospace, matching Metronic's muted surfaces. */
.acp-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--muted);
  color: var(--secondary-foreground);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Small neutral pill, for facts that are not a status. */
.acp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: 11.5px; font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--muted);
  color: var(--secondary-foreground);
}

.acp-field-note { font-size: 11.5px; color: var(--muted-foreground); }
.acp-required::after { content: " *"; color: var(--destructive); }

/* Whole-row links in tables. */
.acp-row-link { cursor: pointer; }

/* Coloured initial tile, used wherever a tenant has no logo. */
.acp-tile {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  color: #fff;
  border-radius: var(--radius);
}

/* Empty state. */
.acp-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 20px; text-align: center;
}
.acp-empty i { font-size: 30px; color: var(--muted-foreground); }

/* --------------------------------------------------- onboarding steps */
.acp-steps { display: flex; align-items: stretch; }
.acp-step { position: relative; flex: 1; display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.acp-step + .acp-step::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 20px; bottom: 20px;
  width: 1px; background: var(--border);
}
.acp-step-num {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 999px; font-size: 13px; font-weight: 600; flex-shrink: 0;
  border: 1px solid var(--input); background: var(--background); color: var(--muted-foreground);
}
.acp-step.is-active .acp-step-num { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.acp-step.is-done .acp-step-num { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.acp-step.is-active .acp-step-title { color: var(--mono); font-weight: 500; }
.acp-step-title { font-size: 14px; color: var(--secondary-foreground); line-height: 1.3; }
.acp-step-hint { font-size: 12px; color: var(--muted-foreground); }

/* ------------------------------------------------------------ timeline */
.acp-timeline { position: relative; padding-inline-start: 24px; }
.acp-timeline::before {
  content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px;
  width: 1px; background: var(--border);
}
.acp-timeline-item { position: relative; padding-bottom: 18px; }
.acp-timeline-item:last-child { padding-bottom: 0; }
.acp-timeline-item::before {
  content: ""; position: absolute; inset-inline-start: -21px; top: 5px;
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--background);
  border: 2px solid var(--acp-accent, var(--primary));
}

/* ------------------------------------------------------- form extras */
.acp-swatch {
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--input); border-radius: var(--radius-sm);
  cursor: pointer; background: none;
}
.acp-swatch::-webkit-color-swatch-wrapper { padding: 3px; }
.acp-swatch::-webkit-color-swatch { border: none; border-radius: 4px; }

.acp-dropzone {
  border: 1px dashed var(--input); border-radius: var(--radius);
  padding: 20px; text-align: center; cursor: pointer; background: var(--muted);
}
.acp-dropzone:hover, .acp-dropzone.is-over { border-color: var(--primary); }

/* Tenant portal address field: input + fixed domain suffix. */
.acp-url {
  display: flex; align-items: stretch;
  border: 1px solid var(--input); border-radius: var(--radius-md);
  overflow: hidden; background: var(--background);
}
.acp-url:focus-within { border-color: var(--ring); }
.acp-url input {
  border: 0; outline: 0; padding: 0 12px; flex: 1; min-width: 0; height: 36px;
  background: transparent; color: var(--foreground); font-size: 14px;
}
.acp-url-suffix {
  display: flex; align-items: center; padding: 0 12px;
  font-size: 13px; color: var(--secondary-foreground);
  background: var(--muted); border-inline-start: 1px solid var(--input);
  white-space: nowrap;
}

/* Selectable card (applications, plans, roles, icons). */
.acp-pick { position: relative; display: block; cursor: pointer; }
.acp-pick input { position: absolute; opacity: 0; pointer-events: none; }
.acp-pick-box {
  display: flex; gap: 12px; align-items: flex-start; height: 100%;
  padding: 14px;
  border: 1px solid var(--input); border-radius: var(--radius);
  background: var(--background);
}
.acp-pick:hover .acp-pick-box { border-color: var(--ring); }
.acp-pick input:checked + .acp-pick-box { border-color: var(--primary); }
.acp-pick input:focus-visible + .acp-pick-box { outline: 2px solid var(--ring); outline-offset: 2px; }
.acp-pick-check {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 18px; height: 18px; border-radius: 999px;
  display: none; place-items: center;
  background: var(--primary); color: var(--primary-foreground); font-size: 9px;
}
.acp-pick input:checked ~ .acp-pick-check { display: grid; }

/* ------------------------------------------------- portal preview card */
.acp-preview-frame {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--background);
}
.acp-preview-bar {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--muted); border-bottom: 1px solid var(--border);
}
.acp-preview-bar em { width: 9px; height: 9px; border-radius: 999px; background: var(--input); }
.acp-preview-url {
  flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
  color: var(--secondary-foreground); background: var(--background);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------------------------------------------------- toasts */
#acp_toasts {
  position: fixed; z-index: 90;
  inset-block-end: 22px; inset-inline-end: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.acp-toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 380px;
  padding: 12px 14px; font-size: 14px;
  background: var(--background); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 4px 12px rgb(9 20 45 / 0.10);
  animation: acp-toast-in 160ms ease-out both;
}
.acp-toast.out { animation: acp-toast-out 140ms ease-in both; }
@keyframes acp-toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes acp-toast-out { to { opacity: 0; transform: translateX(16px); } }

/* ------------------------------------------------------- sign-in page */
/* The auth screens sit outside the panel shell, so they carry their own
   backdrop. Metronic's own branded sign-in does the same.

   Everything that moves here is slow and on a loop that never resolves,
   so the panel stays alive beside the form without competing with it for
   attention. It is all decoration, so all of it stops for a reader who
   has asked for less motion. */
.acp-auth-bg {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 560px at 15% 10%, color-mix(in oklab, var(--primary) 26%, transparent), transparent 60%),
    linear-gradient(150deg, #071437 0%, #0B1F4A 55%, #061026 100%);
}

/* A wider wash turning underneath the fixed gradient, so no two corners
   of the panel sit at the same brightness for long. */
.acp-auth-bg::before {
  content: ''; position: absolute; inset: -35%; pointer-events: none;
  background:
    radial-gradient(closest-side, color-mix(in oklab, var(--primary) 34%, transparent), transparent),
    radial-gradient(closest-side, rgba(120, 160, 245, 0.16), transparent);
  background-position: 28% 32%, 72% 72%;
  background-size: 58% 58%, 46% 46%;
  background-repeat: no-repeat;
  animation: acp-auth-wash 44s ease-in-out infinite alternate;
  will-change: transform;
}

/* A hairline grid, fading out as it falls, to read as a control surface
   rather than a marketing gradient. */
.acp-auth-bg::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
  animation: acp-auth-grid 60s linear infinite;
}

.acp-auth-orb {
  position: absolute; border-radius: 999px; filter: blur(46px); opacity: 0.35;
  /* The markup gives the second orb a negative delay, which starts it
     part-way through the loop so the two never move together. */
  animation: acp-auth-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes acp-auth-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(26px, -32px, 0) scale(1.16); }
}
@keyframes acp-auth-wash {
  from { transform: rotate(0deg) scale(1); }
  to   { transform: rotate(9deg) scale(1.14); }
}
@keyframes acp-auth-grid {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 46px 46px, 46px 46px; }
}

/* The panel settles in from the top down, once. Each element carries its
   own delay in --d so the order is readable in the markup. */
.acp-auth-in {
  animation: acp-auth-rise 640ms cubic-bezier(.22, .7, .3, 1) both;
  animation-delay: var(--d, 0s);
}
@keyframes acp-auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* The product tiles lift under the pointer and take a single pass of
   light across them, so the panel answers a hover without blinking. */
.acp-auth-card {
  position: relative; overflow: hidden;
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease;
}
.acp-auth-card:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
}
.acp-auth-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, 0.10) 50%, transparent 64%);
  transform: translateX(-120%);
  transition: transform 760ms ease;
}
.acp-auth-card:hover::after { transform: translateX(120%); }

@media (prefers-reduced-motion: reduce) {
  .acp-auth-bg::before,
  .acp-auth-bg::after,
  .acp-auth-orb { animation: none; }
  .acp-auth-in { animation: none; opacity: 1; transform: none; }
  .acp-auth-card, .acp-auth-card::after { transition: none; }
  .acp-auth-card:hover { transform: none; }
  .acp-auth-card:hover::after { transform: translateX(-120%); }
}

/* ---------------------------------------------------- holding page */
/* The public front door while the product is being built: one screen,
   no scroll, and enough motion to say that something is happening
   behind it. It borrows the sign-in panel's orbs so the two read as one
   product, and stands on its own stylesheet - no Metronic bundle, no
   Tailwind - because it is the one page a stranger sees and it should
   arrive in one request. The network behind it is drawn on a canvas by
   the page's own nonce-carrying script. */
.acp-home, .acp-home * { box-sizing: border-box; }
/* The orbs and the scan band reach past the bottom edge; the root is
   clipped as well as the body so nothing can scroll the page to them. */
html:has(> body.acp-home) { height: 100%; overflow: hidden; }
.acp-home {
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, 0.68);
  --ink-3: rgba(255, 255, 255, 0.42);
  --blue: #9FC0FF;
  --mint: #5EEAD4;
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.06);
  margin: 0; height: 100vh; height: 100dvh; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  position: relative;
  font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 640px at 12% 8%, rgba(47, 82, 159, 0.55), transparent 62%),
    radial-gradient(760px 520px at 92% 92%, rgba(15, 181, 168, 0.18), transparent 60%),
    linear-gradient(150deg, #071437 0%, #0B1F4A 55%, #061026 100%);
}
/* The same hairline grid as the sign-in panel, drifting slowly. */
.acp-home::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 50%, rgba(0, 0, 0, 0.7), transparent);
  mask-image: radial-gradient(75% 70% at 50% 50%, rgba(0, 0, 0, 0.7), transparent);
  animation: acp-auth-grid 60s linear infinite;
}
.acp-home-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.acp-home .acp-auth-orb { z-index: 0; }

/* One slow band of light passes down the page, like a scan. */
.acp-home-scan {
  position: absolute; inset-inline: 0; height: 160px; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(94, 234, 212, 0.05) 45%, rgba(159, 192, 255, 0.05) 55%, transparent);
  animation: acp-home-scan 11s linear infinite;
}

.acp-home-in {
  animation: acp-home-rise 760ms cubic-bezier(.22, .7, .3, 1) both;
  animation-delay: var(--d, 0s);
}

/* ------------------------------------------------------------- header */
/* Header, stage and footer share one centred column, so the logo, the
   headline, the status pill and the visual all stand on the same two
   edges whatever the screen width. */
.acp-home-top, .acp-home-stage, .acp-home-foot {
  width: 100%; max-width: 1340px; margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}
.acp-home-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: clamp(16px, 2.6vh, 28px);
}
.acp-home-logo { height: clamp(26px, 3.4vh, 34px); width: auto; display: block; }
.acp-home-status {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px 7px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; white-space: nowrap;
}
.acp-home-status-dot {
  position: relative; width: 8px; height: 8px; border-radius: 999px; background: #34D399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
}
.acp-home-status-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 999px;
  border: 1.5px solid rgba(52, 211, 153, 0.7);
  animation: acp-home-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

/* -------------------------------------------------------------- stage */
.acp-home-stage {
  position: relative; z-index: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center; gap: clamp(24px, 5vw, 80px);
}
.acp-home-copy { display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 24px); min-width: 0; }

.acp-home-eyebrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.35); background: rgba(94, 234, 212, 0.08);
  color: var(--mint); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.acp-home-eyebrow i { font-size: 14px; }

.acp-home-title {
  margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.04;
  font-size: clamp(30px, 4.5vw, 60px);
}
/* The last words change: a stack of lines, one line tall, stepping up. */
.acp-home-rotate {
  display: inline-grid; height: 1.12em; overflow: hidden; vertical-align: bottom;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}
.acp-home-words {
  display: flex; flex-direction: column;
  animation: acp-home-words 12s cubic-bezier(.77, 0, .18, 1) infinite;
}
.acp-home-words span {
  height: 1.12em; line-height: 1.12em; white-space: nowrap;
  background: linear-gradient(90deg, var(--blue), var(--mint));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.acp-home-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.acp-home-lead {
  margin: 0; max-width: 560px;
  font-size: clamp(14.5px, 1.15vw, 17px); line-height: 1.65; color: var(--ink-2);
}

/* The products, as chips that lift and take one pass of light under the pointer. */
.acp-home-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.acp-home-pills li {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: transform 220ms ease, border-color 220ms ease, color 220ms ease;
}
.acp-home-pills li i { font-size: 15px; color: var(--blue); }
.acp-home-pills li:hover { transform: translateY(-2px); border-color: rgba(159, 192, 255, 0.45); color: var(--ink); }
.acp-home-pills li::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, 0.12) 50%, transparent 64%);
  transform: translateX(-130%);
  animation: acp-home-shimmer 7s ease-in-out infinite;
  animation-delay: calc(var(--d, 0s) * 3);
}

.acp-home-progress { display: flex; flex-direction: column; gap: 10px; }
.acp-home-track {
  position: relative; width: min(320px, 70vw); height: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.10); overflow: hidden;
}
.acp-home-bar {
  position: absolute; inset-block: 0; width: 42%; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--mint), transparent);
  animation: acp-home-sweep 2.2s cubic-bezier(.65, 0, .35, 1) infinite;
}
.acp-home-progress-note { font-size: 12.5px; color: var(--ink-3); }
.acp-home-progress-note a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.acp-home-progress-note a:hover { color: var(--ink); border-color: var(--blue); }

/* ------------------------------------------------------------- visual */
.acp-home-visual { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2vh, 22px); min-width: 0; }

.acp-home-core {
  position: relative; width: min(100%, 36vh, 380px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.acp-home-ring { position: absolute; border-radius: 999px; }
.acp-home-ring-1 { inset: 0; border: 1px dashed rgba(159, 192, 255, 0.45); animation: acp-home-spin 30s linear infinite; }
.acp-home-ring-2 { inset: 11%; border: 2px dotted rgba(94, 234, 212, 0.38); animation: acp-home-spin 20s linear infinite reverse; }
.acp-home-ring-3 { inset: 22%; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 40px rgba(76, 123, 224, 0.18); }
/* The radar: a wedge of light sweeping once round every few seconds. */
.acp-home-sweep {
  position: absolute; inset: 5%; border-radius: 999px;
  background: conic-gradient(from 0deg, rgba(94, 234, 212, 0.30), rgba(94, 234, 212, 0.06) 22%, transparent 30%);
  -webkit-mask-image: radial-gradient(circle, transparent 30%, #000 31%, #000 100%);
  mask-image: radial-gradient(circle, transparent 30%, #000 31%, #000 100%);
  animation: acp-home-spin 4.6s linear infinite;
}
.acp-home-orbit { position: absolute; border-radius: 999px; }
.acp-home-orbit-1 { inset: 0; animation: acp-home-spin 14s linear infinite; }
.acp-home-orbit-2 { inset: 11%; animation: acp-home-spin 9s linear infinite reverse; }
.acp-home-orbit i {
  position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 999px;
  background: var(--blue); box-shadow: 0 0 14px var(--blue);
}
.acp-home-orbit-2 i { background: var(--mint); box-shadow: 0 0 14px var(--mint); width: 7px; height: 7px; }

.acp-home-shield {
  position: relative; width: 34%; aspect-ratio: 64 / 72; z-index: 1;
  filter: drop-shadow(0 0 22px rgba(76, 123, 224, 0.55));
  animation: acp-home-breathe 5s ease-in-out infinite;
}
.acp-home-shield svg { display: block; }

/* Three notes float around the core, each on its own gentle bob. */
.acp-home-tag {
  position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(7, 20, 55, 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  animation: acp-home-float 5.4s ease-in-out infinite alternate;
}
.acp-home-tag i { font-size: 13px; color: var(--mint); }
.acp-home-tag-1 { top: 9%; left: -6%; }
.acp-home-tag-2 { top: 44%; right: -12%; animation-delay: -1.8s; }
.acp-home-tag-2 i { color: var(--blue); }
.acp-home-tag-3 { bottom: 8%; left: 2%; animation-delay: -3.6s; }

/* The build log: a small glass terminal that types what is being assembled. */
.acp-home-console {
  width: min(100%, 440px); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(7, 20, 55, 0.62);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.acp-home-console-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}
.acp-home-console-bar span { width: 9px; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); }
.acp-home-console-bar span:nth-child(1) { background: rgba(251, 113, 133, 0.7); }
.acp-home-console-bar span:nth-child(2) { background: rgba(251, 191, 36, 0.55); }
.acp-home-console-bar span:nth-child(3) { background: rgba(52, 211, 153, 0.7); }
.acp-home-console-bar em {
  margin-left: 8px; font-style: normal; font-size: 11.5px; color: var(--ink-3);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.acp-home-console-body {
  margin: 0; padding: 12px 14px 14px; min-height: calc(7 * 1.7 * 12.5px + 26px);
  font: 500 12.5px/1.7 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(255, 255, 255, 0.78); white-space: pre-wrap; text-align: left; overflow: hidden;
}
.acp-home-console-body::after {
  content: '\258D'; margin-left: 2px; color: var(--mint);
  animation: acp-home-blink 1s steps(1) infinite;
}

/* ------------------------------------------------------------- footer */
.acp-home-foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding-bottom: clamp(14px, 2.4vh, 24px);
  font-size: 12px; color: var(--ink-3); text-align: center;
}
/* On one line the two notes sit on the column's edges and need no dot
   between them; once they wrap they centre and the dot returns. */
.acp-home-foot-sep { display: none; }
@media (max-width: 900px) {
  .acp-home-foot { justify-content: center; }
  .acp-home-foot-sep { display: inline; opacity: .6; }
}

/* -------------------------------------------------------------- motion */
@keyframes acp-home-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes acp-home-words {
  0%, 17%   { transform: translateY(0); }
  20%, 37%  { transform: translateY(-20%); }
  40%, 57%  { transform: translateY(-40%); }
  60%, 77%  { transform: translateY(-60%); }
  80%, 100% { transform: translateY(-80%); }
}
@keyframes acp-home-spin { to { transform: rotate(360deg); } }
@keyframes acp-home-breathe {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 18px rgba(76, 123, 224, 0.45)); }
  50%      { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(94, 234, 212, 0.55)); }
}
@keyframes acp-home-float {
  from { transform: translateY(-5px); }
  to   { transform: translateY(6px); }
}
@keyframes acp-home-ping {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}
@keyframes acp-home-sweep {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}
@keyframes acp-home-scan {
  from { transform: translateY(-160px); }
  to   { transform: translateY(100vh); }
}
@keyframes acp-home-shimmer {
  0%, 74%   { transform: translateX(-130%); }
  90%, 100% { transform: translateX(130%); }
}
@keyframes acp-home-blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------- fitting */
/* Everything must fit one screen. Narrower: one column, the visual
   goes. Shorter: the pieces that cost height go first. */
@media (max-width: 900px) {
  .acp-home-stage { grid-template-columns: 1fr; text-align: center; align-content: center; }
  .acp-home-copy { align-items: center; }
  .acp-home-eyebrow { align-self: center; }
  .acp-home-pills { justify-content: center; }
  .acp-home-visual { display: none; }
  .acp-home-lead { max-width: 620px; }
}
@media (max-width: 560px) {
  .acp-home-status { display: none; }
  .acp-home-title { font-size: clamp(28px, 9vw, 40px); }
}
@media (max-height: 700px) and (min-width: 901px) {
  .acp-home-console { display: none; }
  .acp-home-core { width: min(100%, 44vh, 340px); }
}
@media (max-height: 620px) {
  .acp-home-pills { display: none; }
  .acp-home-lead { display: none; }
}
@media (max-height: 520px) {
  .acp-home-visual { display: none; }
  .acp-home-stage { grid-template-columns: 1fr; text-align: center; }
  .acp-home-copy { align-items: center; }
  .acp-home-eyebrow { align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .acp-home::after, .acp-home-scan, .acp-home-status-dot::after, .acp-home-words,
  .acp-home-ring, .acp-home-sweep, .acp-home-orbit, .acp-home-shield, .acp-home-tag,
  .acp-home-bar, .acp-home-pills li::after, .acp-home-console-body::after { animation: none; }
  .acp-home-in { animation: none; opacity: 1; transform: none; }
  .acp-home-bar { width: 100%; opacity: .5; }
  .acp-home-sweep { display: none; }
  .acp-home-pills li { transition: none; }
}

/* ------------------------------------------------- the assistant panel */
/* The drawer itself is Metronic's. These are the pieces inside it that
   turn an answer into something you can click rather than only read. */

/* A starter question: a full-width row, not a pill, so four of them read
   as a list of things to try. */
.acp-chat-seed {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--foreground);
  font-size: 13px; text-align: start; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.acp-chat-seed:hover {
  background: var(--accent); border-color: var(--input); transform: translateX(2px);
}
.acp-chat-seed > span { flex: 1 1 auto; min-width: 0; }
.acp-chat-seed > i { color: var(--muted-foreground); font-size: 14px; flex: 0 0 auto; }
.acp-chat-seed-go { opacity: 0; transition: opacity .16s ease; font-size: 11px; }
.acp-chat-seed:hover .acp-chat-seed-go { opacity: .7; }

/* The compose box reads as one field with the button inside it. */
.acp-chat-compose {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--input); border-radius: 12px;
  background: var(--background);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.acp-chat-compose:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 14%, transparent);
}

/* A turn. The question sits right, the answer left and full width, because
   an answer carries lists and links and a bubble would crop them. */
.acp-chat-turn { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.acp-chat-ask {
  align-self: flex-end; max-width: 85%;
  padding: 8px 12px; border-radius: 12px 12px 3px 12px;
  background: var(--primary); color: var(--primary-foreground);
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.acp-chat-reply { display: flex; gap: 9px; align-items: flex-start; }
.acp-chat-reply-body {
  flex: 1 1 auto; min-width: 0;
  font-size: 13px; line-height: 1.6; color: var(--foreground);
}
.acp-chat-reply-body > * + * { margin-top: 8px; }
/* Metronic's reset takes the markers off every list, and a list of
   records without them reads as loose sentences. */
.acp-chat-reply-body ul, .acp-chat-reply-body ol { margin: 0; padding-inline-start: 18px; }
.acp-chat-reply-body ul { list-style: disc outside; }
.acp-chat-reply-body ol { list-style: decimal outside; }
.acp-chat-reply-body li::marker { color: var(--muted-foreground); }
.acp-chat-reply-body li { margin: 3px 0; }
.acp-chat-reply-body strong { font-weight: 600; color: var(--mono); }
.acp-chat-reply-body table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.acp-chat-reply-body th, .acp-chat-reply-body td {
  padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: start;
}
.acp-chat-reply-body th { background: var(--muted); font-weight: 600; }
.acp-chat-reply-body tr:last-child td { border-bottom: 0; }

/* Records the answer named, that exist. Clicking opens the record. */
.acp-chat-links { display: flex; flex-wrap: wrap; gap: 6px; }
.acp-chat-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 11.5px; color: var(--foreground); text-decoration: none;
  background: var(--background);
  transition: border-color .16s ease, background-color .16s ease;
}
.acp-chat-link:hover { border-color: var(--primary); background: var(--accent); }
.acp-chat-link i { font-size: 11px; color: var(--muted-foreground); }

/* What to ask next. These are buttons; clicking asks. */
.acp-chat-next { display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.acp-chat-next-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted-foreground);
}
.acp-chat-ask-next {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 6px 10px; border: 1px dashed var(--input); border-radius: 9px;
  background: transparent; color: var(--foreground);
  font-size: 12.5px; text-align: start; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.acp-chat-ask-next:hover { background: var(--accent); border-style: solid; border-color: var(--primary); }
.acp-chat-ask-next > span { flex: 1 1 auto; min-width: 0; }
.acp-chat-ask-next > i { font-size: 11px; color: var(--muted-foreground); flex: 0 0 auto; }

/* Three dots while it thinks. */
.acp-chat-wait { display: inline-flex; gap: 4px; align-items: center; padding: 6px 0; }
.acp-chat-wait span {
  width: 5px; height: 5px; border-radius: 999px; background: var(--muted-foreground);
  animation: acp-chat-blink 1.3s ease-in-out infinite;
}
.acp-chat-wait span:nth-child(2) { animation-delay: .18s; }
.acp-chat-wait span:nth-child(3) { animation-delay: .36s; }
@keyframes acp-chat-blink {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(-2px); }
}

/* The panel width lives here rather than as an arbitrary Tailwind class:
   the Metronic bundle is prebuilt, so w-[440px] would compile to nothing. */
#am_chat_panel { width: 440px; }
@media (max-width: 520px) {
  #am_chat_panel { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .acp-chat-seed, .acp-chat-ask-next, .acp-chat-link, .acp-chat-compose { transition: none; }
  .acp-chat-seed:hover { transform: none; }
  .acp-chat-wait span { animation: none; opacity: .6; }
}

/* ------------------------------------------------ country restriction */
/* A checkbox per country, filterable, in a box that scrolls rather than a
   list that runs the page off the screen. Metronic has no picker for a
   249-item set, and a free-text field of ISO codes is what this replaces. */
.acp-country-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px 12px; max-height: 300px; overflow-y: auto;
  padding: 8px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--background);
}
.acp-country-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 7px; font-size: 13px; cursor: pointer;
  color: var(--foreground);
}
.acp-country-item:hover { background: var(--accent); }
.acp-country-item.hidden { display: none; }
.acp-country-item .acp-code { font-size: 11px; opacity: .7; }
.acp-country-item:has(input:checked) { background: color-mix(in oklab, var(--primary) 10%, transparent); }

/* Two utilities the prebuilt Metronic bundle does not carry, used by the
   two-factor and API-key pages: click-to-select for a code the person must
   copy whole, and an ordered list that actually shows its numbers. */
.acp-select-all { user-select: all; -webkit-user-select: all; }
.acp-list-decimal { list-style: decimal outside; padding-inline-start: 1.25rem; }

/* ---------------------------------------------- white-label logo swap */
/* A customer's own logo in the product header, in the variant that suits
   the theme. Two images, one shown; the theme class sits on <html>. */
.acp-logo-dark { display: none; }
.dark .acp-logo-light { display: none; }
.dark .acp-logo-dark { display: inline-block; }
/* The customer's logo in the product header: capped so a tall square mark
   and a wide wordmark both sit in the 58px bar without pushing it about. */
.acp-header-logo { height: 24px; width: auto; max-width: 140px; object-fit: contain; }

/* ------------------------------------------------- asset label (public) */
/* The page a sticker's QR code opens. Standalone: it loads only this file,
   so it carries its own layout. Brand colour comes from the customer. */
.acp-label {
  margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; box-sizing: border-box;
  font-family: Nunito, ui-sans-serif, system-ui, sans-serif; color: #071437;
  background: linear-gradient(160deg, color-mix(in oklab, var(--brand) 12%, #f5f7fb), #eef1f7);
}
.acp-label * { box-sizing: border-box; }
.acp-label-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 18px;
  padding: 26px 26px 20px; box-shadow: 0 18px 50px -20px rgba(7, 20, 55, .35);
  border-top: 6px solid var(--brand);
}
.acp-label-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.acp-label-logo { height: 40px; width: auto; max-width: 120px; object-fit: contain; }
.acp-label-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 16px;
}
.acp-label-owner { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #6b7280; }
.acp-label-customer { font-size: 16px; font-weight: 700; }
.acp-label-tag { font-size: 30px; font-weight: 800; letter-spacing: -.5px; color: var(--brand); font-variant-numeric: tabular-nums; }
.acp-label-name { font-size: 16px; font-weight: 600; margin: 2px 0 14px; }
.acp-label-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; font-size: 13px; }
.acp-label-facts dt { color: #6b7280; }
.acp-label-facts dd { margin: 0; font-weight: 600; }
.acp-label-note { font-size: 13px; line-height: 1.55; color: #374151; margin: 0; padding-top: 14px; border-top: 1px solid #e5e7eb; }
.acp-label-note a { color: var(--brand); font-weight: 600; text-decoration: none; }
.acp-label-foot { margin-top: 16px; font-size: 11px; color: #9ca3af; text-align: center; }

/* ------------------------------------------------- asset sticker (print) */
/* Labels laid out for a sheet: 62mm x 29mm each, the common address-label
   size, and nothing but the labels reaches the printer. */
.acp-sticker-sheet { display: flex; flex-wrap: wrap; gap: 10px; }
.acp-sticker {
  width: 62mm; height: 29mm; display: flex; gap: 3mm; align-items: center;
  padding: 2.5mm; border: 1px dashed var(--border); border-radius: 6px; background: #fff; color: #000;
  page-break-inside: avoid; break-inside: avoid;
}
.acp-sticker-qr { width: 24mm; height: 24mm; flex: 0 0 auto; }
.acp-sticker-text { min-width: 0; flex: 1 1 auto; line-height: 1.15; }
.acp-sticker-logo { height: 5mm; width: auto; max-width: 28mm; object-fit: contain; display: block; margin-bottom: 1mm; }
.acp-sticker-owner { font-size: 7pt; text-transform: uppercase; letter-spacing: .3pt; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acp-sticker-tag { font-size: 13pt; font-weight: 800; letter-spacing: -.2pt; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acp-sticker-name { font-size: 7.5pt; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acp-sticker-model { font-size: 6.5pt; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acp-sticker-hint { font-size: 6pt; color: #666; margin-top: 1mm; }

@media print {
  .acp-no-print, header, #sidebar, .kt-drawer, nav, [data-kt-drawer], #am_chat_panel { display: none !important; }
  body, html { background: #fff !important; overflow: visible !important; }
  .acp-sticker-sheet { gap: 0; }
  .acp-sticker { border-color: transparent; }
  main, .kt-container-fluid, [class*="lg:overflow-hidden"] { overflow: visible !important; padding: 0 !important; margin: 0 !important; }
}

/* ------------------------------------------------- workspace search */
/* The product's search box: suggestions grouped by register, one row
   lit at a time for the keyboard, the typed text marked inside each. */
.acp-kbd {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--input); background: var(--muted);
  font: 600 10.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--secondary-foreground); vertical-align: middle;
}
.acp-search-hint { padding: 28px 20px; text-align: center; font-size: 13px; color: var(--muted-foreground); }
.acp-search-group + .acp-search-group { border-top: 1px solid var(--border); }
.acp-search-group-label {
  display: flex; align-items: center; gap: 6px; padding: 10px 16px 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted-foreground);
}
.acp-search-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 16px;
  color: inherit; text-decoration: none; border-left: 2px solid transparent;
}
.acp-search-item[aria-selected="true"], .acp-search-item:hover { background: var(--accent); border-left-color: var(--primary); }
.acp-search-all { border-top: 1px solid var(--border); }
.acp-search-hl { background: transparent; color: var(--primary); font-weight: 700; }
.acp-search-body { max-height: 60vh; }

/* ------------------------------------------------ the wide sidebar */
/* Stock demo3 keeps the sidebar to icons. The operator can widen it to
   show the names; the choice lives on the <html> class, set before paint
   from localStorage, so nothing jumps. */
/* The toggle sits under the icons, in the same column, not beside them:
   the sidebar body stacks its two children top to bottom. */
#sidebar_content { flex-direction: column; }
@media (min-width: 1024px) { #sidebar_items { max-height: calc(100dvh - 124px) !important; } }
.acp-sidebar-foot { padding-top: 10px; border-top: 1px solid var(--border); margin: 0 10px; }
.acp-sidebar-label { display: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
html.am-sidebar-wide body { --sidebar-width: 224px; }
html.am-sidebar-wide #sidebar_items { align-items: stretch; padding: 0 12px; }
html.am-sidebar-wide #sidebar a.acp-sidebar-item {
  width: auto; height: 40px; border-radius: 10px; justify-content: flex-start; gap: 10px; padding: 0 12px;
}
html.am-sidebar-wide #sidebar a.acp-sidebar-item .acp-sidebar-label { display: inline; }
html.am-sidebar-wide #sidebar .kt-tooltip { display: none !important; }
html.am-sidebar-wide #am_sidebar_toggle { background: var(--background); border-color: var(--input); }
html.am-sidebar-wide #am_sidebar_toggle i { color: var(--primary); }
@media (max-width: 1023px) { .acp-sidebar-foot { display: none; } }
