/* Reback v1.0 integration. The original compiled theme supplies Bootstrap,
   cards, typography, navigation and controls. These aliases adapt CRM modules
   and accessible progressive controls without importing the demo runtime. */
.reback[data-bs-theme="light"] {
  --bs-body-color: #334155;
  --bs-body-color-rgb: 51, 65, 85;
}
.reback {
  --bg: var(--bs-body-bg);
  --surface: var(--bs-secondary-bg);
  --surface-2: var(--bs-tertiary-bg);
  --surface-3: var(--bs-light);
  --line: var(--bs-border-color);
  --line-2: var(--bs-border-color);
  --ink: var(--bs-headings-color);
  --ink-2: var(--bs-body-color);
  --ink-3: var(--bs-secondary-color);
  --accent: var(--bs-primary);
  --accent-hi: #1870ca;
  --accent-ink: var(--bs-primary-text-emphasis);
  --accent-soft: var(--bs-primary-bg-subtle);
  --on-accent: #fff;
  --ok: var(--bs-success-text-emphasis);
  --ok-soft: var(--bs-success-bg-subtle);
  --warn: var(--bs-warning-text-emphasis);
  --warn-soft: var(--bs-warning-bg-subtle);
  --danger: var(--bs-danger-text-emphasis);
  --danger-soft: var(--bs-danger-bg-subtle);
  --font-sans: "Wix Madefor Text", sans-serif;
  --font-serif: var(--font-sans);
  --fs-body: 14px;
  --fs-sm: 12px;
  --sidebar-w: 260px;
  --rail-w: 75px;
  --r-sm: .3rem;
  --r-md: .3rem;
  --r-lg: .3rem;
  --r-xl: .3rem;
  --r-2xl: .3rem;
  --sh-1: var(--bs-box-shadow);
  --sh-2: 0 4px 16px rgb(49 59 94 / 8%);
  --sh-3: 0 8px 28px rgb(49 59 94 / 16%);
  --sh-accent: none;
}
.reback body.app { display: block; background: var(--bs-body-bg); font-family: var(--font-sans); font-size: 14px; line-height: 1.5; color: var(--bs-body-color); }
.reback [hidden] { display: none !important; }
.reback :focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 3px; }
.reback .icon { display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: middle; }
.reback :is(.icon-sm, .btn-sm .icon) { width: 15px; height: 15px; }
.reback .muted { color: var(--bs-secondary-color); }
.reback .row:not(:has(> [class*="col-"])) { margin: 0; gap: 10px; align-items: center; }
.reback .row:not(:has(> [class*="col-"])) > * { width: auto; max-width: 100%; padding: 0; margin-top: 0; flex-shrink: 1; }
.reback .row:not(:has(> [class*="col-"])) > .grow { flex: 1; }
.reback .wrapper .main-nav.sidebar { left: 0; display: block; padding: 0; height: 100dvh; margin: 0; border-radius: 0; overflow: hidden; backdrop-filter: none; color: var(--bs-main-nav-item-color); }
.reback .main-nav .logo-box { height: 70px; display: flex; align-items: center; padding: 0 24px; }
.reback .main-nav .brand { display: flex; gap: 10px; padding: 0; width: 100%; line-height: 1.25; }
.reback .main-nav .brand-symbol { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: .3rem; font-size: 24px; font-weight: 800; line-height: 1; color: #fff; background: var(--bs-primary); }
.reback .main-nav .brand-text { display: flex; height: auto; margin: 0; }
.reback .main-nav .brand-name { color: var(--bs-headings-color); font-size: 19px; letter-spacing: -.5px; }
.reback .main-nav .brand-name > span { color: var(--bs-primary); }
.reback .main-nav .brand-sub { color: var(--bs-secondary-color); font-size: 12px; margin: 0; }
.reback .wrapper .main-nav .sidebar-scroll { height: calc(100dvh - 150px); overflow: hidden auto; scrollbar-width: thin; scrollbar-color: var(--bs-border-color) transparent; padding-block: 10px; }
.reback .main-nav .navbar-nav { padding: 0; margin: 0; list-style: none; }
.reback .wrapper .main-nav .navbar-nav .nav-item .nav-link { border-radius: 0; min-height: 42px; box-shadow: none; }
.reback .main-nav .nav-link .icon { width: 22px; height: 22px; color: inherit; }
.reback .main-nav .nav-link .nav-icon { width: 24px; flex: none; }
.reback .main-nav .saved { display: block; padding: 0; margin-top: 12px; border: 0; }
.reback .shortcut-dot { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--bs-primary); }
.reback .shortcut-amber { background: var(--bs-warning); }
.reback .shortcut-magenta { background: var(--bs-purple); }
.reback .sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 16px 14px; height: 80px; border-top: 1px solid var(--bs-border-color); background: var(--bs-main-nav-bg); }
.reback .sidebar-foot .me { display: flex; flex: 1; align-items: stretch; flex-direction: column; min-width: 0; margin: 0; gap: 0; padding: 0; background: transparent; }
.reback .sidebar-foot .me-name { color: var(--bs-headings-color); font-size: 12px; }
.reback .sidebar-foot .me-role { color: var(--bs-secondary-color); font-size: 12px; }
.reback .sidebar-foot .icon-button { width: 26px; height: 32px; padding: 4px; background: transparent; color: var(--bs-secondary-color); border: 0; }
.reback .user-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; font-size: 12px; border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); box-shadow: none; }
.reback .workspace-topbar { display: block; min-height: 70px; margin: 0; padding: 0 0 0 var(--bs-main-nav-width); border-bottom: 1px solid var(--bs-border-color); }
.reback .topbar > .container-fluid { padding-inline: 24px; }
.reback .navbar-header { height: 70px; gap: 16px; }
.reback .topbar-start { min-width: 0; }
.reback .topbar .app-search { position: relative; width: clamp(180px, 26vw, 350px); }
.reback .workspace-search-trigger { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--bs-secondary-color); }
.reback .workspace-search-trigger > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reback .workspace-search-trigger kbd { background: transparent; color: var(--bs-secondary-color); padding: 0; font-size: 12px; }
.reback .workspace-tools { flex: none; }
.reback .icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 8px; border: 0; border-radius: .3rem; background: transparent; color: var(--bs-secondary-color); }
.reback .icon-button:hover { background: var(--bs-tertiary-bg); color: var(--bs-primary); }
.reback .topbar .icon-button .icon { width: 22px; height: 22px; }
.reback .topbar .theme-switch { display: flex; padding: 0; gap: 0; border: 0; border-radius: 0; background: transparent; }
.reback .theme-switch .icon-button { width: 32px; height: 34px; padding: 7px; box-shadow: none; }
.reback .theme-switch .icon-button .icon { width: 18px; height: 18px; }
.reback .theme-switch [aria-pressed=true] { color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.reback .workspace-profile { gap: 9px; margin-left: 12px; }
.reback .workspace-profile-text { display: flex; flex-direction: column; max-width: 150px; font-size: 12px; }
.reback .workspace-profile-text strong { font-weight: 600; color: var(--bs-headings-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reback .workspace-profile-text span { font-size: 12px; color: var(--bs-secondary-color); }
.reback .notification-count { position: absolute; font-size: 12px; min-width: 16px; padding: 3px; }
.reback .wrapper .page-content.main { padding: 20px 10px 60px; min-width: 0; }
.reback .content { max-width: none; width: 100%; padding: 0 14px; display: flex; flex-direction: column; gap: 20px; }
.reback .workspace-footer { padding: 18px 24px; left: 0; right: 0; font-size: 12px; color: var(--bs-secondary-color); }
.reback .workspace-footer > div { display: flex; justify-content: space-between; padding: 0; }
.reback .page-header { margin: 0; min-height: 48px; align-items: center; gap: 16px; }
.reback .page-title, .reback .partner-identity h1 { font-family: var(--font-sans); font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: 0; margin: 0; }
.reback .page-heading { gap: 4px; }
.reback .page-heading > p:not(.workspace-eyebrow) { font-size: 13px; color: var(--bs-secondary-color); margin: 4px 0 0; }
.reback .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reback .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: auto; min-height: 38px; box-shadow: none; transform: none; white-space: normal; }
.reback .btn:not([class*="btn-primary"]):not([class*="btn-danger"]):not([class*="btn-success"]):not([class*="btn-warning"]):not([class*="btn-outline"]):not([class*="btn-link"]) { --bs-btn-color: var(--bs-body-color); --bs-btn-bg: var(--bs-secondary-bg); --bs-btn-border-color: var(--bs-border-color); --bs-btn-hover-color: var(--bs-headings-color); --bs-btn-hover-bg: var(--bs-tertiary-bg); --bs-btn-hover-border-color: var(--bs-border-color); }
.reback .btn:hover, .reback .btn:active { transform: none; box-shadow: none; }
.reback .btn-sm { min-height: 30px; }
.reback .btn .icon { width: 16px; height: 16px; }
.reback .card { overflow: visible; }
.reback .card.form:not(.card-body) { padding: 20px; }
.reback [data-contact-formset] > [data-rows] > .card { padding: 20px; }
.reback .card-head, .reback .section-heading { padding: 15px 20px; border-bottom: 1px solid var(--bs-border-color); }
.reback .card-head > :is(h2,h3), .reback .section-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.reback .card-head + .card-body { padding-top: 20px; }
.reback .card-foot { padding: 15px 20px; border-top: 1px solid var(--bs-border-color); }
.reback .card-title, .reback .label { font-size: 15px; color: var(--bs-headings-color); font-weight: 600; letter-spacing: 0; text-transform: none; }
.reback .stack { gap: 20px; }
.reback .badge, .reback .pill { font-size: 12px; border-radius: .3rem; }
.reback .badge:not([class*="badge-soft-"]):not([class*="bg-"]) { --bs-badge-color: var(--bs-body-color); }
.reback :is(.badge-success,.badge-ok,.pill-ok) { color: var(--ok); background: var(--ok-soft); }
.reback :is(.badge-warning,.badge-warn,.pill-warn) { color: var(--warn); background: var(--warn-soft); }
.reback :is(.badge-danger,.pill-danger) { color: var(--danger); background: var(--danger-soft); }
.reback :is(.badge-accent,.pill-accent) { color: var(--accent-ink); background: var(--accent-soft); }
.reback .pill { padding: 4px 8px; min-height: 22px; }
.reback .field { gap: 7px; }
.reback .field > label, .reback .field .checkbox { color: var(--bs-body-color); font-weight: 500; font-size: 14px; }
.reback .field input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
.reback .field select, .reback .field textarea, .reback .input, .reback .combobox-control,
.reback .auth-card input:not([type=checkbox]):not([type=hidden]), .reback .auth-card select {
  width: 100%; min-height: 39px; height: auto; padding: .5rem 1rem; font-family: var(--font-sans); font-size: 14px; font-weight: 400; line-height: 1.5;
  border: 1px solid var(--bs-input-border-color); border-radius: .3rem; background: var(--bs-secondary-bg); color: var(--bs-body-color); box-shadow: none;
}
.reback .input-search { max-width: none; }
.reback .field input:focus, .reback .field textarea:focus, .reback .input:focus, .reback .combobox-control:focus-visible, .reback .combobox.is-open .combobox-control { outline: 0; border-color: var(--bs-primary); box-shadow: 0 0 0 .15rem rgb(var(--bs-primary-rgb) / 12%); }
.reback .field input:disabled, .reback .field textarea:disabled, .reback .combobox.is-disabled .combobox-control { background: var(--bs-tertiary-bg); opacity: .65; }
.reback .field :is(input,textarea)::placeholder, .reback .input::placeholder { color: var(--bs-secondary-color); opacity: .8; }
.reback .field.has-error :is(input,select,textarea), .reback .combobox.is-invalid .combobox-control { border-color: var(--bs-danger); }
.reback .field :is(.hint,.helptext) { font-size: 12px; color: var(--bs-secondary-color); }
.reback .field textarea { min-height: 110px; }
.reback input[type=checkbox], .reback input[type=radio] { width: 17px; height: 17px; accent-color: var(--bs-primary); }
.reback .business-fields, .reback .form-section, .reback .contract-policy { border-radius: .3rem; }
.reback .combobox-control { gap: 10px; }
.reback .combobox-popover { z-index: 2000; border-radius: .3rem; padding: 0; box-shadow: var(--sh-3); border-color: var(--bs-input-border-color); }
.reback .combobox-search { margin: 0; padding: 10px 14px; height: 41px; font-size: 14px; border-radius: .3rem .3rem 0 0; }
.reback .combobox-list { padding: 4px; }
.reback .combobox-option { padding: 9px 11px; font-size: 14px; border-radius: .2rem; }
.reback .combobox-chip { border-radius: .3rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); font-size: 12px; }
.reback .combobox-group { font-size: 12px; }
.reback .combobox-count { font-size: 12px; padding: 8px 14px; }
.reback .filters, .reback .filter-panel { border-radius: .3rem; padding: 20px; gap: 16px; box-shadow: var(--bs-box-shadow); }
.reback .filter-main { gap: 16px; }
.reback .filter-main .input, .reback .field > .input-search { height: 39px; min-height: 39px; }
.reback .filter-main > .btn { min-height: 39px; }
.reback .filter-more > summary { font-size: 13px; }
.reback .active-filter, .reback .active-filter-label { font-size: 12px; }
.reback .active-filter { border-radius: .3rem; }
.reback .table { font-size: 14px; border-radius: 0; border-collapse: collapse; }
.reback .table > :not(caption) > * > * { padding: 13px 16px; }
.reback .table thead th { color: var(--bs-headings-color); background: var(--bs-tertiary-bg); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.reback .table td { font-size: 14px; }
.reback .table .muted.small { font-size: 12px; }
.reback .table tbody tr:hover > * { --bs-table-bg-state: var(--bs-tertiary-bg); }
.reback .table-wrap { max-width: 100%; overflow-x: auto; }
.reback .richtext-editor { border-radius: 0 0 .3rem .3rem; font-size: 14px; }
.reback .richtext-toolbar, .reback .document-dropzone, .reback .document-file-icon, .reback .document-upload-summary, .reback .fact { border-radius: .3rem; }
.reback .richtext-tool { font-size: 12px; }
.reback .detail-tabs { gap: 12px; }
.reback .detail-tab { font-size: 14px; min-height: 44px; }
.reback .partner-identity { gap: 6px; }
.reback .kv dt { font-size: 13px; }
.reback .kv dd, .reback .entry-body, .reback .entry-text { font-size: 14px; }
.reback .entry-ico { border-radius: .3rem; }
.reback .timeline.timeline-list { list-style: none; padding: 0; margin: 20px; }
.reback .timeline.timeline-list::before { left: 14px; top: 10px; bottom: 10px; }
.reback .timeline-list .timeline-item { position: relative; display: flex; gap: 12px; width: 100%; padding: 0; }
.reback .timeline-list .timeline-item::before, .reback .timeline-list .timeline-item::after { display: none; }
.reback .timeline-list .timeline-marker { position: relative; z-index: 1; border-radius: .3rem; }
.reback ol.timeline:not(.timeline-list)::before { display: none; }
.reback .alert { font-size: 14px; border-radius: .3rem; }
.reback .command-palette { border-radius: .3rem; }
.reback .toasts { z-index: 2100; }
.reback .toasts .toast { display: flex; opacity: 1; font-family: var(--font-sans); background: var(--bs-secondary-bg); color: var(--bs-body-color); border-radius: .3rem; }
.reback #partner-notes, .reback [data-panel] { scroll-margin-top: 90px; }
.reback .public-header { max-width: 1440px; }
.reback .public-header .brand { line-height: 1.25; }
.reback .public-header .brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: .3rem; background: var(--bs-primary); color: #fff; font-size: 24px; font-weight: 800; }
.reback .auth-card { padding: 28px; }
.reback .auth-card h1 { font-size: 24px; font-weight: 600; letter-spacing: 0; }
.reback .auth-card form { gap: 16px; }
.reback .auth-card button[type=submit] { border-radius: .3rem; background: var(--bs-primary); font-weight: 500; }
.reback .public a:not(.btn):not(.brand) { color: var(--bs-primary-text-emphasis); text-decoration: underline; text-underline-offset: 2px; }
.reback .input-group { display: flex; flex-wrap: nowrap; }
.reback .input-group > input { flex: 1; width: auto !important; min-width: 0; }
.reback .input-group > span { display: flex; align-items: center; padding-inline: 10px; border: 1px solid var(--bs-input-border-color); border-left: 0; background: var(--bs-tertiary-bg); white-space: nowrap; }
.reback body.app > main.content { width: min(720px,100%); margin: 48px auto; padding: 16px; }

/* Full-width desktop and compact rail; mobile uses our accessible drawer. */
@media (min-width: 768px) {
  .reback body.is-sidebar-collapsed .wrapper .main-nav { width: 75px; min-width: 75px; padding: 0; }
  .reback body.is-sidebar-collapsed .wrapper .page-content { margin-left: 75px; }
  .reback body.is-sidebar-collapsed .topbar { padding-left: 75px; }
  .reback body.is-sidebar-collapsed .main-nav :is(.brand-text,.nav-text,.nav-count,.menu-title,.saved,.sidebar-foot .me,.sidebar-foot .user-avatar,.sidebar-foot form) { display: none; }
  .reback body.is-sidebar-collapsed .main-nav .logo-box { padding-inline: 20px; }
  .reback body.is-sidebar-collapsed .main-nav .nav-link { justify-content: center; padding-inline: 0; }
  .reback body.is-sidebar-collapsed .sidebar-foot { justify-content: center; }
  .reback body:not(.is-sidebar-collapsed) .main-nav .brand-text { display: flex; }
  .reback body:not(.is-sidebar-collapsed) .main-nav .nav-text { display: inline; }
  .reback body:not(.is-sidebar-collapsed) .main-nav .menu-title { display: block; }
  .reback body:not(.is-sidebar-collapsed) .main-nav .saved { display: block; }
  .reback body:not(.is-sidebar-collapsed) .sidebar-foot .me { display: flex; }
}
@media (max-width: 1279px) and (min-width: 768px) {
  .reback .workspace-profile-text { display: none; }
  .reback .topbar-new span { display: none; }
  .reback .topbar-new { width: 38px; padding-inline: 0; }
  .reback .topbar .app-search { width: clamp(120px,25vw,300px); }
  .reback .workspace-search-trigger kbd { display: none; }
}
@media (max-width: 767px) {
  .reback .wrapper .main-nav.sidebar { width: min(290px,88vw); min-width: 0; z-index: 1040; transform: translateX(-100%); visibility: hidden; }
  .reback .wrapper .main-nav.sidebar.is-open { transform: none; visibility: visible; }
  .reback .sidebar-backdrop { z-index: 1030; border: 0; border-radius: 0; background: rgb(15 23 42 / 45%); }
  .reback .main-nav .brand-text, .reback body.is-sidebar-collapsed .main-nav .brand-text { display: flex; }
  .reback .main-nav .saved, .reback .sidebar-foot .me { display: flex; }
  .reback .wrapper .page-content.main { margin-left: 0; padding: 18px 0 90px; }
  .reback .content { padding-inline: 16px; gap: 18px; }
  .reback .topbar.workspace-topbar { padding: 0 !important; }
  .reback .topbar > .container-fluid { padding-inline: 12px; }
  .reback .navbar-header { gap: 8px; }
  .reback .topbar-start { flex: 1; }
  .reback .topbar .app-search { display: block; width: auto; }
  .reback .topbar .app-search .workspace-search-trigger { width: 38px; padding: 0; background: transparent; }
  .reback .workspace-search-trigger :is(span,kbd), .reback .workspace-profile-text, .reback .topbar-new span { display: none; }
  .reback .topbar .app-search .search-widget-icon { left: 8px; }
  .reback .topbar-new { width: 38px; padding-inline: 0; }
  .reback .workspace-profile { margin-left: 5px; }
  .reback .workspace-tools { gap: 0 !important; }
  .reback .theme-switch .icon-button { width: 30px; height: 38px; padding: 6px; }
  .reback .page-header { align-items: stretch; flex-direction: column; gap: 12px; }
  .reback .page-title, .reback .partner-identity h1 { font-size: 22px; }
  .reback .page-actions { justify-content: flex-start; }
  .reback .card-body, .reback .card > .card-body.form, .reback .card.form.card-body { padding: 16px; }
  .reback .card.form:not(.card-body) { padding: 16px; }
  .reback .card-head, .reback .section-heading { padding: 15px 16px; }
  .reback .filters, .reback .filter-panel { padding: 16px; }
  .reback .field input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), .reback .field select, .reback .field textarea, .reback .input, .reback .combobox-search { font-size: 16px; }
  .reback .combobox-control, .reback .field input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), .reback .filter-main .input { min-height: 44px; }
  .reback .auth-card input:not([type=checkbox]):not([type=hidden]), .reback .public .input-group > input { min-height: 44px; font-size: 16px; }
  .reback .filter-main { grid-template-columns: minmax(0,1fr); }
  .reback .detail-tab { font-size: 13px; }
  .reback .bottom-nav { z-index: 1020; border-radius: .3rem; left: 12px; right: 12px; bottom: 10px; }
  .reback .bottom-nav-plus { border-radius: .3rem; background: var(--bs-primary); box-shadow: none; }
  .reback .workspace-footer { position: absolute; padding: 12px 16px 85px; }
}
@media (prefers-reduced-motion: reduce) { .reback .main-nav, .reback .topbar, .reback .page-content { transition: none; } }
