/* Isolated demonstration workspace: all fonts and assets are local. */
:root {
    color-scheme: light;
    --demo-ink: #1d2b42;
    --demo-muted: #58677b;
    --demo-primary: #3155cb;
    --demo-primary-hover: #2443ac;
    --demo-soft: #edf2ff;
    --demo-line: #dfe5ee;
    --demo-bg: #f5f7fb;
    --demo-white: #fff;
    --demo-shadow: 0 4px 18px #20385c06;
}
* { box-sizing: border-box; }
html { min-width: 300px; scroll-behavior: smooth; }
body { margin: 0; background: var(--demo-bg); color: var(--demo-ink); font: 14px/1.55 "Segoe UI", Inter, system-ui, -apple-system, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--demo-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
img, svg { max-width: 100%; }
svg { flex-shrink: 0; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #7592fa; outline-offset: 3px; }
#demo-content:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 750; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; }
p { color: var(--demo-muted); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.demo-skip { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; border-radius: 10px; background: var(--demo-ink); color: white; }
.demo-skip:focus { top: 12px; }
.demo-topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 30px; background: white; border-bottom: 1px solid var(--demo-line); }
.demo-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--demo-ink); flex-shrink: 0; }
.demo-brand:hover { text-decoration: none; }
.demo-brand img { width: 38px; height: 38px; object-fit: contain; }
.demo-brand strong { display: block; font-size: 18px; font-weight: 750; line-height: 1.2; letter-spacing: -.025em; }
.demo-brand small { display: block; font-size: 11px; color: var(--demo-muted); margin-top: 3px; }
.demo-topbar .demo-actions { justify-content: flex-end; }
.demo-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px 12px; padding: 11px 24px; background: #edf2ff; color: #29438d; border-bottom: 1px solid #d6e1ff; text-align: center; font-size: 12px; }
.demo-banner strong { font-weight: 700; }
.demo-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: calc(100vh - 120px); }
.demo-sidebar { display: flex; flex-direction: column; padding: 27px 15px 22px; background: white; border-right: 1px solid var(--demo-line); min-width: 0; }
.demo-identity { display: flex; align-items: center; gap: 11px; padding: 0 12px 23px; overflow-wrap: anywhere; }
.demo-identity strong { display: block; font-size: 14px; line-height: 1.4; }
.demo-identity small, .demo-identity p { display: block; color: var(--demo-muted); font-size: 11px; margin: 3px 0 0; }
.demo-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; background: var(--demo-soft); color: var(--demo-primary); font-size: 15px; font-weight: 750; }
.demo-avatar.large { width: 66px; height: 66px; border-radius: 19px; font-size: 23px; }
.demo-nav-caption { display: block; color: var(--demo-muted); font-size: 9px; font-weight: 700; letter-spacing: .09em; padding: 1px 14px 12px; }
.demo-breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; color: var(--demo-muted); font-size: 11px; margin-bottom: 23px; }
.demo-nav { display: flex; flex-direction: column; gap: 5px; }
.demo-nav a { display: flex; align-items: center; gap: 11px; padding: 12px 14px; min-height: 44px; border-radius: 10px; color: #516075; font-size: 13px; font-weight: 550; transition: background .15s, color .15s; }
.demo-nav a:hover { color: var(--demo-primary); background: #f5f7fd; text-decoration: none; }
.demo-nav a[aria-current="page"] { background: var(--demo-soft); color: #2947af; font-weight: 700; }
.demo-nav a > span:first-child { min-width: 18px; text-align: center; }
.demo-side-note { margin-top: auto; padding: 32px 12px 0; color: var(--demo-muted); font-size: 12px; }
.demo-side-note strong { display: block; color: var(--demo-ink); font-size: 12px; margin-bottom: 6px; }
.demo-side-note p { margin-bottom: 12px; }
.demo-side-note > a { display: block; margin-top: 12px; }
.demo-main { padding: 35px clamp(22px, 3vw, 48px); min-width: 0; max-width: 1600px; width: 100%; }
.demo-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 27px; }
.demo-heading h1 { margin: 7px 0 10px; }
.demo-heading p { margin-bottom: 0; max-width: 690px; }
.demo-eyebrow { display: block; color: var(--demo-primary); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.demo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.demo-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; background: white; border: 1px solid var(--demo-line); border-radius: 9px; color: #34455f; font-size: 12px; line-height: 1.4; font-weight: 650; text-align: center; transition: background .15s, border-color .15s; }
.demo-button:hover { border-color: #bac8e0; background: #f8faff; text-decoration: none; }
.demo-button.primary { background: var(--demo-primary); border-color: var(--demo-primary); color: white; }
.demo-button.primary:hover { background: var(--demo-primary-hover); border-color: var(--demo-primary-hover); }
.demo-button.danger { background: #fff7f7; border-color: #f1cdcd; color: #a22a35; }
.demo-button.danger:hover { background: #ffecec; border-color: #d89198; }
.demo-button.quiet { background: transparent; border-color: transparent; color: var(--demo-primary); }
.demo-button.quiet:hover { background: var(--demo-soft); }
.demo-button.small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.demo-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.demo-card, .demo-panel { border: 1px solid var(--demo-line); border-radius: 16px; background: white; box-shadow: var(--demo-shadow); min-width: 0; }
.demo-card { padding: 23px; }
.demo-card h3 { margin-top: 18px; }
.demo-card > p { font-size: 12px; }
.demo-card > a { font-size: 12px; font-weight: 650; }
.demo-stat > span { display: block; color: var(--demo-muted); font-size: 12px; }
.demo-stat > strong { display: block; color: var(--demo-ink); font-size: clamp(24px, 2.3vw, 32px); line-height: 1.3; letter-spacing: -.04em; margin: 10px 0 6px; overflow-wrap: anywhere; }
.demo-stat p { margin: 0; font-size: 11px; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; margin-bottom: 24px; }
.demo-panel { padding: 24px; margin-bottom: 22px; }
.demo-grid > .demo-panel { margin-bottom: 0; }
.demo-panel > h2 { margin-bottom: 7px; }
.demo-panel > p { font-size: 12px; }
.demo-panel-heading, .demo-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.demo-panel-heading h2, .demo-section-heading h2 { margin: 0; }
.demo-panel-heading a, .demo-section-heading span { font-size: 11px; }
.demo-section-heading { margin: 28px 0 17px; }
.demo-section-heading span { color: var(--demo-muted); }
.demo-welcome { background: #f8faff; }
.demo-welcome h2 { margin-top: 12px; }
.demo-welcome > p { max-width: 430px; font-size: 13px; }
.demo-profile { max-width: 800px; }
.demo-profile .demo-identity { padding-left: 0; padding-right: 0; border-bottom: 1px solid var(--demo-line); }
.demo-profile .demo-identity h2 { margin-bottom: 5px; }
.demo-profile .demo-identity p { font-size: 12px; }
.demo-profile form > .demo-actions { margin-top: 23px; }
.demo-profile .demo-note { margin-bottom: 0; }
.demo-data-panel { padding: 0; overflow: hidden; }
.demo-data-panel > .demo-toolbar { padding: 20px 24px; margin: 0; }
.demo-data-panel .demo-table-wrap { max-width: 100%; }
#demo-count { color: var(--demo-muted); font-size: 11px; }
.demo-panel > .demo-table-wrap { margin: 20px -24px -24px; border-radius: 0 0 16px 16px; }
.demo-panel > .demo-toolbar + .demo-table-wrap { margin-top: 18px; }
.demo-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.demo-toolbar h2 { margin-bottom: 0; }
.demo-toolbar p { font-size: 12px; margin: 5px 0 0; }
.demo-search { display: flex; align-items: center; gap: 8px; min-width: 180px; width: min(100%, 300px); color: var(--demo-muted); font-size: 12px; }
.demo-search input { width: 100%; border: 1px solid var(--demo-line); border-radius: 9px; background: #fbfcfe; color: var(--demo-ink); padding: 10px 12px; min-width: 0; }
.demo-table-wrap { width: auto; max-width: calc(100% + 48px); overflow: auto; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.demo-table caption { text-align: left; padding: 12px 22px; color: var(--demo-muted); }
.demo-table th { padding: 13px 22px; color: #5b6b81; background: #f8faff; font-size: 10px; font-weight: 650; letter-spacing: .02em; border-top: 1px solid #edf0f5; border-bottom: 1px solid var(--demo-line); white-space: nowrap; }
.demo-table td { padding: 15px 22px; border-bottom: 1px solid #eaf0f6; vertical-align: middle; }
.demo-table tr:last-child td { border-bottom: 0; }
.demo-table td strong { display: block; font-size: 12px; font-weight: 650; }
.demo-table td small { display: block; color: var(--demo-muted); font-size: 11px; margin-top: 3px; }
.demo-table td .demo-actions { flex-wrap: nowrap; }
.demo-table td .demo-button { white-space: nowrap; }
.demo-row-actions { display: flex; gap: 5px; flex-wrap: wrap; min-width: 170px; }
.demo-table tbody tr:hover { background: #fafcff; }
.demo-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 9px; border-radius: 6px; background: #eef2f7; color: #4c5e76; font-size: 10px; font-weight: 650; white-space: nowrap; line-height: 1.3; }
.demo-badge.green { background: #eaf7ee; color: #24613b; }
.demo-badge.amber { background: #fff4da; color: #815a07; }
.demo-badge.blue { background: #edf2ff; color: #3657ad; }
.demo-list { margin: 18px 0 0; padding: 0; list-style: none; }
.demo-list-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid #eaf0f6; }
.demo-list-item:first-child { padding-top: 4px; }
.demo-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.demo-list-item strong { display: block; font-size: 12px; }
.demo-list-item small, .demo-list-item p { display: block; color: var(--demo-muted); font-size: 11px; margin: 4px 0 0; }
.demo-empty { padding: 45px 20px; text-align: center; color: var(--demo-muted); font-size: 13px; }
.demo-empty h2, .demo-empty strong { display: block; color: var(--demo-ink); margin-bottom: 7px; }
.demo-empty p { margin-bottom: 0; }
.demo-note { padding: 14px 18px; border: 1px solid #dce6fa; border-radius: 11px; background: #f2f6ff; color: #485e84; font-size: 12px; line-height: 1.65; margin: 20px 0; }
.demo-note p:last-child { margin-bottom: 0; }
.demo-chooser { width: min(1050px, calc(100% - 48px)); margin: 62px auto 40px; }
.demo-chooser > .demo-heading { text-align: center; display: block; margin-bottom: 34px; }
.demo-chooser > .demo-heading h1 { font-size: clamp(30px, 4vw, 43px); margin: 12px 0 16px; }
.demo-chooser > .demo-heading p { margin-left: auto; margin-right: auto; max-width: 620px; }
.demo-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.demo-choice-card { display: flex; flex-direction: column; align-items: flex-start; padding: 33px; border: 1px solid var(--demo-line); border-radius: 19px; background: white; box-shadow: 0 10px 35px #1e355906; }
.demo-choice-icon { display: grid; place-items: center; width: 52px; height: 52px; background: var(--demo-soft); color: var(--demo-primary); border-radius: 15px; font-size: 24px; margin-bottom: 24px; }
.demo-choice-card h2 { font-size: 25px; margin-bottom: 11px; }
.demo-choice-card > .demo-eyebrow { margin-bottom: 9px; }
.demo-choice-card > small { display: block; margin-top: 13px; color: var(--demo-muted); font-size: 11px; align-self: center; text-align: center; }
.demo-choice-card > p { max-width: 370px; font-size: 13px; }
.demo-choice-card > .demo-button { width: 100%; margin-top: auto; min-height: 45px; font-size: 13px; }
.demo-features { padding: 0; list-style: none; margin: 5px 0 28px; color: var(--demo-muted); }
.demo-features li { padding: 5px 0 5px 23px; position: relative; font-size: 12px; }
.demo-features li::before { content: "✓"; position: absolute; left: 0; color: var(--demo-primary); font-weight: 700; }
.demo-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 19px; color: var(--demo-muted); border-top: 1px solid var(--demo-line); font-size: 11px; }
.demo-chooser .demo-footer { justify-content: center; text-align: center; }
.demo-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 23px; }
.demo-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.demo-field label { color: #43536b; font-size: 12px; font-weight: 650; }
.demo-field input, .demo-field select, .demo-field textarea { width: 100%; border: 1px solid #ced8e7; border-radius: 8px; padding: 11px 12px; background: white; color: var(--demo-ink); min-height: 43px; }
.demo-field textarea { resize: vertical; min-height: 85px; }
.demo-field small { font-size: 11px; color: var(--demo-muted); }
.demo-form-grid > .full, .demo-field.full { grid-column: 1 / -1; }
.demo-dialog { width: min(590px, calc(100% - 32px)); max-height: calc(100dvh - 44px); overflow: auto; border: 1px solid var(--demo-line); border-radius: 18px; background: white; color: var(--demo-ink); padding: 30px; box-shadow: 0 24px 80px #17284030; }
.demo-dialog::backdrop { background: #14233a80; backdrop-filter: blur(3px); }
.demo-dialog h2 { font-size: 22px; margin-bottom: 9px; }
.demo-dialog > p, .demo-dialog form > p { font-size: 12px; }
.demo-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.demo-form-error { margin: 16px 0 0; padding: 11px 14px; border-radius: 8px; background: #fff1f1; color: #a02731; font-size: 12px; }
.demo-form-error:empty { display: none; }
#demo-notice:not(:empty) { position: fixed; z-index: 50; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(650px, calc(100vw - 32px)); padding: 14px 22px; border: 1px solid #cddbf9; border-radius: 12px; background: #243d7f; color: white; box-shadow: 0 8px 30px #15244622; font-size: 13px; text-align: center; }
@media (max-width: 1100px) {
    .demo-main { padding: 30px 24px; }
    .demo-card { padding: 20px; }
    .demo-table th, .demo-table td { padding: 13px 16px; }
    .demo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .demo-shell { grid-template-columns: 1fr; }
    .demo-sidebar { border-right: 0; border-bottom: 1px solid var(--demo-line); padding: 18px 24px; gap: 16px; }
    .demo-identity { padding: 0; }
    .demo-nav { flex-direction: row; flex-wrap: wrap; gap: 5px; }
    .demo-nav a { padding: 9px 12px; min-height: 39px; font-size: 12px; }
    .demo-side-note { padding: 0; margin: 0; }
    .demo-side-note p { display: inline; font-size: 11px; }
    .demo-side-note strong { display: inline; margin-right: 4px; }
    .demo-nav-caption { padding: 0; }
    .demo-chooser { margin-top: 38px; }
}
@media (max-width: 600px) {
    .demo-topbar { padding: 15px 18px; gap: 12px; flex-wrap: wrap; }
    .demo-topbar > .demo-actions { justify-content: flex-start; width: 100%; }
    .demo-brand img { width: 34px; height: 34px; }
    .demo-banner { padding: 10px 18px; font-size: 11px; justify-content: flex-start; text-align: left; }
    .demo-sidebar { padding: 18px; }
    .demo-main { padding: 25px 18px; }
    .demo-heading { margin-bottom: 23px; gap: 16px; }
    .demo-heading h1 { font-size: 26px; }
    .demo-heading p { font-size: 12px; }
    .demo-cards, .demo-choice-grid, .demo-form-grid { grid-template-columns: 1fr; }
    .demo-cards { gap: 12px; margin-bottom: 18px; }
    .demo-stat { padding: 18px 21px; }
    .demo-stat > strong { font-size: 28px; margin: 5px 0; }
    .demo-panel { padding: 20px; margin-bottom: 18px; }
    .demo-data-panel { padding: 0; }
    .demo-data-panel > .demo-toolbar { padding: 18px; }
    .demo-panel > .demo-table-wrap { margin-left: -20px; margin-right: -20px; margin-bottom: -20px; max-width: calc(100% + 40px); }
    .demo-grid { gap: 18px; margin-bottom: 18px; }
    .demo-search { width: 100%; }
    .demo-table { font-size: 11px; }
    .demo-table th, .demo-table td { padding: 13px 16px; }
    .demo-table td { min-width: 95px; }
    .demo-table td:first-child { min-width: 140px; }
    .demo-list-item { align-items: flex-start; }
    .demo-list-item .demo-actions { justify-content: flex-end; }
    .demo-chooser { width: calc(100% - 36px); margin: 29px auto; }
    .demo-chooser > .demo-heading h1 { font-size: 30px; }
    .demo-choice-card { padding: 25px; }
    .demo-choice-icon { width: 47px; height: 47px; margin-bottom: 19px; }
    .demo-choice-card h2 { font-size: 24px; }
    .demo-dialog { padding: 23px; }
    .demo-dialog-actions { gap: 8px; }
    .demo-form-grid > .full { grid-column: auto; }
    .demo-footer { margin-top: 23px; }
    #demo-notice:not(:empty) { bottom: 14px; font-size: 12px; padding: 13px 17px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .demo-topbar, .demo-sidebar, .demo-actions, .demo-row-actions, #demo-notice { display: none !important; }
    .demo-shell, .demo-main { display: block; padding: 0; }
    body { background: white; }
    .demo-panel, .demo-card { box-shadow: none; break-inside: avoid; }
}
