/* ---------------------------------------------------------------------------------------------
   Template chrome: site header/footer, home sections, documentation pages, admin shell, layouts.
   Uses only the --wt-* tokens from theme.css, so it works with every stack.
   --------------------------------------------------------------------------------------------- */
@layer components {
  html, body { overflow-x: clip; }
  img { max-width: 100%; height: auto; }   /* the own stacks get this from ui-base; Bootstrap reboot does not set it */
  body { font-family: var(--wt-font-body); color: var(--wt-text); background-color: var(--wt-bg); }
  .wt-container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(1rem, 3vw, 1.5rem); }
  .wt-muted { color: var(--wt-muted); }
  .wt-eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; font-size: .8rem; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--wt-primary); background: rgba(var(--wt-primary-rgb), .1); border-radius: 50rem; }
  .wt-gradient-text { background: var(--wt-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
  .wt-section { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
  .wt-section-sm { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
  .wt-section-title { max-width: 720px; margin-inline: auto; margin-bottom: clamp(2rem, 5vw, 3.25rem); text-align: center; }
  .wt-section-title h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); margin-bottom: .75rem; }
  .wt-section-title p { color: var(--wt-muted); font-size: 1.075rem; margin: 0; }
  .wt-surface { background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); }
  .wt-shadow { box-shadow: var(--wt-shadow); }
  .wt-icon-badge { display: inline-grid; place-items: center; width: 3rem; height: 3rem; font-size: 1.35rem; color: var(--wt-primary);
    background: rgba(var(--wt-primary-rgb), .1); border-radius: calc(var(--wt-radius-lg) * .8); flex-shrink: 0; }
  .wt-icon-badge.is-accent { color: var(--wt-accent); background: rgba(var(--wt-accent-rgb), .12); }
  .wt-icon-badge.is-solid { color: var(--wt-on-primary); background: var(--wt-gradient); }
  .wt-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
  .wt-avatar-sm { width: 2rem; height: 2rem; }
  .wt-avatar-lg { width: 3.5rem; height: 3.5rem; }
  .wt-avatar-stack { display: flex; }
  .wt-avatar-stack > * { margin-inline-start: -.6rem; border: 2px solid var(--wt-surface); }
  .wt-avatar-stack > :first-child { margin-inline-start: 0; }
  .wt-logo-mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; color: var(--wt-on-primary); background: var(--wt-gradient);
    border-radius: calc(var(--wt-radius) + .2rem); font-size: 1.05rem; box-shadow: 0 6px 16px rgba(var(--wt-primary-rgb), .35); }
  .wt-skip { position: absolute; inset-inline-start: 1rem; top: -3rem; z-index: 2000; padding: .5rem 1rem; color: var(--wt-on-primary); background: var(--wt-primary);
    border-radius: var(--wt-radius); text-decoration: none; transition: top .15s; }
  .wt-skip:focus { top: 1rem; }

  /* ---------------- site header */
  .wt-header { position: sticky; top: 0; z-index: 1030; background: color-mix(in srgb, var(--wt-bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--wt-border) 70%, transparent); }
  .wt-header .navbar { padding-block: .75rem; }
  .wt-header .nav-link { font-weight: 500; padding-inline: .8rem !important; border-radius: var(--wt-radius); }
  .wt-header .nav-link:hover { color: var(--wt-primary); }
  .wt-header .nav-link.active { color: var(--wt-primary); }
  .wt-header-tools { display: flex; align-items: center; gap: .5rem; }
  .wt-icon-btn { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; color: var(--wt-text); background: transparent;
    border: 1px solid var(--wt-border); border-radius: calc(var(--wt-radius) + .15rem); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
  .wt-icon-btn:hover { color: var(--wt-primary); border-color: rgba(var(--wt-primary-rgb), .4); background: rgba(var(--wt-primary-rgb), .06); }
  @media (max-width: 420px) { .wt-header .navbar-brand { font-size: 1rem; gap: .4rem; margin-inline-end: .5rem; } .wt-header .wt-logo-mark { width: 1.8rem; height: 1.8rem; font-size: .95rem; } }
  .wt-mode { display: inline-flex; align-items: center; gap: .25rem; }
  .wt-mode .wt-mode-more { width: 2rem; font-size: .85rem; }
  .wt-mode-menu { min-width: 12rem; }
  .wt-mode-menu .dropdown-item { display: flex; align-items: center; gap: .6rem; }
  .wt-mode-menu .dropdown-item.active { color: var(--wt-on-primary); background: var(--wt-primary); }
  .wt-announce { padding: .5rem 1rem; text-align: center; font-size: .875rem; color: var(--wt-on-primary); background: var(--wt-gradient); }
  .wt-announce a { color: inherit; font-weight: 600; }

  /* ---------------- hero and home sections */
  .wt-hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 10vw, 8rem) clamp(3.5rem, 8vw, 6rem); isolation: isolate; }
  .wt-hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); line-height: 1.05; letter-spacing: -.03em; margin-bottom: 1.25rem; }
  .wt-hero .lead { color: var(--wt-muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 40rem; }
  .wt-hero-visual { position: relative; border-radius: calc(var(--wt-radius-lg) * 1.2); overflow: hidden; box-shadow: var(--wt-shadow-lg); border: 1px solid var(--wt-border); background: var(--wt-surface); }
  .wt-hero-visual img { display: block; width: 100%; height: auto; }
  .wt-floating-card { position: absolute; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--wt-surface); border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-lg); box-shadow: var(--wt-shadow-lg); font-size: .9rem; }
  .wt-hero-glow { position: absolute; z-index: -1; width: 42rem; height: 42rem; border-radius: 50%; filter: blur(80px); opacity: .35; pointer-events: none;
    background: radial-gradient(circle, rgba(var(--wt-primary-rgb), .7), transparent 65%); }
  .wt-trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(1.5rem, 5vw, 3.5rem); opacity: .75; }
  .wt-trust img { height: 2rem; width: auto; filter: grayscale(1); opacity: .8; }
  .wt-feature { height: 100%; padding: 1.75rem; background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
  .wt-feature:hover { transform: translateY(-4px); box-shadow: var(--wt-shadow); border-color: rgba(var(--wt-primary-rgb), .35); }
  .wt-feature h3 { font-size: 1.15rem; margin: 1.1rem 0 .5rem; }
  .wt-feature p { color: var(--wt-muted); margin: 0; }
  .wt-stat { text-align: center; }
  .wt-stat strong { display: block; font-family: var(--wt-font-heading); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em; }
  .wt-stat span { color: var(--wt-muted); }
  .wt-price { position: relative; height: 100%; padding: 2rem; background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); display: flex; flex-direction: column; }
  .wt-price.is-featured { border: 2px solid var(--wt-primary); box-shadow: 0 20px 50px rgba(var(--wt-primary-rgb), .18); }
  .wt-price .wt-price-amount { font-family: var(--wt-font-heading); font-size: 2.75rem; font-weight: 800; letter-spacing: -.03em; }
  .wt-price ul { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; display: grid; gap: .6rem; }
  .wt-price li { display: flex; gap: .55rem; align-items: flex-start; }
  .wt-price li .bi { color: var(--wt-primary); margin-top: .2rem; }
  .wt-quote { height: 100%; padding: 1.75rem; background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); }
  .wt-quote blockquote { font-size: 1.05rem; margin: 1rem 0 1.25rem; }
  .wt-stars { color: #f5a524; letter-spacing: .1em; }
  .wt-cta { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 4.5rem); color: var(--wt-on-primary); background: var(--wt-gradient); border-radius: calc(var(--wt-radius-lg) * 1.3); isolation: isolate; }
  .wt-cta::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 28rem; height: 28rem; border-radius: 50%; background: rgba(255, 255, 255, .12); z-index: -1; }
  .wt-cta p { opacity: .9; }
  .wt-faq .accordion-button { font-size: 1.02rem; }
  .wt-media-card { overflow: hidden; height: 100%; background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); transition: box-shadow .25s, transform .25s; }
  .wt-media-card:hover { box-shadow: var(--wt-shadow); transform: translateY(-3px); }
  .wt-media-card > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
  .wt-media-card .wt-media-body { padding: 1.25rem; }
  .wt-steps { counter-reset: step; display: grid; gap: 1.25rem; }
  .wt-step { position: relative; padding-inline-start: 3.5rem; }
  .wt-step::before { counter-increment: step; content: counter(step); position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
    font-weight: 700; color: var(--wt-primary); background: rgba(var(--wt-primary-rgb), .12); border-radius: 50%; }
  .wt-bento { display: grid; gap: 1rem; grid-template-columns: repeat(1, minmax(0, 1fr)); }
  @media (min-width: 768px) { .wt-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(12rem, auto); } .wt-bento .is-wide { grid-column: span 2; } .wt-bento .is-tall { grid-row: span 2; } }
  .wt-bento > * { padding: 1.5rem; background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); overflow: hidden; position: relative; }
  .wt-masonry { columns: 1; column-gap: 1.25rem; }
  @media (min-width: 576px) { .wt-masonry { columns: 2; } }
  @media (min-width: 992px) { .wt-masonry { columns: 3; } }
  .wt-masonry > * { break-inside: avoid; margin-bottom: 1.25rem; }
  .wt-snap { scroll-snap-type: y proximity; }
  .wt-snap > section { min-height: 100vh; min-height: 100svh; scroll-snap-align: start; display: flex; align-items: center; }
  .wt-split { display: grid; min-height: calc(100vh - 4.5rem); }
  @media (min-width: 992px) { .wt-split { grid-template-columns: 1fr 1fr; } }
  .wt-split > * { padding: clamp(2rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: center; }
  .wt-split-brand { color: var(--wt-on-primary); background: var(--wt-gradient); position: relative; overflow: hidden; isolation: isolate; }
  .wt-z-row { display: grid; gap: 2rem; align-items: center; }
  @media (min-width: 992px) { .wt-z-row { grid-template-columns: 1fr 1fr; gap: 4rem; } .wt-z-row.is-reverse > :first-child { order: 2; } }

  /* ---------------- footer */
  .wt-footer { padding-block: 3.5rem 2rem; border-top: 1px solid var(--wt-border); background: var(--wt-surface); }
  .wt-footer h4 { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wt-muted); margin-bottom: 1rem; }
  .wt-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
  .wt-footer a { color: var(--wt-text); text-decoration: none; opacity: .85; }
  .wt-footer a:hover { color: var(--wt-primary); opacity: 1; }
  .wt-footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--wt-border); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: var(--wt-muted); font-size: .9rem; }
  .wt-social { display: flex; gap: .5rem; }
  .wt-to-top { position: fixed; inset-inline-end: 1.25rem; bottom: 1.25rem; z-index: 1020; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s;
    background: var(--wt-surface); box-shadow: var(--wt-shadow); }
  .wt-to-top.show { opacity: 1; transform: none; pointer-events: auto; }

  /* ---------------- documentation pages */
  .wt-docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 2rem 4rem; }
  @media (min-width: 992px) { .wt-docs { grid-template-columns: 17rem minmax(0, 1fr); } }
  @media (min-width: 1400px) { .wt-docs { grid-template-columns: 17rem minmax(0, 1fr) 13rem; } }
  .wt-docs-nav { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto; padding-inline-end: .5rem; font-size: .925rem; }
  @media (max-width: 991.98px) { .wt-docs-nav { position: static; max-height: none; } .wt-docs-nav-wrap { display: none; } .wt-docs-nav-wrap.show { display: block; } }
  .wt-docs-nav h6 { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 .4rem; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wt-muted); }
  .wt-docs-nav ul { list-style: none; padding: 0; margin: 0; }
  .wt-docs-nav a { display: block; padding: .3rem .7rem; color: var(--wt-text); text-decoration: none; border-radius: var(--wt-radius); opacity: .85; }
  .wt-docs-nav a:hover { opacity: 1; background: rgba(var(--wt-primary-rgb), .07); }
  .wt-docs-nav a.active { opacity: 1; color: var(--wt-primary); font-weight: 600; background: rgba(var(--wt-primary-rgb), .1); }
  .wt-docs-head { padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--wt-border); }
  .wt-docs-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); display: flex; align-items: center; gap: .75rem; }
  .wt-docs-head p { color: var(--wt-muted); font-size: 1.075rem; max-width: 52rem; margin: 0; }
  .wt-toc { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto; font-size: .85rem; display: none; }
  @media (min-width: 1400px) { .wt-toc { display: block; } }
  .wt-toc h6 { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wt-muted); }
  .wt-toc a { display: block; padding: .2rem 0 .2rem .75rem; color: var(--wt-muted); text-decoration: none; border-inline-start: 2px solid var(--wt-border); }
  .wt-toc a:hover, .wt-toc a.active { color: var(--wt-primary); border-inline-start-color: var(--wt-primary); }
  .wt-example { margin-bottom: 2.75rem; scroll-margin-top: 5.5rem; }
  .wt-example-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
  .wt-example-head h2 { font-size: 1.2rem; margin: 0; display: flex; gap: .6rem; align-items: baseline; }
  .wt-example-head h2 .wt-num { font-size: .78rem; font-weight: 700; color: var(--wt-primary); background: rgba(var(--wt-primary-rgb), .1); border-radius: 50rem; padding: .15rem .55rem; }
  .wt-example-head p { flex-basis: 100%; margin: 0; color: var(--wt-muted); font-size: .95rem; }
  .wt-example-tabs { display: inline-flex; padding: .2rem; background: var(--wt-surface-2); border: 1px solid var(--wt-border); border-radius: calc(var(--wt-radius) + .2rem); }
  .wt-example-tabs button { padding: .3rem .8rem; font-size: .85rem; font-weight: 600; color: var(--wt-muted); background: transparent; border: 0; border-radius: var(--wt-radius); cursor: pointer; }
  .wt-example-tabs button.active { color: var(--wt-text); background: var(--wt-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
  .wt-example-preview { position: relative; padding: clamp(1rem, 3vw, 1.75rem); background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); overflow-x: auto; }
  .wt-example-preview::after { display: block; clear: both; content: ""; }
  .wt-example-code, .wt-code { position: relative; border-radius: var(--wt-radius-lg); background: #0f1420; border: 1px solid #1f2737; }
  .wt-example-code pre, .wt-code pre { margin: 0; padding: 1.25rem; max-height: 32rem; overflow: auto; color: #d7dde8; font-size: .82rem; line-height: 1.65; }
  .wt-example-code code, .wt-code code { color: inherit; white-space: pre; }
  .wt-copy { position: absolute; top: .6rem; inset-inline-end: .6rem; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; font-size: .78rem; font-weight: 600;
    color: #d7dde8; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--wt-radius); cursor: pointer; }
  .wt-copy:hover { background: rgba(255, 255, 255, .16); }
  .wt-tag-t { color: #7cc4ff; } .wt-tag-a { color: #c7a6ff; } .wt-tag-v { color: #9be3a0; } .wt-tag-c { color: #6b778c; }
  .wt-pagenav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--wt-border); }
  .wt-pagenav a { display: flex; flex-direction: column; padding: .85rem 1.1rem; border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); text-decoration: none; color: var(--wt-text); min-width: 0; }
  .wt-pagenav a:hover { border-color: var(--wt-primary); }
  .wt-pagenav small { color: var(--wt-muted); }
  .wt-index-card { display: flex; gap: 1rem; align-items: flex-start; height: 100%; padding: 1.15rem; color: var(--wt-text); text-decoration: none; background: var(--wt-surface);
    border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); transition: border-color .2s, transform .2s, box-shadow .2s; }
  .wt-index-card:hover { border-color: rgba(var(--wt-primary-rgb), .5); transform: translateY(-2px); box-shadow: var(--wt-shadow); color: var(--wt-text); }
  .wt-index-card h3 { font-size: 1rem; margin: 0 0 .2rem; }
  .wt-index-card p { margin: 0; font-size: .875rem; color: var(--wt-muted); }
  .wt-fx-tile { display: grid; place-items: center; min-height: 15rem; padding: 1.5rem; overflow: hidden; position: relative; background: var(--wt-surface-2); border-radius: var(--wt-radius-lg); }
  .wt-layout-demo { border: 1px dashed rgba(var(--wt-primary-rgb), .4); border-radius: var(--wt-radius-lg); padding: 1rem; background: rgba(var(--wt-primary-rgb), .03); }
  .wt-block { display: grid; place-items: center; min-height: 4rem; padding: 1rem; font-size: .85rem; font-weight: 600; color: var(--wt-primary); text-align: center;
    background: rgba(var(--wt-primary-rgb), .08); border: 1px solid rgba(var(--wt-primary-rgb), .2); border-radius: var(--wt-radius); }
  .demo-calendar-table { width: 100%; margin: 0; text-align: center; table-layout: fixed; }
  .demo-calendar-table td, .demo-calendar-table th { padding: .15rem; }
  .demo-cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
  .demo-cal-btn { width: 100%; padding-inline: 0; }
  .demo-file-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
  .demo-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .demo-tag { display: inline-flex; align-items: center; gap: .25rem; margin: 0 .25rem .25rem 0; }
  [data-demo-dropzone] { transition: border-color .15s, background-color .15s; }
  [data-demo-dropzone].is-dragover { border-color: var(--wt-primary) !important; background-color: rgba(var(--wt-primary-rgb), .06) !important; }

  /* ---------------- admin shell */
  .wt-admin { --wt-sidebar-w: 16.5rem; min-height: 100vh; background: var(--wt-bg); }
  .wt-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 1040; display: flex; flex-direction: column; width: var(--wt-sidebar-w);
    background: var(--wt-surface); border-inline-end: 1px solid var(--wt-border); transition: transform .25s ease, width .25s ease; }
  .wt-sidebar-brand { display: flex; align-items: center; gap: .65rem; height: 4rem; padding-inline: 1.25rem; font-family: var(--wt-font-heading); font-weight: 800; font-size: 1.15rem;
    color: inherit; text-decoration: none; border-bottom: 1px solid var(--wt-border); white-space: nowrap; overflow: hidden; flex-shrink: 0; }
  .wt-sidebar-brand:hover { color: inherit; }
  .wt-sidebar-scroll { flex: 1; overflow-y: auto; padding: .75rem .75rem 1.5rem; }
  .wt-sidebar-label { margin: 1.1rem .75rem .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--wt-muted); white-space: nowrap; }
  .wt-sidebar ul { list-style: none; padding: 0; margin: 0; }
  .wt-sidebar a, .wt-sidebar .wt-nav-group { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .55rem .75rem; margin-bottom: 2px; color: var(--wt-text); font-size: .925rem;
    font-weight: 500; text-decoration: none; background: none; border: 0; border-radius: var(--wt-radius); white-space: nowrap; cursor: pointer; text-align: start; opacity: .88; }
  .wt-sidebar a .bi, .wt-sidebar .wt-nav-group .bi { font-size: 1.05rem; width: 1.25rem; text-align: center; flex-shrink: 0; }
  .wt-sidebar a:hover, .wt-sidebar .wt-nav-group:hover { opacity: 1; background: rgba(var(--wt-primary-rgb), .07); }
  .wt-sidebar a.active { opacity: 1; color: var(--wt-primary); background: rgba(var(--wt-primary-rgb), .12); font-weight: 600; }
  .wt-sidebar .wt-nav-group::after { content: "\F282"; font-family: "bootstrap-icons"; margin-inline-start: auto; font-size: .75rem; transition: transform .2s; }
  .wt-sidebar .wt-nav-group[aria-expanded="true"]::after { transform: rotate(180deg); }
  .wt-sidebar .wt-sub a { padding-inline-start: 2.75rem; font-size: .875rem; }
  .wt-sidebar .badge { margin-inline-start: auto; }
  .wt-sidebar-foot { padding: 1rem; border-top: 1px solid var(--wt-border); }
  .wt-main { margin-inline-start: var(--wt-sidebar-w); min-width: 0; transition: margin .25s ease; }
  .wt-topbar { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem; height: 4rem; padding-inline: clamp(1rem, 2.5vw, 1.75rem);
    background: color-mix(in srgb, var(--wt-surface) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--wt-border); }
  .wt-topbar-search { position: relative; flex: 1; max-width: 26rem; }
  .wt-topbar-search .bi { position: absolute; inset-inline-start: .85rem; top: 50%; transform: translateY(-50%); color: var(--wt-muted); }
  .wt-topbar-search input { padding-inline-start: 2.4rem; background: var(--wt-surface-2); border-color: transparent; }
  .wt-content { padding: clamp(1rem, 2.5vw, 1.75rem); }
  .wt-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
  .wt-page-head h1 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 0; }
  .wt-page-head .breadcrumb { margin: .25rem 0 0; font-size: .85rem; }
  .wt-kpi { height: 100%; padding: 1.25rem; background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); }
  .wt-kpi-value { font-family: var(--wt-font-heading); font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
  .wt-kpi-trend { display: inline-flex; align-items: center; gap: .2rem; font-size: .8rem; font-weight: 600; padding: .1rem .45rem; border-radius: 50rem; }
  .wt-kpi-trend.is-up { color: #15803d; background: rgba(22, 163, 74, .12); }
  .wt-kpi-trend.is-down { color: #b91c1c; background: rgba(220, 38, 38, .12); }
  [data-ui-theme="dark"] .wt-kpi-trend.is-up, [data-bs-theme="dark"] .wt-kpi-trend.is-up { color: #4ade80; }
  [data-ui-theme="dark"] .wt-kpi-trend.is-down, [data-bs-theme="dark"] .wt-kpi-trend.is-down { color: #f87171; }
  .wt-panel { background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius-lg); height: 100%; }
  .wt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--wt-border); }
  .wt-panel-head h2, .wt-panel-head h3 { font-size: 1rem; margin: 0; }
  .wt-panel-body { padding: 1.25rem; }
  .wt-panel .table { margin: 0; }
  .wt-panel .table > :not(caption) > * > * { padding-inline: 1.25rem; }
  .wt-chart { width: 100%; height: auto; display: block; overflow: visible; }
  .wt-chart .grid { stroke: var(--wt-border); stroke-dasharray: 3 4; }
  .wt-chart .axis { fill: var(--wt-muted); font-size: 11px; font-family: var(--wt-font-body); }
  .wt-chart .line { fill: none; stroke: var(--wt-primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
  .wt-chart .line-2 { fill: none; stroke: var(--wt-accent); stroke-width: 2; stroke-dasharray: 5 5; }
  .wt-chart .bar { fill: var(--wt-primary); }
  .wt-chart .bar-2 { fill: rgba(var(--wt-primary-rgb), .25); }
  .wt-legend { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--wt-muted); }
  .wt-legend i { width: .65rem; height: .65rem; border-radius: 50%; display: inline-block; }
  .wt-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; }
  .wt-status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentcolor; }
  .wt-kanban { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); align-items: start; }
  .wt-kanban-col { padding: .75rem; background: var(--wt-surface-2); border-radius: var(--wt-radius-lg); }
  .wt-kanban-card { padding: .85rem; margin-bottom: .6rem; background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: var(--wt-radius); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
  .wt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--wt-border); border-inline-start: 1px solid var(--wt-border); }
  .wt-cal > div { min-height: 6rem; padding: .4rem; border-bottom: 1px solid var(--wt-border); border-inline-end: 1px solid var(--wt-border); font-size: .8rem; }
  .wt-cal .is-head { min-height: auto; font-weight: 700; color: var(--wt-muted); text-align: center; background: var(--wt-surface-2); }
  .wt-cal .is-off { color: var(--wt-muted); background: var(--wt-surface-2); }
  .wt-cal .wt-event { display: block; margin-top: .25rem; padding: .1rem .35rem; border-radius: .3rem; font-size: .72rem; color: var(--wt-primary); background: rgba(var(--wt-primary-rgb), .12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wt-chat { display: grid; gap: .75rem; }
  .wt-bubble { max-width: 75%; padding: .6rem .9rem; border-radius: 1rem; background: var(--wt-surface-2); }
  .wt-bubble.is-me { margin-inline-start: auto; color: var(--wt-on-primary); background: var(--wt-primary); }
  .wt-overlay { display: none; }

  /* menu structures, collapsed menu and phone drawer: admin-v5.css (version 5) */
  .wt-auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
  .wt-auth-card { width: 100%; max-width: 27rem; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--wt-surface); border: 1px solid var(--wt-border); border-radius: calc(var(--wt-radius-lg) * 1.1); box-shadow: var(--wt-shadow-lg); }
  .wt-divider { display: flex; align-items: center; gap: .75rem; color: var(--wt-muted); font-size: .85rem; }
  .wt-divider::before, .wt-divider::after { content: ""; flex: 1; height: 1px; background: var(--wt-border); }
  .wt-back { position: fixed; inset-inline-start: 1rem; bottom: 1rem; z-index: 1090; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem;
    font-size: .8rem; font-weight: 600; color: #fff; text-decoration: none; background: rgba(15, 20, 32, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 50rem; }
  .wt-back:hover { color: #fff; background: rgba(15, 20, 32, .95); }
  @media print { .wt-header, .wt-sidebar, .wt-topbar, .wt-footer, .wt-to-top, .wt-back, .wt-example-tabs { display: none !important; } .wt-main { margin: 0 !important; } }
}

/* ---------------- sign-in page designs */
@layer components {
  .wt-auth-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1.25rem; margin: 1.75rem 0 0; font-size: .9rem; }
  .wt-auth-links a { color: var(--wt-muted); text-decoration: none; }
  .wt-auth-links a:hover { color: var(--wt-primary); }
  .wt-auth-links.is-light a { color: rgba(255, 255, 255, .85); }
  .wt-auth-split { display: grid; min-height: 100vh; }
  @media (min-width: 992px) { .wt-auth-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .wt-auth-split.is-reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
  .wt-auth-main { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 5vw, 4rem); }
  .wt-auth-side { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(1.75rem, 5vw, 4rem); overflow: hidden; isolation: isolate; }
  .wt-auth-side.is-brand { color: #fff; background: var(--wt-gradient); }
  .wt-auth-side.is-brand::after { content: ""; position: absolute; width: 30rem; height: 30rem; right: -10rem; bottom: -12rem; border-radius: 50%; background: rgba(255, 255, 255, .1); z-index: -1; }
  .wt-auth-side.is-image { min-height: 16rem; justify-content: flex-end; background-size: cover; background-position: center; color: #fff; }
  .wt-auth-side.is-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 10, 20, .78)); z-index: -1; }
  .wt-auth-pitch h2, .wt-auth-caption h2 { color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); }
  .wt-auth-pitch p, .wt-auth-caption p { opacity: .88; }
  .wt-auth-quote { margin: 0; padding: 1.25rem; border-radius: var(--wt-radius-lg); background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .wt-auth-quote blockquote { margin: 0 0 1rem; font-size: 1.02rem; }
  @media (max-width: 991.98px) { .wt-auth-side.is-brand .wt-auth-pitch ul, .wt-auth-side.is-brand .wt-auth-quote { display: none; } .wt-auth-split.is-reverse .wt-auth-side { order: -1; } }
  .wt-auth-glass { background-size: cover; background-position: center; position: relative; isolation: isolate; }
  .wt-auth-glass::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(var(--wt-primary-rgb), .55), rgba(10, 12, 24, .7)); z-index: -1; }
  .wt-auth-glass .card { background: color-mix(in srgb, var(--wt-surface) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: rgba(255, 255, 255, .25); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
  .wt-auth-minimal { min-height: 100vh; display: flex; flex-direction: column; background: var(--wt-bg); }
  .wt-auth-top { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem clamp(1rem, 4vw, 2.5rem); }
  .wt-auth-center { flex: 1; display: grid; place-items: center; padding: 1rem; }
  .wt-auth-minimal .card { border: 0; background: transparent; box-shadow: none !important; }
  .wt-auth-bottom { padding: 1.25rem; text-align: center; font-size: .85rem; color: var(--wt-muted); }
  .wt-auth-form .card { box-shadow: var(--wt-shadow-lg); }
}

/* ---------------- UI kit pages inside the admin shell */
@layer components {
  .wt-kit { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
  @media (min-width: 1400px) { .wt-kit { grid-template-columns: minmax(0, 1fr) 13rem; } }
  .wt-kit .wt-toc { top: 5rem; }
  .wt-kit .wt-docs-head { margin-bottom: 1.75rem; padding-bottom: 1.25rem; }
  .wt-kit .wt-docs-head p { font-size: 1rem; }
}

@layer components { .wt-logo-img { width: 2.25rem; height: 2.25rem; flex-shrink: 0; border-radius: .6rem; } .navbar-brand .wt-logo-img + span, .wt-sidebar-brand .wt-logo-img + span { margin-inline-start: .15rem; } }

/* phones: wide gutters (g-5) would stick out of the container padding (unlayered so it beats the utility layer) */
@media (max-width: 575.98px) { .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; --ui-gutter-x: 1.5rem; } }
