/* Signed-in workspace: the near-black menu (rgb 16 16 16), white, cyan and
   lavender from index.html, home.css and style.css. Scoped to keep the public
   website independent. */
body:has(.auth-layout) {
    --rz-primary: #5228f5;
    --rz-primary-light: #f3f2f8;
    --rz-primary-dark: #4020c7;
    --rz-on-primary: #fff;
}
.auth-layout {
    --quemi-primary: #5228f5;
    --quemi-primary-hover: #4020c7;
    --quemi-secondary: #63bddf;
    --color-text-primary: #24232b;
    --color-text-secondary: #6b6878;
    --color-text-tertiary: #6b6878;
    --color-bg-primary: #fff;
    --color-bg-secondary: #fafafd;
    --color-bg-tertiary: #f3f2f8;
    --color-border: #e5e3ed;
    --color-border-light: #e5e3ed;
    --color-success: #6b6878;
    --color-warning: #a96513;
    --color-danger: #ba3849;
    --color-info: #326f99;
    --radius-lg: 18px;
    --radius-md: 10px;
    --shadow-sm: 0 2px 4px #24232b04;
    --shadow-md: 0 8px 26px #24232b0a;
    --sidebar-width: 256px;
    --rz-primary: #5228f5;
    --rz-primary-light: #f3f2f8;
    --rz-text-color: #24232b;
    --rz-body-background-color: #fafafd;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100dvh;
    text-align: left;
    isolation: isolate;
}
.auth-layout *, .auth-layout *::before, .auth-layout *::after { box-sizing: border-box; }
.auth-layout h1, .auth-layout h2, .auth-layout h3, .auth-layout h4, .auth-layout h5, .auth-layout h6 { font-family: inherit; color: inherit; }
.auth-layout a { text-decoration: none; }
.auth-layout :is(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #9379f5; outline-offset: 3px; }
.auth-layout .text-muted { color: #6b6878 !important; }
.auth-layout .text-primary { color: #5228f5 !important; }
.auth-layout .bg-primary { background: #5228f5 !important; }
.auth-layout .border-primary { border-color: #5228f5 !important; }
/* Menu: same near-black as the index.html hero and footer; logo-white.png is index.html's logo.png with a white wordmark. */
.auth-layout .auth-sidebar { width: var(--sidebar-width); background: #101010; border-right: 1px solid #242424; height: 100dvh; z-index: 1035; padding: 0; color: #fff; }
.auth-layout .auth-sidebar-header { min-height: 100px; padding: 30px 26px; border: 0; display: flex; align-items: center; }
.workspace-brand { display: inline-flex; align-items: center; line-height: 0; transition: opacity .15s; }
.workspace-brand:hover { opacity: .85; }
.workspace-logo { display: block; height: 34px; width: auto; }
.auth-layout .auth-sidebar-nav { padding: 0 16px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; flex: 1; }
.auth-layout :is(.auth-sidebar, .auth-sidebar-nav) { scrollbar-color: #6b6878 transparent; }
.auth-layout :is(.auth-sidebar, .auth-sidebar-nav)::-webkit-scrollbar { width: 6px; }
.auth-layout :is(.auth-sidebar, .auth-sidebar-nav)::-webkit-scrollbar-track { background: transparent; }
.auth-layout :is(.auth-sidebar, .auth-sidebar-nav)::-webkit-scrollbar-thumb { background: #6b6878; border-radius: 9999px; }
.auth-layout :is(.auth-sidebar, .auth-sidebar-nav)::-webkit-scrollbar-thumb:hover { background: #8a8798; }
.auth-layout .auth-nav-section-title { font-size: 10px; font-weight: 700; letter-spacing: 1.7px; color: #8a8798; padding: 14px 14px 10px; }
.auth-layout .auth-nav-item { display: flex; align-items: center; justify-content: flex-start; gap: 13px; padding: 11px 14px; min-height: 46px; margin: 3px 0; border-radius: 9px; color: #b9b5c9; background: transparent; font-size: 13px; font-weight: 500; border: 0; line-height: 1.4; }
.auth-layout .auth-nav-item .auth-nav-icon { color: inherit; width: 19px; font-size: 16px; }
.auth-layout .auth-nav-item:hover { background: #1c1c1c; color: #fff; transform: none; }
.auth-layout .auth-nav-item.active { color: #fff; background: #242424; font-weight: 700; }
.auth-layout .auth-nav-item.active::before { display: block; left: 0; width: 3px; height: 22px; background: #9379f5; border-radius: 0 3px 3px 0; }
.auth-layout .auth-nav-divider { margin: 20px 14px 6px; background: #242424; }
.auth-layout .auth-sidebar-footer { padding: 16px; border-top: 1px solid #242424; background: #101010; }
.auth-layout .auth-user-card { padding: 8px 4px; gap: 10px; color: #b9b5c9; display: flex; align-items: center; border-radius: 9px; }
.auth-layout .auth-user-card:hover { background: #1c1c1c; color: #fff; }
.auth-layout .auth-user-avatar { width: 38px; height: 38px; flex-shrink: 0; background: linear-gradient(135deg, #63bddf, #9379f5); color: #101010; border: 0; font-size: 13px; font-weight: 700; display: grid; place-items: center; border-radius: 50%; }
.auth-layout .auth-user-info { flex: 1; min-width: 0; }
.auth-layout .auth-user-name { display: block; color: #fff; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-layout .auth-user-badge { display: block; color: #8a8798; font-size: 11px; background: transparent; padding: 0; font-weight: 400; }
.workspace-signout { display: flex; gap: 12px; align-items: center; justify-content: flex-start; color: #b9b5c9; font-size: 12px; padding: 10px 6px; min-height: 44px; border-radius: 9px; }
.workspace-signout:hover { color: #fff; background: #1c1c1c; }
.auth-layout .auth-main-content { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); min-width: 0; padding: 0; display: flex; flex-direction: column; }
.workspace-topbar { min-height: 82px; border-bottom: 1px solid #e5e3ed; padding: 16px 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fafafd; }
.workspace-eyebrow { display: block; color: #6b6878; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.workspace-context { color: #6b6878; font-size: 12px; }
.workspace-topbar-actions { display: flex; align-items: center; gap: 15px; }
.workspace-inbox { color: #494553; font-size: 13px; }
.auth-layout .notification-bell-button { color: #494553; background: #fff; border: 1px solid #e5e3ed; width: 42px; height: 42px; border-radius: 50%; }
.auth-layout .auth-content-wrapper { padding: 36px 42px; width: 100%; max-width: 1440px; margin: 0 auto; flex: 1; min-width: 0; }
.workspace-footer { padding: 18px 42px 24px; color: #6b6878; font-size: 11px; display: flex; gap: 16px; justify-content: space-between; }
.workspace-footer div { display: flex; gap: 20px; }
.workspace-footer a { color: inherit; }
.workspace-mobile-header, .workspace-backdrop { display: none; }
.workspace-skip { position: fixed; top: -80px; left: 12px; background: #5228f5; color: white; padding: 12px 18px; z-index: 1100; border-radius: 8px; }
.workspace-skip:focus { top: 12px; color: white; }

/* Page hierarchy, content surfaces, and the overview welcome area. */
.auth-layout .modern-page-header { margin-bottom: 28px; padding-bottom: 0; border: 0; }
.auth-layout .modern-page-title { font-size: clamp(26px, 2.7vw, 36px); letter-spacing: -1.1px; font-weight: 650; line-height: 1.2; margin: 0 0 10px; }
.auth-layout .modern-page-title > i { display: none; }
.auth-layout .modern-page-subtitle { color: #6b6878; font-size: 14px; margin: 0; line-height: 1.6; }
.auth-layout .modern-section { margin-bottom: 32px; }
.auth-layout .modern-section-header { margin-bottom: 18px; }
.auth-layout .modern-section-title { font-size: 18px; font-weight: 650; letter-spacing: -.4px; }
.auth-layout .modern-section-title i { color: #6b6878; font-size: 16px; }
.workspace-welcome { position: relative; overflow: hidden; padding: 32px; background: radial-gradient(ellipse at top right, #9379f526, transparent 65%), #101010; border: 1px solid #242424; border-radius: 22px; display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.workspace-welcome .workspace-eyebrow { margin-bottom: 12px; color: #b9b5c9; }
.auth-layout .workspace-welcome { padding-bottom: 32px; }
.auth-layout .workspace-welcome .modern-page-title { color: #fff; }
.workspace-welcome-copy { max-width: 670px; position: relative; z-index: 1; }
.auth-layout .workspace-welcome .modern-page-subtitle { max-width: 490px; color: #c4c1d0; }
@supports (background-clip: text) {
    .auth-layout .workspace-welcome .modern-page-subtitle { background: linear-gradient(90deg, #63bddf, #cbf3ed, #9379f5); background-clip: text; color: transparent; }
}
.workspace-welcome-art { width: 112px; height: 112px; flex-shrink: 0; border-radius: 30px; background: linear-gradient(135deg, #63bddf, #9379f5); color: #101010; display: grid; place-items: center; font-size: 40px; border: 10px solid #ffffff12; transform: rotate(-12deg); }
.workspace-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 32px; }
.workspace-shortcut { border: 1px solid #e5e3ed; background: #fff; border-radius: 14px; padding: 18px; display: flex; align-items: center; gap: 13px; color: #24232b; transition: border-color .15s, box-shadow .15s; }
.workspace-shortcut:hover { color: #5228f5; border-color: #aaa5c0; box-shadow: var(--shadow-md); }
.workspace-shortcut > i:first-child { color: #6b6878; background: #f3f2f8; border-radius: 10px; width: 39px; height: 39px; display: grid; place-items: center; flex-shrink: 0; }
.workspace-shortcut strong { display: block; font-size: 13px; font-weight: 650; }
.workspace-shortcut small { color: #6b6878; font-size: 11px; }
.workspace-shortcut > i:last-child { margin-left: auto; font-size: 12px; }
.auth-layout :is(.modern-card, .card, .stat-card) { background: #fff; border: 1px solid #e5e3ed; border-radius: 16px; box-shadow: 0 2px 4px #24232b03; }
.auth-layout :is(.modern-card, .stat-card):hover { transform: none; box-shadow: 0 2px 4px #24232b03; }
.auth-layout .modern-card-clickable:hover { border-color: #aaa5c0; box-shadow: var(--shadow-md); }
.auth-layout :is(.modern-card-header, .card-header) { padding: 20px 24px; background: transparent; border-bottom: 1px solid #f3f2f8; border-radius: 16px 16px 0 0; }
.auth-layout :is(.modern-card-title, .card-title) { font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.auth-layout .modern-card-title i { color: #6b6878; font-size: 16px; }
.auth-layout :is(.modern-card-body, .card-body) { padding: 24px; }
.auth-layout :is(.modern-card-footer, .card-footer) { background: #fafafd; border-color: #f3f2f8; padding: 16px 24px; }
.auth-layout .stat-card { padding: 24px; }
.auth-layout .stat-card::before { display: none; }
.auth-layout .stat-card-value { font-size: clamp(28px, 3vw, 38px); letter-spacing: -1.3px; font-weight: 650; line-height: 1.3; margin: 8px 0; font-variant-numeric: tabular-nums; }
.auth-layout .stat-card-label { color: #6b6878; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.auth-layout .stat-card-subtitle { color: #6b6878; font-size: 11px; }
.auth-layout .stat-card-icon { width: 38px; height: 38px; font-size: 17px; border-radius: 12px; margin-bottom: 18px; }
.auth-layout .stat-card-icon-success { background: #f3f2f8; color: #6b6878; }
.auth-layout .stat-card-icon-warning { background: #f8efd9; color: #9a741e; }
.auth-layout .stat-card-icon-info { background: #e9eff8; color: #557aab; }

/* Consistent controls across Bootstrap, Radzen, and existing custom components. */
.auth-layout :is(.btn, .modern-btn) { border-radius: 9px; padding: 10px 16px; font-family: inherit; font-size: 13px; font-weight: 600; min-height: 42px; line-height: 1.5; box-shadow: none; transition: background-color .15s, border-color .15s; white-space: normal; }
.auth-layout :is(.btn, .modern-btn):hover { transform: none; }
.auth-layout :is(.btn-primary, .modern-btn-primary) { background: #242424; border: 1px solid #242424; color: white; }
.auth-layout :is(.btn-primary, .modern-btn-primary):hover { background: #101010; border-color: #101010; color: white; }
.auth-layout :is(.btn-outline-primary, .modern-btn-outline-primary) { color: #5228f5; border: 1px solid #aaa5c0; background: #fff; }
.auth-layout :is(.btn-outline-primary, .modern-btn-outline-primary):hover { background: #f3f2f8; }
.auth-layout :is(.btn-secondary, .modern-btn-secondary) { color: #494553; background: #f3f2f8; border: 1px solid #e5e3ed; }
.auth-layout :is(button, .btn, .modern-btn):disabled { opacity: .5; cursor: not-allowed; }
.auth-layout :is(.form-control, .form-select, .modern-input, .modern-select, .modern-textarea, .rz-textbox, .rz-dropdown, .rz-numeric, .rz-datepicker) { border: 1px solid #d5d2e3; border-radius: 9px; background-color: #fff; color: #24232b; min-height: 44px; font-size: 14px; max-width: 100%; box-shadow: none; }
.auth-layout :is(.form-control, .form-select, .modern-input, .modern-select, .modern-textarea):focus { border-color: #9379f5; box-shadow: 0 0 0 3px #5228f515; }
.auth-layout :is(.form-label, .modern-label, .modern-form-label) { font-size: 12px; color: #494553; font-weight: 600; margin-bottom: 8px; }
.auth-layout :is(.form-control, .modern-input):disabled { background: #f3f2f8; color: #6b6878; }
.auth-layout textarea { min-height: 120px; resize: vertical; }
.auth-layout .modern-form-group { margin-bottom: 22px; }
.auth-layout .modern-badge { font-size: 11px; border-radius: 6px; font-weight: 600; padding: 5px 9px; letter-spacing: 0; }
.auth-layout :is(.modern-badge-primary, .modern-badge-success) { color: #494553; background: #f3f2f8; }
.auth-layout .modern-badge-warning { color: #885e14; background: #fbf0d5; }
.auth-layout .modern-badge-danger { color: #a13443; background: #fbe9ec; }
.auth-layout .alert { border-radius: 12px; padding: 18px 20px; font-size: 13px; line-height: 1.7; box-shadow: none; }
.auth-layout .alert-info { background: #edf4f7; border-color: #d1e2eb; color: #356175; }
.auth-layout .alert-warning { background: #fcf6e7; border-color: #eddfb5; color: #805c23; }
.auth-layout .alert-success { background: #f3f2f8; border-color: #e5e3ed; color: #6b6878; }
.auth-layout .alert-danger { background: #fcf0ef; border-color: #f0d9d6; color: #9a4543; }
.auth-layout :is(.modern-empty-state, .modern-loading) { padding: 56px 24px; text-align: center; }
.auth-layout .modern-empty-state-icon { background: #f3f2f8; color: #6b6878; box-shadow: none; }
.auth-layout .modern-spinner { border-top-color: #5228f5; }
.auth-layout :is(.table-responsive, .rz-data-grid, .rz-datatable) { max-width: 100%; overflow-x: auto; scrollbar-width: thin; border-radius: 12px; }
.auth-layout :is(.table, .rz-grid-table) { font-size: 13px; margin-bottom: 0; }
.auth-layout :is(.table, .rz-grid-table) th { background: #fafafd; color: #6b6878; font-weight: 600; font-size: 11px; padding: 14px 16px; border-color: #e5e3ed; }
.auth-layout :is(.table, .rz-grid-table) td { padding: 15px 16px; color: #494553; border-color: #f3f2f8; vertical-align: middle; }
.auth-layout :is(.table, .rz-grid-table) tbody tr:hover { background-color: #fafafd; }
.auth-layout .rz-paginator { background: #fff; padding: 12px; flex-wrap: wrap; }
.auth-layout .rz-paginator-page.rz-state-active { background: #5228f5; color: #fff; }
.auth-layout :is(.nav-tabs, .modern-tabs) { border-bottom-color: #e5e3ed; gap: 8px; flex-wrap: wrap; }
.auth-layout :is(.nav-link.active, .modern-tab.active) { color: #5228f5; border-bottom-color: #5228f5; }
.auth-layout .modal-content { border-radius: 18px; border: 1px solid #e5e3ed; box-shadow: 0 24px 70px #24232b30; }
.auth-layout .modal-header, .auth-layout .modal-footer { padding: 20px 24px; border-color: #e5e3ed; }
.auth-layout .modal-body { padding: 24px; overflow-y: auto; max-height: 70dvh; }
.auth-layout img, .auth-layout video { max-width: 100%; }
.auth-layout .modern-page-header .d-flex { flex-wrap: wrap; gap: 16px; }
.auth-layout .row > * { min-width: 0; }
.auth-layout .container, .auth-layout .container-fluid { max-width: 100%; }
.auth-layout .auth-content-wrapper > .table { display: block; overflow-x: auto; }
.auth-layout .auth-content-wrapper > h3 { font-size: 26px; letter-spacing: -.6px; margin-bottom: 24px; }

@media (min-width: 769px) and (max-width: 1100px) {
    .auth-layout { --sidebar-width: 220px; }
    .auth-layout .auth-content-wrapper { padding: 28px 24px; }
    .workspace-topbar { padding: 16px 24px; }
    .workspace-shortcut { padding: 14px; }
    .workspace-shortcut small { display: none; }
    .workspace-welcome-art { width: 80px; height: 80px; font-size: 28px; }
}
@media (max-width: 768px) {
    .auth-layout { display: block; font-size: 14px; }
    .workspace-mobile-header { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; height: 66px; padding: 10px 20px; background: #101010; border-bottom: 1px solid #242424; z-index: 1036; }
    .workspace-logo { height: 28px; }
    .workspace-menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; background: #242424; color: #fff; border: 1px solid #333; border-radius: 10px; font-size: 16px; }
    .auth-layout .auth-sidebar { display: none; top: 66px; bottom: 0; height: calc(100dvh - 66px); width: min(320px, 88vw); transform: none; }
    .auth-layout.menu-open .auth-sidebar { display: flex; }
    .auth-layout .auth-sidebar-header { display: none; }
    .auth-layout .auth-sidebar-nav { padding-top: 12px; }
    .auth-layout .auth-nav-item { min-height: 46px; }
    .workspace-backdrop { display: block; position: fixed; inset: 66px 0 0; z-index: 1034; border: 0; background: #00000099; }
    .auth-layout .auth-main-content { width: 100%; margin: 0; padding: 0 0 calc(70px + env(safe-area-inset-bottom)); min-height: calc(100dvh - 66px); }
    .workspace-topbar { min-height: 65px; padding: 10px 20px; }
    .workspace-context { display: none; }
    .workspace-eyebrow { font-size: 9px; }
    .auth-layout .auth-content-wrapper { padding: 24px 18px; }
    .auth-layout .modern-page-header { margin-bottom: 22px; }
    .auth-layout .modern-page-title { font-size: 27px; letter-spacing: -.8px; }
    .auth-layout .modern-page-subtitle { font-size: 13px; }
    .workspace-welcome { padding: 24px; border-radius: 18px; }
    .auth-layout .workspace-welcome { padding-bottom: 24px; }
    .workspace-welcome-art { display: none; }
    .workspace-shortcuts { grid-template-columns: 1fr; gap: 8px; margin-bottom: 24px; }
    .workspace-shortcut { padding: 12px 16px; }
    .workspace-shortcut small { display: block; }
    .auth-layout :is(.modern-card-body, .card-body, .stat-card) { padding: 18px; }
    .auth-layout :is(.modern-card-header, .card-header, .modern-card-footer, .card-footer) { padding: 16px 18px; }
    .auth-layout :is(.form-control, .form-select, .modern-input, .modern-select, .modern-textarea, .rz-textbox, .rz-dropdown, .rz-numeric-input, .rz-datepicker input) { font-size: 16px; }
    .auth-layout :is(.btn, .modern-btn) { min-height: 44px; }
    .auth-layout .modern-btn-group { flex-wrap: wrap; }
    /* Keep headers and values together; the legacy CSS hid columns and
       converted unlabeled cells into cards on small screens. */
    .auth-layout .table thead { display: table-header-group; }
    .auth-layout .table tbody tr { display: table-row; border: 0; box-shadow: none; }
    .auth-layout .table :is(th, td),
    .auth-layout .table thead th:nth-child(n+4),
    .auth-layout .table tbody td:nth-child(n+4) { display: table-cell; padding: 12px 14px; text-align: left; }
    .auth-layout .table tbody td::before { display: none; }
    .auth-layout .table-responsive > .table { min-width: 540px; }
    .auth-layout .input-group { flex-wrap: wrap; }
    .auth-layout .input-group > .form-control { min-width: 0; }
    .auth-layout .auth-mobile-nav { display: flex; position: fixed; bottom: 0; height: auto; min-height: 66px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: #101010; border-top: 1px solid #242424; box-shadow: 0 -4px 20px #00000040; z-index: 1030; }
    .auth-layout .auth-mobile-nav-item { flex: 1; padding: 8px 4px; min-height: 48px; gap: 5px; color: #b9b5c9; font-size: 10px; border-radius: 10px; }
    .auth-layout .auth-mobile-nav-item i { font-size: 19px; }
    .auth-layout .auth-mobile-nav-item.active { color: #fff; background: #242424; }
    .auth-layout .auth-mobile-nav-item.active::after { display: none; }
    .workspace-footer { padding: 8px 20px 22px; flex-wrap: wrap; }
    .auth-layout .notification-panel { position: fixed; top: 125px; left: 12px; right: 12px; width: auto; max-width: none; max-height: calc(100dvh - 210px); overflow-y: auto; }
    .auth-layout .modal-dialog { margin: 12px; max-width: calc(100% - 24px); }
    .auth-layout .modern-page-header .d-flex > .modern-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-layout *, .auth-layout *::before, .auth-layout *::after { transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Quemi link: one-click copy/share control. A pill in the desktop topbar, an
   icon button in the mobile header (top right, beside the menu), both opening
   the same panel. Markup lives in Shared/Components/QuemiLinkShare.razor. */
.quemi-link { position: relative; display: inline-flex; flex-shrink: 0; }
.quemi-link-trigger { display: inline-flex; align-items: center; justify-content: flex-start; gap: 9px; height: 42px; min-height: 42px; max-width: 380px; padding: 0 14px 0 13px; border: 1px solid #e5e3ed; border-radius: 9999px; background: #fff; color: #494553; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: border-color .15s, color .15s, background-color .15s; }
.quemi-link-trigger:hover { border-color: #aaa5c0; color: #5228f5; }
.quemi-link-trigger > i:first-child { color: #5228f5; font-size: 13px; }
.quemi-link-trigger-text { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.quemi-link-trigger-url { color: #6b6878; font-weight: 500; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; }
.quemi-link-trigger-copy { color: #6b6878; font-size: 13px; }
.quemi-link-trigger-short { display: none; }
.quemi-link-trigger.is-copied { border-color: #5228f5; background: #f3f2f8; color: #5228f5; }
.quemi-link-trigger.is-copied .quemi-link-trigger-copy { display: none; }
.quemi-link-backdrop { position: fixed; inset: 0; z-index: 1049; border: 0; margin: 0; padding: 0; background: transparent; cursor: default; }
.quemi-link-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 1050; width: 380px; max-width: calc(100vw - 24px); padding: 18px 18px 16px; background: #fff; border: 1px solid #e5e3ed; border-radius: 16px; box-shadow: 0 18px 50px #24232b26; color: #24232b; text-align: left; animation: quemi-link-pop .15s ease-out; }
@keyframes quemi-link-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.quemi-link-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.quemi-link-panel-head strong { font-size: 14px; font-weight: 650; }
.quemi-link-panel-head strong i { color: #5228f5; margin-right: 4px; }
.quemi-link-close { width: 32px; height: 32px; min-height: 32px; flex-shrink: 0; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f3f2f8; color: #494553; cursor: pointer; }
.quemi-link-close:hover { background: #e5e3ed; color: #24232b; }
.quemi-link-status { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; color: #6b6878; font-size: 12px; line-height: 1.5; }
.quemi-link-status.is-copied { color: #5228f5; font-weight: 600; }
.auth-layout .quemi-link-input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d5d2e3; border-radius: 9px; background: #fafafd; color: #24232b; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; cursor: text; }
.auth-layout .quemi-link-input:focus { border-color: #9379f5; box-shadow: 0 0 0 3px #5228f515; outline: 0; }
.quemi-link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.auth-layout .quemi-link-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 14px; border: 1px solid #e5e3ed; border-radius: 9px; background: #fff; color: #494553; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s; }
.auth-layout .quemi-link-btn:hover { background: #f3f2f8; color: #24232b; }
.auth-layout .quemi-link-btn-primary { background: #242424; border-color: #242424; color: #fff; }
.auth-layout .quemi-link-btn-primary:hover { background: #101010; border-color: #101010; color: #fff; }
.quemi-link-hint { margin: 12px 0 0; color: #6b6878; font-size: 12px; line-height: 1.5; }
/* First-run callout with an arrow at the trigger; custom.js remembers the dismissal per browser. */
.quemi-link-callout { position: absolute; top: calc(100% + 14px); right: 0; z-index: 1048; width: 300px; padding: 14px 16px; background: #fff; border: 1px solid #d5d2e3; border-radius: 14px; box-shadow: 0 16px 40px #24232b24; color: #24232b; text-align: left; animation: quemi-link-pop .2s ease-out; }
.quemi-link-callout::before { content: ""; position: absolute; top: -8px; right: 28px; width: 14px; height: 14px; background: #fff; border-left: 1px solid #d5d2e3; border-top: 1px solid #d5d2e3; transform: rotate(45deg); }
.quemi-link-callout-eyebrow { display: block; margin-bottom: 4px; color: #5228f5; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.quemi-link-callout p { margin: 0 0 10px; color: #494553; font-size: 13px; line-height: 1.5; }
.auth-layout .quemi-link-callout-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border: 1px solid #242424; border-radius: 9px; background: #242424; color: #fff; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.auth-layout .quemi-link-callout-btn:hover { background: #101010; color: #fff; }
.auth-layout.menu-open .quemi-link-callout { display: none; }
@media (min-width: 769px) and (max-width: 1100px) {
    .quemi-link-trigger-url { display: none; }
}
@media (max-width: 768px) {
    .workspace-mobile-actions { display: flex; align-items: center; gap: 8px; }
    .workspace-topbar-actions .quemi-link { display: none; }
    .workspace-mobile-header .quemi-link-trigger { width: 100px; height: 44px; min-height: 44px; padding: 0; gap: 7px; justify-content: center; border-radius: 10px; border-color: #333; background: #242424; color: #fff; font-size: 12px; }
    .workspace-mobile-header .quemi-link-trigger > i:first-child { color: #fff; font-size: 14px; }
    .workspace-mobile-header .quemi-link-trigger-text, .workspace-mobile-header .quemi-link-trigger-copy { display: none; }
    .workspace-mobile-header .quemi-link-trigger-short { display: inline; }
    /* Fixed like the panel; the arrow sits under the pill centre: 20px padding + 44px menu + 8px gap + 50px, minus the 12px margin and half the arrow. */
    .quemi-link-callout { position: fixed; top: 78px; right: 12px; left: auto; width: min(320px, calc(100vw - 24px)); }
    .quemi-link-callout::before { right: 103px; }
    .workspace-mobile-header .quemi-link-trigger.is-copied { border-color: #5228f5; background: #5228f5; color: #fff; }
    .quemi-link-backdrop { background: #00000066; }
    .quemi-link-panel { position: fixed; top: 74px; right: 12px; left: 12px; width: auto; max-width: none; max-height: calc(100dvh - 90px); overflow-y: auto; }
    .auth-layout .quemi-link-btn { flex: 1 1 calc(50% - 4px); min-height: 44px; }
}

/* Stat cards on small screens: the icon sits on the left with the label,
   figure and subtitle beside it, instead of a full-width card that stacks
   one number under a lone icon. Grid keeps StatCard.razor's flat markup. */
@media (max-width: 768px) {
    .auth-layout .stat-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 0; align-items: center; padding: 16px 18px; }
    .auth-layout .stat-card-icon { grid-row: 1 / span 4; width: 44px; height: 44px; margin: 0; font-size: 18px; }
    .auth-layout .stat-card-label { margin-bottom: 0; }
    .auth-layout .stat-card-value { margin: 2px 0; font-size: 26px; line-height: 1.2; }
    .auth-layout .stat-card-trend { justify-self: start; margin-top: 6px; }
}

/* Public creator page (/q): Shared/PublicLayout.razor and Shared/ExternalHit.razor.
   The signed-in workspace look without the sidebar. The near-black header
   carries the white logo and the account links; content, cards, controls and
   the footer are the workspace ones above. */
.auth-layout.public-layout { display: flex; flex-direction: column; min-height: 100dvh; }
.public-header { position: sticky; top: 0; z-index: 1036; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 14px 42px; background: #101010; border-bottom: 1px solid #242424; }
.public-header .workspace-logo { height: 32px; }
.public-nav { display: flex; align-items: center; gap: 8px; }
.auth-layout .public-nav-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 14px; border-radius: 9px; color: #b9b5c9; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color .15s, color .15s; }
.auth-layout .public-nav-link:hover { color: #fff; background: #1c1c1c; }
.public-nav-link i { font-size: 14px; }
.auth-layout .public-nav-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 20px; border: 1px solid #fff; border-radius: 9999px; background: #fff; color: #101010; font-size: 13px; font-weight: 650; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.auth-layout .public-nav-cta:hover { background: #cbf3ed; border-color: #cbf3ed; color: #101010; }
.public-nav-cta-short { display: none; }
.public-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.auth-layout.public-layout .auth-content-wrapper { max-width: 1200px; }

/* Creator hero: the dashboard welcome card holding the picture, name, bio and social links. */
.creator-hero { position: relative; overflow: hidden; display: flex; gap: 28px; align-items: flex-start; padding: 36px; margin-bottom: 24px; background: radial-gradient(ellipse at top right, #9379f526, transparent 65%), #101010; border: 1px solid #242424; border-radius: 22px; color: #fff; }
.creator-avatar { position: relative; z-index: 1; width: 112px; height: 112px; flex-shrink: 0; overflow: hidden; border: 6px solid #ffffff12; border-radius: 30px; background: linear-gradient(135deg, #63bddf, #9379f5); color: #101010; display: grid; place-items: center; font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.creator-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.creator-hero-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.creator-hero .workspace-eyebrow { margin-bottom: 12px; color: #b9b5c9; }
.auth-layout .creator-hero .modern-page-title { margin-bottom: 6px; color: #fff; overflow-wrap: anywhere; }
.creator-hero-business { width: fit-content; max-width: 100%; margin: 0 0 10px; font-size: 14px; font-weight: 600; color: #cbf3ed; }
@supports (background-clip: text) {
    .creator-hero-business { background: linear-gradient(90deg, #63bddf, #cbf3ed, #9379f5); background-clip: text; color: transparent; }
}
.creator-hero-bio { max-width: 680px; margin: 0; color: #c4c1d0; font-size: 14px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.creator-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.auth-layout .creator-social-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid #333; border-radius: 9999px; background: #242424; color: #fff; font-size: 12px; font-weight: 600; transition: background-color .15s, border-color .15s; }
.auth-layout .creator-social-link:hover { background: #2e2e2e; border-color: #4a4a4a; color: #fff; }
.creator-social-link i { font-size: 14px; color: #cbf3ed; }

/* Service switch: a segmented control; only the services the creator offers appear. */
.creator-services { display: flex; gap: 6px; padding: 6px; margin-bottom: 24px; background: #fff; border: 1px solid #e5e3ed; border-radius: 14px; }
.auth-layout .creator-tab { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent; color: #494553; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; cursor: pointer; transition: background-color .15s, color .15s; }
.auth-layout .creator-tab:hover { background: #f3f2f8; color: #24232b; }
.auth-layout .creator-tab.is-active { background: #101010; color: #fff; }
.creator-tab i { font-size: 14px; color: #6b6878; }
.creator-tab.is-active i { color: #cbf3ed; }
.creator-tab-short { display: none; }

/* Packages on the left, the form on the right; one column on small screens. */
.creator-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
.creator-grid > * { min-width: 0; }
.creator-grid-single { grid-template-columns: minmax(0, 1fr); }
.creator-option-list { display: flex; flex-direction: column; gap: 10px; }
.creator-option { position: relative; display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 16px; border: 1px solid #e5e3ed; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.creator-option:hover { border-color: #aaa5c0; }
.creator-option.is-selected { border-color: #5228f5; background: #fafafd; box-shadow: 0 0 0 3px #5228f515; }
.creator-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.creator-option:has(input:focus-visible) { outline: 3px solid #9379f5; outline-offset: 3px; }
.creator-option-indicator { flex-shrink: 0; box-sizing: border-box; width: 20px; height: 20px; margin-top: 1px; border: 2px solid #c9c5d8; border-radius: 50%; background: #fff; transition: border-color .15s, border-width .15s; }
.creator-option.is-selected .creator-option-indicator { border: 6px solid #5228f5; }
.creator-option-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.creator-option-title { font-size: 14px; font-weight: 650; color: #24232b; }
.creator-option-meta { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.5; color: #6b6878; }
.creator-option-meta i { margin-top: 3px; }
.creator-option-desc { font-size: 12px; line-height: 1.5; color: #6b6878; }
.creator-option-price { flex-shrink: 0; font-size: 15px; font-weight: 700; letter-spacing: -.3px; color: #24232b; font-variant-numeric: tabular-nums; }
.creator-option.is-selected .creator-option-price { color: #5228f5; }

/* Forms: the workspace controls, plus a two-up row, file chips, the order
   summary strip, the sign-in prompt for visitors and the small print. */
.creator-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.creator-required { color: #ba3849; }
.creator-field-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 7px; font-size: 12px; line-height: 1.5; color: #6b6878; }
.creator-field-hint i { margin-top: 3px; }
.creator-field-hint.is-error { color: #ba3849; }
.creator-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.creator-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 5px 5px 12px; border: 1px solid #e5e3ed; border-radius: 9999px; background: #fafafd; font-size: 12px; color: #494553; }
.creator-file i { color: #6b6878; }
.creator-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-layout .creator-file-remove { width: 28px; height: 28px; min-height: 28px; flex-shrink: 0; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f3f2f8; color: #494553; cursor: pointer; }
.auth-layout .creator-file-remove:hover { background: #e5e3ed; color: #ba3849; }
.creator-summary { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin: 4px 0 16px; padding: 16px 18px; border: 1px solid #e5e3ed; border-radius: 12px; background: #fafafd; }
.creator-summary-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 140px; }
.creator-summary-amount { flex: 0 0 auto; margin-left: auto; text-align: right; }
.creator-summary-label { font-size: 10px; font-weight: 700; letter-spacing: 1.4px; color: #6b6878; }
.creator-summary-value { font-size: 14px; font-weight: 650; color: #24232b; overflow-wrap: anywhere; }
.creator-summary-meta { font-size: 12px; color: #6b6878; }
.creator-summary-total { font-size: 22px; letter-spacing: -.6px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.creator-signin { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; padding: 18px 20px; border: 1px solid #e5e3ed; border-radius: 12px; background: #f3f2f8; }
.creator-signin-copy { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.creator-signin-copy strong { font-size: 14px; font-weight: 650; }
.creator-signin-copy span { font-size: 12px; line-height: 1.5; color: #6b6878; }
.auth-layout .creator-signin-btn { flex: 0 0 auto; margin: 0; }
.auth-layout .creator-submit-btn { width: 100%; min-height: 48px; font-size: 14px; }
.creator-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: #6b6878; }
.creator-note i { margin-top: 3px; }

/* Digital products: a storefront grid; the selected product gets the primary outline. */
.creator-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 340px)); gap: 16px; }
.creator-product { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e5e3ed; border-radius: 16px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.creator-product:hover { border-color: #aaa5c0; box-shadow: var(--shadow-md); }
.creator-product.is-selected, .creator-product.is-selected:hover { border-color: #5228f5; box-shadow: 0 0 0 3px #5228f515; }
.auth-layout .creator-product-media { display: grid; place-items: center; width: 100%; height: 176px; padding: 0; border: 0; border-radius: 0; background: #f3f2f8; color: #6b6878; cursor: pointer; overflow: hidden; }
.creator-product-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.creator-product-media i { font-size: 34px; }
.creator-product-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.creator-product-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.creator-product-title { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.2px; overflow-wrap: anywhere; }
.creator-chip { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 6px; background: #f3f2f8; color: #494553; font-size: 11px; font-weight: 600; white-space: nowrap; }
.creator-product-desc { flex: 1; margin: 0; font-size: 13px; line-height: 1.6; color: #6b6878; overflow-wrap: anywhere; }
.creator-product-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.creator-product-price { font-size: 20px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.creator-product-sales { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #6b6878; }
.auth-layout .creator-product-btn { width: 100%; margin: 6px 0 0; }
.creator-summary-products { margin-top: 20px; }

/* Empty and not-found states. */
.creator-empty-icon { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 22px; background: #f3f2f8; color: #6b6878; font-size: 26px; }
.auth-layout .creator-empty-state .modern-empty-state-title { font-size: 22px; letter-spacing: -.5px; }
.auth-layout .creator-empty-state .btn { width: auto; }

@media (min-width: 769px) and (max-width: 1100px) {
    .public-header { padding: 14px 24px; }
    .creator-hero { padding: 28px; }
    .creator-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 900px) {
    .creator-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
    .public-header { min-height: 66px; padding: 10px 16px 10px 20px; }
    .public-header .workspace-logo { height: 28px; }
    .public-nav { gap: 4px; }
    .auth-layout .public-nav-link { min-height: 44px; padding: 0 10px; }
    .auth-layout .public-nav-link-icon span { display: none; }
    .auth-layout .public-nav-cta { min-height: 44px; padding: 0 16px; }
    .public-nav-cta-long { display: none; }
    .public-nav-cta-short { display: inline; }
    .auth-layout.public-layout .auth-content-wrapper { padding: 20px 16px 28px; }
    .creator-hero { flex-direction: column; gap: 18px; padding: 24px 20px; margin-bottom: 18px; border-radius: 18px; }
    .creator-avatar { width: 84px; height: 84px; border-width: 5px; border-radius: 24px; font-size: 28px; }
    .creator-hero .workspace-eyebrow { margin-bottom: 10px; }
    .creator-social { margin-top: 14px; }
    .creator-services { gap: 4px; padding: 4px; margin-bottom: 18px; }
    .auth-layout .creator-tab { min-height: 44px; padding: 6px 8px; font-size: 12px; }
    .creator-tab-long { display: none; }
    .creator-tab-short { display: inline; }
    .creator-grid { gap: 16px; }
    .creator-form-row { grid-template-columns: minmax(0, 1fr); }
    .creator-option { padding: 12px 14px; gap: 10px; }
    .creator-summary { padding: 14px 16px; gap: 10px 16px; }
    .creator-signin { padding: 16px; }
    .auth-layout .creator-signin-btn { width: 100%; }
    .creator-products { grid-template-columns: minmax(0, 1fr); }
}
