/* ==========================================================================
   Retraak UI core. Shared by the public site, the workspace and the admin.
   One source of truth for: glass surfaces, buttons, popups, close buttons,
   scrollbars, focus and motion. Light mode only.
   ========================================================================== */
:root {
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, .95);
  --glass-edge: rgba(226, 232, 240, .85);
  --glass-line: rgba(15, 17, 28, .08);
  --glass-shadow: 0 1px 3px rgba(15, 17, 28, .05), 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  --ui-ink: #0A0D14;
  --ui-accent: var(--accent, #7045E8);
  --ui-ease: cubic-bezier(.22, .8, .3, 1);
}
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: light; }

/* ---- One custom scrollbar everywhere ---- */
* { scrollbar-width: thin; scrollbar-color: rgba(15, 17, 28, .26) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 17, 28, .24); border: 3px solid transparent; background-clip: content-box; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 17, 28, .4); border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---- No focus outlines on buttons, links or inputs ---- */
a:focus, a:focus-visible, button:focus, button:focus-visible, [role="button"]:focus, [tabindex]:focus,
.btn:focus, .btn:focus-visible, summary:focus, summary:focus-visible { outline: none !important; box-shadow: none; }
input:focus, input:focus-visible, select:focus, select:focus-visible, textarea:focus, textarea:focus-visible { outline: none !important; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--accent, #1F2020) 55%, transparent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #1F2020) 12%, transparent) !important;
}
button, .btn, a { -webkit-tap-highlight-color: transparent; }

/* ---- Buttons: one hover / active language ---- */
.btn, button.btn, a.btn { transition: transform .16s var(--ui-ease), background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.btn:hover {  }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled, .btn[disabled], .btn.is-disabled { transform: none; opacity: .55; cursor: not-allowed; }

/* ---- Card surfaces: sharp pure white with specular highlight ---- */
.card:not(.pilot-hero):not(.dash-welcome):not([class*="hero"]):not(.highlight),
.pilot-card, .stat-card, .metric-card, .pilot-kpi {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 32px -4px rgba(15, 23, 42, 0.06) !important;
  color: #0A0D14;
}
[data-theme="dark"] :is(.card:not(.pilot-hero):not(.dash-welcome):not([class*="hero"]):not(.highlight), .pilot-card, .stat-card, .metric-card, .pilot-kpi) {
  background: rgba(17, 24, 39, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 36px -6px rgba(0, 0, 0, 0.45) !important;
}

/* ---- Topbar icon buttons (bell, messages) ---- */
.topbar-icon, #notif-btn, #header-message-btn {
  width: 40px; height: 40px; min-width: 40px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center; position: relative;
}
.topbar-icon svg, #notif-btn svg, #header-message-btn svg { width: 18px; height: 18px; }

/* ==========================================================================
   Popups: ONE system for every <dialog>
   ========================================================================== */
html dialog:not([open]) { display: none !important; }
html dialog[open] {
  display: flex !important; flex-direction: column;
  position: fixed; inset: 0; margin: auto !important; padding: 0 !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important;
  width: min(var(--dlg-w, 640px), calc(100vw - 32px)); max-width: calc(100vw - 32px) !important;
  height: fit-content; max-height: calc(100dvh - 32px) !important; overflow: visible !important;
  animation: ui-dialog-in .22s var(--ui-ease) both;
}
html dialog::backdrop {
  background: rgba(12, 14, 24, .42) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important;
}
html dialog[open]::backdrop { animation: ui-fade-in .2s ease both; }
/* The page behind a popup never scrolls, so there is only ever one scrollbar: the popup's own. */
html:has(dialog[open]) { overflow: hidden; }

/* The visible popup panel */
dialog[open] .admin-edit-dialog-card, dialog[open] .client-request-dialog-card, dialog[open] .checkout-modal-card,
dialog[open] .fx-dialog-inner, dialog[open] .modal-card {
  background: var(--glass-strong) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid var(--glass-edge) !important; border-radius: 24px !important;
  box-shadow: 0 34px 80px -24px rgba(15, 17, 28, .38), 0 2px 6px rgba(15, 17, 28, .06) !important;
  max-height: calc(100dvh - 32px); overflow-y: auto !important; overscroll-behavior: contain;
}
dialog[open] .admin-edit-dialog-card, dialog[open] .client-request-dialog-card {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
}
dialog .admin-edit-dialog-heading, dialog .client-request-dialog-heading {
  position: sticky; top: 0; z-index: 2;
  width: 100% !important; box-sizing: border-box !important; margin: 0 !important;
  padding: 22px 28px 18px !important; border-radius: 24px 24px 0 0 !important;
  background: rgba(255, 255, 255, 0.45) !important; backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important; border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
  display: flex !important; align-items: flex-start !important; justify-content: space-between !important; gap: 16px !important;
}
[data-theme="dark"] dialog .admin-edit-dialog-heading, [data-theme="dark"] dialog .client-request-dialog-heading {
  background: rgba(17, 24, 39, 0.5) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Close button: always a solid circle */
.dialog-close-btn, .modal-close-btn, .modal-close-x, .modal-close, button.close, dialog [data-dialog-close].icon-btn {
  display: inline-grid !important; place-items: center !important; flex: 0 0 34px;
  width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; padding: 0 !important;
  border: 0 !important; border-radius: 50% !important; background: var(--ui-ink) !important; color: #fff !important;
  font-size: 0 !important; line-height: 1 !important; cursor: pointer; text-indent: 0;
  transition: background-color .16s ease, transform .16s var(--ui-ease) !important;
}
.dialog-close-btn svg, .modal-close-btn svg, .modal-close-x svg, dialog [data-dialog-close].icon-btn svg { width: 14px !important; height: 14px !important; stroke: #fff !important; }
.dialog-close-btn:not(:has(svg))::before, .modal-close-btn:not(:has(svg))::before, .modal-close-x:not(:has(svg))::before, .modal-close:not(:has(svg))::before {
  content: "\2715"; font-size: 13px; color: currentColor !important; font-weight: 700;
}
.dialog-close-btn:hover, .modal-close-btn:hover, .modal-close-x:hover, .modal-close:hover, dialog [data-dialog-close].icon-btn:hover { background: var(--ui-accent) !important;  }
.dialog-close-btn:active, .modal-close-btn:active, .modal-close-x:active { transform: scale(.94) !important; }

/* Cancel / action buttons inside popups: comfortable, never tiny */
dialog .form-actions, dialog .modal-actions, dialog .dialog-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
dialog .form-actions .btn, dialog .modal-actions .btn, dialog .dialog-actions .btn, dialog form > .btn {
  min-height: 42px; padding: 0 22px; font-size: 14px; border-radius: 12px; white-space: nowrap;
}
dialog .btn-ghost, dialog .btn:not(.btn-primary):not(.btn-danger):not(.btn-accent):not(.btn-brand) {
  background: #fff; border: 1px solid var(--glass-line); color: var(--ui-ink);
}
dialog .btn-ghost:hover, dialog .btn:not(.btn-primary):not(.btn-danger):not(.btn-accent):not(.btn-brand):hover { background: #f3f4f8; }

@keyframes ui-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ui-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---- Confirmation toasts: locked to top right ---- */
.toast-stack { position: fixed !important; top: 24px !important; right: 24px !important; left: auto !important; bottom: auto !important; z-index: 100000 !important; transform: none !important; align-items: flex-end; width: min(420px, calc(100vw - 32px)); }
.toast-stack .toast { background: var(--glass-strong) !important; -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important; border-radius: 16px !important; }

@media (max-width: 640px) {
  html dialog[open] { width: calc(100vw - 20px); max-height: calc(100dvh - 20px) !important; }
  dialog[open] .admin-edit-dialog-card, dialog[open] .client-request-dialog-card { padding: 0 !important; }
  dialog .form-actions .btn, dialog .modal-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Text buttons inside popups (Cancel, Close, Save) are real buttons, not icon circles */
dialog .form-actions button, dialog .modal-actions button, dialog .dialog-actions button, dialog button.btn[data-dialog-close], dialog button.btn[data-close-modal] {
  width: auto !important; height: auto !important; min-width: 0 !important; min-height: 42px !important; padding: 0 22px !important;
  display: inline-flex !important; align-items: center; justify-content: center; font-size: 14px !important; line-height: 1.2 !important;
  border-radius: 12px !important; letter-spacing: 0;
}
dialog .form-actions button[data-dialog-close]::before, dialog .form-actions button[data-close-modal]::before { content: none !important; }

/* Popup header / footer blend into the glass panel (no inner box) */
dialog .admin-edit-dialog-heading, dialog .client-request-dialog-heading {
  background: linear-gradient(var(--glass-strong) 80%, rgba(255, 255, 255, 0)) !important; border-radius: 0 !important; border: 0 !important; box-shadow: none !important;
}
dialog .admin-edit-dialog-card .form-actions, dialog .client-request-dialog-card .form-actions {
  position: sticky; bottom: 0; z-index: 2; margin: 14px -28px -24px; padding: 14px 28px 20px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--glass-strong) 38%) !important; border: 0 !important; border-radius: 0 0 22px 22px;
}
@media (max-width: 640px) {
  html dialog[open] { width: calc(100vw - 20px) !important; }
  dialog .admin-edit-dialog-card .form-actions, dialog .client-request-dialog-card .form-actions { margin: 12px -18px -18px; padding: 12px 18px 16px; }
}

/* ==========================================================================
   v2: golden-ratio scale, soft mesh, glass cards, calm hovers, clean popups
   Spacing scale (Fibonacci / phi): 5 · 8 · 13 · 21 · 34 · 55
   ========================================================================== */
:root {
  --sp-1: 5px; --sp-2: 8px; --sp-3: 13px; --sp-4: 21px; --sp-5: 34px; --sp-6: 55px;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, .96);
  --glass-edge: rgba(226, 232, 240, .85);
  --mesh:
    radial-gradient(64vw 52vh at 5% -4%, rgba(37, 99, 235, 0.10), transparent 60%),
    radial-gradient(56vw 48vh at 95% 6%, rgba(124, 58, 237, 0.08), transparent 60%),
    radial-gradient(50vw 50vh at 50% 95%, rgba(14, 165, 233, 0.07), transparent 65%),
    radial-gradient(40vw 40vh at 85% 85%, rgba(124, 58, 237, 0.06), transparent 60%);
}
html { background: #F8F9FB; }
body, body.site, body.auth-page { background: var(--mesh), #F8F9FB !important; background-attachment: scroll !important; color: #0A0D14; }
.app-main, .app-content, .admin-content, .app-shell, .workspace-shell { background: transparent !important; }

/* Frosted glass cards: crisp translucency, ambient depth, specular highlight */
.card:not(.pilot-hero):not(.dash-welcome):not([class*="hero"]):not(.highlight),
.pilot-card, .dashboard-kpi, .pilot-kpi {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 30px -5px rgba(15, 23, 42, 0.05) !important;
  color: #0A0D14;
}
:where(.app-content, .admin-content) > .card + .card, :where(.app-content, .admin-content) > section + section { margin-top: var(--sp-4); }

/* Smooth hover lift for cards */
@media (hover: hover) {
  .card:not(.pilot-hero):not(.dash-welcome):not([class*="hero"]):not(.highlight):hover,
  .pilot-card:hover, .dashboard-kpi:hover, .pilot-kpi:hover {
    
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 16px 36px -8px rgba(112, 69, 232, 0.09) !important;
    border-color: rgba(112, 69, 232, 0.25) !important;
  }
}
.pipeline-project:hover, .dashboard-client-row:hover, .attention-item:hover, .setup-card:hover {
  box-shadow: var(--glass-shadow) !important; border-color: var(--glass-edge) !important;
}
table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover,
table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover > td:not(.inv-total-dark-card),
table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover > th,
.table-row:hover, .list-row:hover { background: transparent !important; }

/* Page-level action bars are floating glass, never a white strip */
.form-actions { background: transparent; border-color: transparent; box-shadow: none; }
.ai-sticky-actions, .sticky-actions {
  position: sticky; bottom: var(--sp-3); z-index: 5; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4); border-radius: 18px; background: rgba(255, 255, 255, .72) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid var(--glass-edge) !important; box-shadow: var(--glass-shadow);
}

/* Header: one floating glass bar, identical in the workspace and the admin */
.app-topbar {
  position: sticky; top: var(--sp-3); z-index: 40; margin: var(--sp-3) var(--sp-4) 0; padding: 0 var(--sp-3) 0 var(--sp-4);
  min-height: 64px; height: 64px; display: flex; align-items: center; gap: var(--sp-3);
  background: rgba(255, 255, 255, .72) !important; border: 1px solid var(--glass-edge) !important; border-radius: 20px;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important; box-shadow: var(--glass-shadow);
}
.app-content, .admin-content { padding-top: var(--sp-4); padding-left: var(--sp-4); padding-right: var(--sp-4); }
.topbar-search { position: relative; flex: 1 1 auto; max-width: 440px; margin-left: auto; }
.topbar-search input[type=search] { height: 42px; padding: 0 14px 0 44px !important; background-image: none !important; background-color: rgba(255, 255, 255, .85) !important; border-radius: 999px; width: 100%; }
.topbar-search .topbar-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; display: grid; place-items: center; color: #8b8d9f; pointer-events: none; }
.topbar-search .topbar-search-icon svg { width: 17px; height: 17px; }
/* Unified search input rules: eliminate native WebKit decorations and duplicate search icons */
input[type="search"],
.crm-search-input,
.form-control[type="search"],
.pilot-filter input[type="search"],
.table-search input[type="search"],
.search-input {
  -webkit-appearance: textfield !important;
  appearance: textfield !important;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}
/* Every standalone search field (including .pilot-filter search inputs): crisp SVG magnifier */
input[type="search"],
input[type=search],
.pilot-filter input[type="search"],
.user-filter-card input[type="search"],
.user-filter-form input[type="search"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4.35-4.35'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 13px center !important;
  background-size: 16px 16px !important;
  padding-left: 38px !important;
}
/* Prevent duplicate icons ONLY when a search input's immediate wrapper already has an inline SVG icon */
*:has(> svg + input[type="search"]) > input[type="search"],
.crm-search-input-wrap input,
.crm-search-input,
.topbar-search input,
.topbar-search input[type="search"],
.search-wrapper:has(> svg) input[type="search"],
.input-with-icon input,
.input-with-icon input[type="search"] {
  background-image: none !important;
}

/* Segmented switch (List / Kanban and similar) */
.mx-segment, .view-switch { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 13px; background: rgba(15, 17, 28, .06); border: 1px solid var(--glass-line); }
.mx-segment .view-switch { padding: 0; background: none; border: 0; }
.mx-segment a, .view-switch a { padding: 7px 15px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #475569; text-decoration: none; white-space: nowrap; }
.mx-segment a.is-active, .view-switch a.is-active, .mx-segment a[aria-current], .view-switch a[aria-current] { background: var(--ui-ink); color: #fff; }

/* Confirmation popup: readable buttons, red means danger */
.rui-confirm .btn-danger, .rui-confirm .rui-btn-ok.btn-danger { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; -webkit-text-fill-color: #fff; }
.rui-confirm .btn-danger:disabled { opacity: .45; }
.rui-confirm .btn-secondary, .rui-confirm .rui-btn-cancel { background: #fff !important; color: var(--ui-ink) !important; border: 1px solid var(--glass-line) !important; }

/* ONE close glyph: the circle draws the cross itself, anything inside it is hidden */
.dialog-close-btn, .modal-close-btn, .modal-close-x, .modal-close, button.close, .critical-delete-close, .client-request-close,
.fx-dialog-close, .checkout-modal-close, .popup-close, .rui-confirm-close, dialog [data-dialog-close].icon-btn {
  background-color: var(--ui-ink) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: center !important; background-size: 14px !important;
  font-size: 0 !important; color: transparent !important; position: relative;
}
.dialog-close-btn > *, .modal-close-btn > *, .modal-close-x > *, .modal-close > *, button.close > *, .critical-delete-close > *, .client-request-close > *,
.fx-dialog-close > *, .checkout-modal-close > *, .popup-close > *, .rui-confirm-close > *, dialog [data-dialog-close].icon-btn > * { display: none !important; }
.dialog-close-btn::before, .dialog-close-btn::after, .modal-close-btn::before, .modal-close-btn::after, .modal-close-x::before, .modal-close-x::after,
.modal-close::before, .modal-close::after, button.close::before, button.close::after, .critical-delete-close::before, .critical-delete-close::after,
.client-request-close::before, .client-request-close::after, .fx-dialog-close::before, .fx-dialog-close::after, .popup-close::before, .popup-close::after,
.rui-confirm-close::before, .rui-confirm-close::after, dialog [data-dialog-close].icon-btn::before, dialog [data-dialog-close].icon-btn::after { content: none !important; display: none !important; }
.dialog-close-btn:hover, .modal-close-btn:hover, .modal-close-x:hover, .modal-close:hover, .popup-close:hover, .rui-confirm-close:hover { background-color: var(--ui-accent) !important; }
.rui-confirm-card, .modal-card { position: relative; }
.rui-confirm-card > .dialog-close-btn, .modal-card > .dialog-close-btn { position: absolute; top: 13px; right: 13px; }

/* Popup panel: solid enough to read, header and footer blend in, thin scrollbar */
dialog[open] .admin-edit-dialog-card, dialog[open] .client-request-dialog-card, dialog[open] .checkout-modal-card,
dialog[open] .fx-dialog-inner, dialog[open] .modal-card, .rui-confirm .modal-card, .modal-overlay .modal-card {
  background: var(--glass-strong) !important;
  background-image: radial-gradient(60% 40% at 100% 0, rgba(124, 108, 255, .10), transparent 70%), radial-gradient(50% 36% at 0 100%, rgba(56, 189, 248, .08), transparent 70%) !important;
}
dialog .admin-edit-dialog-heading, dialog .client-request-dialog-heading { background: transparent !important; position: static; padding: var(--sp-4) 0 var(--sp-3); margin: 0; border-bottom: 1px solid var(--glass-line) !important; }
dialog .admin-edit-dialog-card .form-actions, dialog .client-request-dialog-card .form-actions {
  position: static; margin: var(--sp-4) 0 0; padding: var(--sp-3) 0 0; background: transparent !important; border: 0 !important; border-top: 1px solid var(--glass-line) !important; border-radius: 0;
}
dialog .stack-form, dialog form.stack-form, dialog fieldset { background: transparent !important; }
dialog[open] .admin-edit-dialog-card { scrollbar-gutter: auto; }
.modal-overlay, .popup-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  background: rgba(15, 23, 42, 0.52) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
}

/* Toasts: locked to top right, slide in smoothly */
.toast-stack { position: fixed !important; top: 24px !important; bottom: auto !important; right: 24px !important; left: auto !important; transform: none !important; z-index: 100000 !important; align-items: flex-end; width: min(380px, calc(100vw - 32px)); }
.toast-stack .toast { background: #fff !important; color: var(--ui-ink) !important; border: 1px solid rgba(15, 17, 28, .1) !important; border-radius: 16px !important; animation: ui-toast-right .38s var(--ui-ease) both !important; box-shadow: 0 18px 44px -18px rgba(15, 17, 28, .35) !important; -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important; }
.toast-stack .toast::before { display: none !important; }
.toast-stack .toast-ok, .toast-stack .toast[data-toast-type="success"] { background: var(--ui-ink) !important; color: #fff !important; border-color: var(--ui-ink) !important; }
.toast-stack .toast-err, .toast-stack .toast[data-toast-type="error"] { background: #dc2626 !important; color: #fff !important; border-color: #dc2626 !important; }
.toast-stack .toast-ok *, .toast-stack .toast-err *, .toast-stack .toast[data-toast-type="success"] *, .toast-stack .toast[data-toast-type="error"] * { color: inherit !important; }
.toast-stack .toast svg { stroke: currentColor; }
@keyframes ui-toast-right { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
/* The inline flash is hidden before the script moves it into the side stack (no flash at the top of the page) */
.app-main .toast:not(.toast-inline), .admin-shell .app-main .toast:not(.toast-inline) { display: none !important; }
.toast-stack .toast { display: grid !important; }

@media (max-width: 760px) {
  .app-topbar { margin: var(--sp-2) var(--sp-2) 0; top: var(--sp-2); padding: 0 var(--sp-3); border-radius: 16px; }
  .app-content, .admin-content { padding-left: var(--sp-3); padding-right: var(--sp-3); }
  .toast-stack { right: 16px !important; top: 16px !important; width: calc(100vw - 32px) !important; }
}

/* Popup footers never sit on a white strip (beats older sticky-footer rules) */
html body dialog[open] .admin-edit-dialog-card .form-actions, html body dialog[open] .client-request-dialog-card .form-actions,
html body dialog[open] .admin-edit-dialog-card form > .form-actions:last-child, html body dialog[open] .client-request-dialog-card form > .form-actions:last-child {
  position: static !important; background: transparent !important; background-image: none !important; box-shadow: none !important;
  margin: var(--sp-4) 0 0 !important; padding: var(--sp-3) 0 0 !important; border: 0 !important; border-top: 1px solid var(--glass-line) !important; border-radius: 0 !important;
}
/* Consistent vertical rhythm between stacked blocks on every page */
:where(.app-content, .admin-content) > * + *:not(script):not(style):not(.toast) { margin-top: var(--sp-4); }

/* ==========================================================================
   Branded dropdowns (replace the browser-default select list and datalist)
   ========================================================================== */
.rt-select { position: relative; display: inline-block; min-width: 0; max-width: 100%; vertical-align: middle; }
.rt-select.is-block { display: block; width: 100%; }
.rt-select > select.rt-select-native { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; opacity: 0 !important; pointer-events: none !important; margin: 0 !important; }
.rt-select-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 44px; min-height: 40px; padding: 0 14px;
  background: #fff; color: var(--ui-ink); border: 1px solid rgba(15, 17, 28, .14); border-radius: 12px; font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rt-select-btn:hover { border-color: rgba(15, 17, 28, .28); }
.rt-select.is-open .rt-select-btn, .rt-select-btn:focus-visible { border-color: color-mix(in srgb, var(--accent, #1F2020) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #1F2020) 12%, transparent); }
.rt-select-btn[disabled] { opacity: .55; cursor: not-allowed; }
.rt-select-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-select-label.is-placeholder { color: #8b8d9f; }
.rt-select-chev { flex: 0 0 auto; width: 16px; height: 16px; color: #6b6b76; transition: transform .18s ease; }
.rt-select.is-open .rt-select-chev { transform: rotate(180deg); }
.rt-menu {
  position: fixed; z-index: 2147483600; min-width: 160px; max-width: min(92vw, 420px); display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid var(--glass-edge, rgba(255, 255, 255, .85)); border-radius: 14px; padding: 6px; overflow: hidden;
  box-shadow: 0 24px 60px -18px rgba(15, 17, 28, .38), 0 2px 6px rgba(15, 17, 28, .06); animation: ui-menu-in .14s var(--ui-ease, ease) both;
}
.rt-menu-search { margin: 2px 2px 6px; flex: 0 0 auto; }
.rt-menu-search input { width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(15, 17, 28, .12); background: #fff; font-size: 13px; }
.rt-menu-list { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1px; }
.rt-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--ui-ink); cursor: pointer; line-height: 1.35; }
.rt-opt.is-active { background: rgba(15, 17, 28, .06); }
.rt-opt.is-selected { font-weight: 700; }
.rt-opt.is-disabled { opacity: .45; cursor: not-allowed; }
.rt-opt-check { width: 14px; height: 14px; flex: 0 0 auto; color: var(--ui-accent); opacity: 0; }
.rt-opt.is-selected .rt-opt-check { opacity: 1; }
.rt-group { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8b8d9f; }
.rt-empty { padding: 12px; font-size: 13px; color: #8b8d9f; text-align: center; }
@keyframes ui-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.99); } to { opacity: 1; transform: none; } }
/* After the entrance animation, a popup carries no transform (a leftover transform would offset fixed-position menus inside it). */
html dialog[open] { animation: ui-dialog-in .22s var(--ui-ease) backwards !important; }


/* ==========================================================================
   v3 fixes: close buttons in every state, glass everywhere, calm hovers, black plan card
   ========================================================================== */
/* Close & Delete Cross Buttons: Red Cross (#EF4444) with NO background, turning Deep Red (#991B1B) with smooth 90deg spring rotation on hover */
html body :is(.dialog-close-btn,
.modal-close-btn,
.modal-close-x,
.modal-close,
button.close,
.critical-delete-close,
.client-request-close,
.fx-dialog-close,
.checkout-modal-close,
.popup-close,
.rui-confirm-close,
.message-drawer-close,
.client-message-drawer-close,
dialog [data-dialog-close].icon-btn) {
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2.7' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 16px 16px !important;
  color: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.18s ease !important;
}
html body :is(.dialog-close-btn,
.modal-close-btn,
.modal-close-x,
.modal-close,
button.close,
.critical-delete-close,
.client-request-close,
.fx-dialog-close,
.checkout-modal-close,
.popup-close,
.rui-confirm-close,
.message-drawer-close,
.client-message-drawer-close,
dialog [data-dialog-close].icon-btn) > svg {
  opacity: 0 !important;
  pointer-events: none !important;
}
html body :is(.dialog-close-btn,
.modal-close-btn,
.modal-close-x,
.modal-close,
button.close,
.critical-delete-close,
.client-request-close,
.fx-dialog-close,
.checkout-modal-close,
.popup-close,
.rui-confirm-close,
.message-drawer-close,
.client-message-drawer-close,
dialog [data-dialog-close].icon-btn):is(:hover, :focus-visible, :active) {
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23991B1B' stroke-width='3.1' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 17px 17px !important;
  color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  
}

/* Popup headers: sticky opaque frosted background to prevent content bleed-through on scroll */
html body :is(.modal-card-head, .modal-head, .checkout-modal-header, .dialog-head, .admin-edit-dialog-heading, .client-request-dialog-heading, .retraak-ai-header, #admin-clear-audit-modal .modal-card-head) {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 22px 28px 18px !important;
  border-radius: 24px 24px 0 0 !important;
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}
[data-theme="dark"] html body :is(.modal-card-head, .modal-head, .checkout-modal-header, .dialog-head, .admin-edit-dialog-heading, .client-request-dialog-heading, .retraak-ai-header, #admin-clear-audit-modal .modal-card-head),
html body[data-theme="dark"] :is(.modal-card-head, .modal-head, .checkout-modal-header, .dialog-head, .admin-edit-dialog-heading, .client-request-dialog-heading, .retraak-ai-header, #admin-clear-audit-modal .modal-card-head) {
  background: rgba(17, 24, 39, 0.5) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
html body :is(.modal-card:not(.rui-confirm-card), .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .retraak-ai-dialog, #admin-clear-audit-modal),
html body dialog[open] {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 28px 70px -15px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: 90vh !important;
}
html body dialog, html body dialog[open] {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  overflow: visible !important;
}
html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .retraak-ai-dialog, #admin-clear-audit-modal) > :is(form, .modal-card-body, .stack-form, .retraak-ai-body) {
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 24px 28px !important;
  box-sizing: border-box !important;
}

/* Sidebar-card editor: clean solid surface modal */
html body dialog.sc-dialog[open] { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; border: 0 !important; }
html body dialog.sc-dialog::backdrop { background: rgba(12, 14, 24, .42) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html body .sc-dialog .sc-dialog-form {
  background-color: #FFFFFF; color: var(--ui-ink); border: 1px solid var(--border, #E2E8F0); border-radius: 22px; overflow: hidden;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: 0 34px 80px -24px rgba(15, 17, 28, .38), 0 2px 6px rgba(15, 17, 28, .06);
}
html body .sc-dialog :is(label, h2, h3, strong, .muted, .small) { color: var(--ui-ink) !important; }
html body .sc-dialog .muted, html body .sc-dialog small { color: #5d6075 !important; }
html body .sc-dialog .sc-dialog-preview { background: rgba(15, 17, 28, .035) !important; border-left: 1px solid var(--glass-line) !important; color: var(--ui-ink); }
html body .sc-dialog .sc-dialog-preview p { color: #5d6075 !important; }
html body .sc-dialog .sc-dialog-foot { background: transparent !important; border-top: 1px solid var(--glass-line) !important; }
html body .sc-dialog .sc-dialog-preview-head strong { color: var(--ui-ink) !important; }

/* The plan card is black everywhere (sidebar, admin preview, editor preview) */
html body .side-plan:not([class*="side-plan-theme-"]), html body .side-plan.side-plan-theme-default { background: #0b0d14 !important; background-image: none !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .08) !important; border-radius: 18px !important; box-shadow: 0 14px 34px -18px rgba(15, 17, 28, .6) !important; }
html body .side-plan :is(strong, .side-plan-title) { color: #fff !important; }
html body .side-plan p { color: rgba(255, 255, 255, .68) !important; }
html body .side-plan .btn { background: #fff !important; color: var(--ui-ink) !important; border-color: #fff !important; font-weight: 700; }
html body .side-plan :is(.plan-color-pill, .side-card-badge):not([class*="badge-"]) { background: rgba(255, 255, 255, .12) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .18) !important; }
html body .sc-mock { background: rgba(255, 255, 255, .55) !important; border: 1px solid var(--glass-edge) !important; -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important; }

/* Solid surfaces instead of blur */
html body .sidebar.user-sidebar-v2 { background: #FFFFFF !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html body :is(.invoice-tpl-mini-card, .faq-item, .task-stat, .ai-mockup-item, .mockup-float-pill, .cookie-consent, .pilot-tabs) {
  background: #FFFFFF !important; border: 1px solid var(--glass-edge) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: var(--glass-shadow);
}
html body .plans-save-bar { background: #FFFFFF !important; border: 1px solid var(--glass-edge) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: var(--glass-shadow); }
html body .site-header { background: #FFFFFF !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html body :is(.proof-strip, .contact-section) { background: transparent !important; }

/* Hovers: smooth lift, vibrant Retraak purple accents */
html body .sc-row:hover { background: transparent !important; box-shadow: none !important; }
html body .sc-row.is-selected, html body .sc-row.is-selected:hover { background: rgba(15, 17, 28, .045) !important; box-shadow: inset 3px 0 0 var(--ui-ink) !important; }

/* Visible high-contrast Quick Actions */
html body:is(.quick-action, .app-content .quick-action, .admin-content .quick-action, .workspace-shell .quick-action) {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  border-radius: 14px !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
html body:is(.quick-action, .app-content .quick-action, .admin-content .quick-action, .workspace-shell .quick-action) > span:last-child {
  color: #0f172a !important;
  font-weight: 650 !important;
}
html body:is(.quick-action, .app-content .quick-action, .admin-content .quick-action, .workspace-shell .quick-action) > span:first-child {
  background: #f1f5f9 !important;
  color: #7045E8 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
}
html body:is(.quick-action, .app-content .quick-action, .admin-content .quick-action, .workspace-shell .quick-action):hover {
  background: #ffffff !important;
  border-color: rgba(112, 69, 232, 0.45) !important;
  color: #7045E8 !important;
  
  box-shadow: 0 8px 22px rgba(112, 69, 232, 0.14) !important;
}
html body:is(.quick-action, .app-content .quick-action, .admin-content .quick-action, .workspace-shell .quick-action):hover > span:first-child {
  background: rgba(112, 69, 232, 0.12) !important;
  color: #7045E8 !important;
  
}
html body:is(.quick-action, .app-content .quick-action, .admin-content .quick-action, .workspace-shell .quick-action):hover > span:last-child {
  color: #7045E8 !important;
}
html body .pipeline-project:hover {
  background: #ffffff !important;
  border-color: rgba(112, 69, 232, 0.3) !important;
  
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
}

/* Higher-specificity pass: older rules matched by id or by a longer chain were keeping these solid white */
html body aside#app-sidebar.user-sidebar-v2.sidebar { background: #FFFFFF !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html body dialog[open] :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .fx-dialog-inner),
html body .modal-overlay .modal-card:not(.rui-confirm-card) {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  background-color: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid #E2E8F0 !important;
}
/* Blocks that set a plain white background inline remain clean white */
html body :is(div, section, article, aside):is([style*="background:#fff"], [style*="background: #fff"], [style*="background:#ffffff"], [style*="background: #ffffff"], [style*="background:white"], [style*="background: white"], [style*="background:rgb(255,255,255)"], [style*="background: rgb(255, 255, 255)"]):not([class*="invoice-"]):not([class*="doc-"]):not(.card):not([class*="card"]):not([class*="dialog"]) {
  background-color: #ffffff !important; border-color: rgba(226, 232, 240, 0.85) !important;
}

/* Popup headings: beat `.modal-card .modal-card-head { background: #fff !important }` and similar chains */
html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .sc-dialog-form) :is(.modal-card-head, .modal-head, .checkout-modal-header, .dialog-head, .admin-edit-dialog-heading, .client-request-dialog-heading) {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 22px 28px 18px !important;
  border-radius: 24px 24px 0 0 !important;
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
}
[data-theme="dark"] html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .sc-dialog-form) :is(.modal-card-head, .modal-head, .checkout-modal-header, .dialog-head, .admin-edit-dialog-heading, .client-request-dialog-heading) {
  background: rgba(17, 24, 39, 0.5) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .sc-dialog-form) :is(.modal-card-foot, .modal-foot) {
  background: transparent !important; background-image: none !important; box-shadow: none !important; border-top: 1px solid rgba(226, 232, 240, 0.7) !important;
}


/* ==========================================================================
   Header (workspace + admin share one bar), scrollbar at the window edge, toast icons
   ========================================================================== */
html body .app-main > .app-topbar {
  position: sticky; top: 0 !important; margin: 0 !important; height: 64px; min-height: 64px; padding: 0 var(--sp-4) !important; display: flex; align-items: center; gap: var(--sp-3); z-index: 40;
  background: rgba(255, 255, 255, .86) !important; border: 0 !important; border-bottom: 1px solid var(--glass-line) !important; border-radius: 0 !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important;
  box-shadow: 0 10px 28px -22px rgba(15, 17, 28, .35) !important;
}
html body .app-main > .app-content { padding-top: var(--sp-4); }
@media (max-width: 760px) { html body .app-main > .app-topbar { margin: 0 !important; padding: 0 var(--sp-3) !important; border-radius: 0 !important; } }

/* Toast icons: always visible on white, black and red toasts */
html body .toast-stack .toast .toast-icon { background: rgba(15, 17, 28, .07) !important; color: var(--ui-ink) !important; }
html body .toast-stack :is(.toast-ok, .toast-err, [data-toast-type="success"], [data-toast-type="error"]) .toast-icon { background: rgba(255, 255, 255, .18) !important; color: #fff !important; }
html body .toast-stack .toast .toast-icon svg { stroke: currentColor !important; fill: none !important; width: 15px; height: 15px; }
html body .toast-stack .toast .toast-close { color: currentColor !important; opacity: .7; }
html body .toast-stack .toast .toast-close svg { stroke: currentColor !important; fill: none !important; }

/* Same header geometry in the workspace and the admin (beats the admin's own padding/height rules) */
html :is(.admin-shell, .workspace-shell, .app-shell) > .app-main > .app-topbar {
  height: 64px !important; min-height: 64px !important; padding: 0 var(--sp-4) !important; gap: var(--sp-3) !important; top: 0 !important; margin: 0 !important; border-radius: 0 !important;
}

/* Phones: the header never overflows. Buttons shrink to icons, the profile shows only the avatar. */
@media (max-width: 640px) {
  html body .app-main > .app-topbar { gap: var(--sp-2) !important; padding: 0 var(--sp-3) !important; }
  html body .app-topbar .topbar-title, html body .app-topbar .topbar-heading, html body .app-topbar > div:first-of-type { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  html body .app-topbar .topbar-right { gap: 6px !important; min-width: 0; flex: 0 0 auto; margin-left: auto; }
  html body .app-topbar .topbar-right .btn-primary { width: 40px; min-width: 40px; height: 40px; padding: 0 !important; font-size: 0 !important; display: inline-grid; place-items: center; border-radius: 50%; }
  html body .app-topbar .topbar-right .btn-primary svg { width: 18px; height: 18px; margin: 0; }
  html body .app-topbar .compact-profile-btn, html body .app-topbar .profile-btn { padding: 0 !important; min-width: 40px; width: 40px; height: 40px; border-radius: 50% !important; justify-content: center; border: 0 !important; background: transparent !important; }
  html body .app-topbar .compact-profile-btn > *:not(.avatar):not(img), html body .app-topbar .profile-btn > *:not(.avatar):not(img) { display: none !important; }
  html body .app-topbar .pilot-live-pill, html body .app-topbar .topbar-status { display: none !important; }
}

/* Phones and small tablets: the search box lives behind its icon button, so the header row always fits */
@media (max-width: 960px) {
  html body:not(.search-open) .app-topbar .topbar-search { display: none !important; }
  html body .app-topbar .topbar-search-toggle { display: inline-grid !important; place-items: center; }
}

/* Public header: solid crisp surface */
html body header.site-header { background: #FFFFFF !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-bottom: 1px solid var(--glass-line, #E2E8F0) !important; box-shadow: 0 10px 28px -22px rgba(15, 17, 28, .3); }

/* Pricing: every word on the dark Pro card is readable */
html body .price-card.highlight.card :is(h2, h3, h4, p, li, strong, b, .price, .price-currency, .price-amount):not(.btn):not([class*="badge"]):not([class*="pill"]):not([class*="tag"]) { color: #fff !important; }
html body .price-card.highlight.card :is(li, p, .muted, .price-period, .price-card-head p) { color: rgba(255, 255, 255, .78) !important; }
html body .price-card.highlight.card li strong, html body .price-card.highlight.card li b { color: #fff !important; }
html body .price-card.highlight.card .pricing-features-list svg { color: #34d399 !important; }
html body .price-card:not(.highlight) { box-shadow: var(--glass-shadow) !important; }

/* User profile popup footer: no white box under Cancel / Save */
html body .modal-overlay .modal-card :is(.form-actions, .modal-actions, .modal-card-foot) { position: static !important; background: transparent !important; background-image: none !important; box-shadow: none !important; margin: var(--sp-4) 0 0 !important; padding: var(--sp-3) 0 0 !important; border: 0 !important; border-top: 1px solid var(--glass-line) !important; }

/* Billing: the plan card that carries the free-trial button is highlighted when you arrive from a pricing link */
.is-spotlight { box-shadow: 0 0 0 3px var(--accent, #1F2020), 0 26px 60px -22px color-mix(in srgb, var(--accent, #1F2020) 55%, transparent) !important; transition: box-shadow .4s ease; }

/* Toast close button: the cross stays visible in every state on white, black and red toasts */
html body .toast-stack .toast .toast-close { background: transparent !important; opacity: .75; transition: background-color .15s ease, opacity .15s ease; }
html body .toast-stack .toast .toast-close:is(:hover, :focus, :focus-visible, :active) { background: rgba(15, 17, 28, .09) !important; opacity: 1 !important; color: var(--ui-ink) !important; }
html body .toast-stack .toast .toast-close:is(:hover, :focus, :focus-visible, :active) svg { stroke: var(--ui-ink) !important; }
html body .toast-stack :is(.toast-ok, .toast-err, [data-toast-type="success"], [data-toast-type="error"]) .toast-close:is(:hover, :focus, :focus-visible, :active) { background: rgba(255, 255, 255, .22) !important; color: #fff !important; }
html body .toast-stack :is(.toast-ok, .toast-err, [data-toast-type="success"], [data-toast-type="error"]) .toast-close:is(:hover, :focus, :focus-visible, :active) svg { stroke: #fff !important; }

/* Retraak responsive repair pack - shared by workspace and control centre. */
@media (max-width: 800px) {
  html body .modal-overlay { position: fixed !important; inset: 0 !important; z-index: 10000 !important; display: flex !important; align-items: flex-end !important; justify-content: center !important; padding: 0 !important; overflow: hidden !important; background: rgba(15,23,42,.62) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html body .modal-overlay[hidden] { display: none !important; }
  html body .modal-overlay > .modal-card { width: 100% !important; max-width: none !important; max-height: min(92dvh, 920px) !important; height: auto !important; margin: 0 !important; border-radius: 24px 24px 0 0 !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 !important; box-sizing: border-box !important; }
  html body #edit-profile-modal .modal-card { padding: 0 !important; border-radius: 24px !important; }
  html body #edit-profile-modal .modal-card-head { position: sticky !important; top: 0 !important; z-index: 20 !important; padding: 20px 20px 16px !important; margin: 0 !important; border-radius: 24px 24px 0 0 !important; background: #FFFFFF !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important; }
  [data-theme="dark"] html body #edit-profile-modal .modal-card-head { background: #0F172A !important; border-bottom-color: rgba(255, 255, 255, 0.08) !important; }
  html body #edit-profile-modal .modal-card-head h3 { margin: 0 0 5px !important; font-size: 18px !important; line-height: 1.3 !important; }
  html body #edit-profile-modal .modal-card-head p { margin: 0 !important; font-size: 13px !important; line-height: 1.45 !important; }
  html body #edit-profile-modal .modal-card > form { padding: 20px 20px 24px !important; box-sizing: border-box !important; }
  html body #edit-profile-modal .modal-card > form > div:first-of-type { margin-top: 0 !important; }
  html body #edit-profile-modal fieldset { min-width: 0 !important; padding: 12px !important; }
  html body #edit-profile-modal fieldset > div[style*="grid-template-columns"] { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 10px !important; }
  html body #edit-profile-modal select, html body #edit-profile-modal input, html body #edit-profile-modal textarea { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
  html body #edit-profile-modal .form-actions { position: relative !important; bottom: auto !important; z-index: 3 !important; background: transparent !important; padding: 12px 0 calc(10px + env(safe-area-inset-bottom)) !important; margin-top: 14px !important; }
  html body .sidebar, html body aside#app-sidebar, html body .admin-sidebar, html body .mobile-sidebar, html body [data-sidebar], html body .sidebar.user-sidebar-v2 { background: #f8f9fc !important; background-image: none !important; opacity: 1 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html body .admin-shell .app-main, html body .app-shell .app-main { min-width: 0 !important; width: 100% !important; }
}
/* Predictable popup/button states: clean pill hover */
html body :is(.modal-close-btn,.modal-close-x,.modal-close,.popup-close,.rui-confirm-close,.dialog-close-btn):hover { background: rgba(241, 245, 249, 0.95) !important; color: #0f172a !important; border-color: #cbd5e1 !important; }
html body :is(.btn,.button,button,[role="button"]).btn-ghost:hover { border-color: #252832 !important; color: #111318 !important; }
/* Keep dashboard charts aligned with Retraak's compact typography. */
html body :is(.chart-card,.analytics-card,.metric-chart-card) :is(svg text,.chart-label,.axis-label,.chart-tick,.recharts-cartesian-axis-tick-value) { font-family: inherit !important; font-size: 11px !important; font-weight: 500 !important; }
html body :is(.chart-card,.analytics-card,.metric-chart-card) :is(svg,.recharts-wrapper) { max-width: 100% !important; }

/* Retraak motion language: restrained transitions, no motion for reduced-motion users. */
:root{--retraak-motion-fast:140ms;--retraak-motion-med:210ms;--retraak-ease:cubic-bezier(.2,.7,.2,1)}
.card,.panel-card,.kpi-card,.stat-card,.notification-card,.price-card,.modal-card,.settings-row-card{
  transition:transform var(--retraak-motion-med) var(--retraak-ease),box-shadow var(--retraak-motion-med) var(--retraak-ease),border-color var(--retraak-motion-fast) ease,background-color var(--retraak-motion-fast) ease;
}
@media(hover:hover){.app-content .card:hover,.admin-content .card:hover,.price-card:hover,.panel-card:hover{box-shadow:0 12px 28px rgba(15,20,35,.07);border-color:color-mix(in srgb,var(--border,#dfe3ea) 55%,var(--accent,#4b3eb0));}}
.btn,.topbar-icon,.menu-panel,.sidebar-link,.nav-link,.tab-button{transition:background-color var(--retraak-motion-fast) ease,color var(--retraak-motion-fast) ease,border-color var(--retraak-motion-fast) ease,box-shadow var(--retraak-motion-fast) ease,transform var(--retraak-motion-fast) ease}
@media(hover:hover){.btn:not(:disabled):not(.is-loading):not(.is-busy):hover{transform:none;box-shadow:0 2px 8px rgba(15,20,35,0.08)}.topbar-icon:hover,.sidebar-link:hover,.nav-link:hover{}}
@keyframes retraakFadeUp{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.card.is-visible,.page-heading-row.is-visible,.notification-center-card.is-visible{animation:retraakFadeUp 240ms var(--retraak-ease) both}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}

/* Brand-consistent interactions: loading controls do not animate on hover. */
button.is-loading,button.is-busy,button[aria-busy="true"],a.is-loading,a.is-busy,
button.is-loading:hover,button.is-busy:hover,button[aria-busy="true"]:hover,a.is-loading:hover,a.is-busy:hover{
  transform:none!important;filter:none!important;transition:none!important;pointer-events:none;cursor:progress;
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* [ui] Off-canvas sidebars (<=960px) must be opaque and sit above the backdrop; the id+class glass rule above out-ranked the older mobile fix. */
@media (max-width: 960px) {
  html body .sidebar, html body aside#app-sidebar, html body .admin-sidebar, html body .sidebar.user-sidebar-v2, html body aside#app-sidebar.user-sidebar-v2.sidebar { background: #f8f9fc !important; background-image: none !important; opacity: 1 !important; -webkit-backdrop-filter: blur(22px) saturate(185%) !important; backdrop-filter: blur(22px) saturate(185%) !important; }
  html body.nav-open .sidebar, html body.nav-open aside#app-sidebar { z-index: 80 !important; box-shadow: 0 0 40px rgba(15,17,28,.22) !important; }
  html body.app-shell.nav-open::after { z-index: 70; }
}
/* [ui] Header popovers share one layer (above sticky bars, below modals/sidebar drawer) and never exceed the viewport. */
html body :is(#profile-menu, #notif-menu, #header-message-menu).menu-panel, html body .notif-panel, html body .header-message-menu { z-index: 120 !important; max-width: calc(100vw - 16px) !important; }

/* ==========================================================================
   RETRAAK AI ACTION BUTTONS - Retraak Purple Theme (#7045E8 / #7C3AED)
   ========================================================================== */
.retraak-ai-trigger-btn,
.retraak-ai-trigger-btn.retraak-ai-btn-main,
.retraak-ai-trigger-btn.retraak-ai-btn-sub,
#retraak-ai-generate-btn,
.btn-ai,
.retraak-ai-submit,
button[data-ai-action] {
  background: #7045E8 !important;
  color: #ffffff !important;
  border: 1px solid #7C3AED !important;
  box-shadow: 0 2px 8px rgba(112, 69, 232, 0.22) !important;
}
.retraak-ai-trigger-btn:hover,
#retraak-ai-generate-btn:hover,
.btn-ai:hover,
.retraak-ai-submit:hover,
button[data-ai-action]:hover {
  background: #7C3AED !important;
  color: #ffffff !important;
  border-color: #6D28D9 !important;
  box-shadow: 0 4px 14px rgba(112, 69, 232, 0.38) !important;
  
}
.retraak-ai-trigger-btn svg,
.retraak-ai-trigger-btn.retraak-ai-btn-sub svg,
#retraak-ai-generate-btn svg,
.btn-ai svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}
.retraak-ai-result-content strong { font-weight: 700; color: #111318; }
.retraak-ai-result-content mark { background: #FEF08A; color: #854D0E; padding: 2px 5px; border-radius: 4px; font-weight: 600; }
.retraak-ai-result-content u { text-decoration: underline; text-decoration-color: #7045E8; text-underline-offset: 3px; }
.retraak-ai-result-content h4 { font-size: 15px; font-weight: 700; margin: 12px 0 6px; color: #111318; }
.retraak-ai-result-content ul { margin: 6px 0 10px 20px; padding: 0; list-style-type: disc; }
.retraak-ai-result-content li { margin-bottom: 4px; }


/* Frosted Glass Dialogs & Centered Modals */
dialog[open] .admin-edit-dialog-card,
dialog[open] .client-request-dialog-card,
dialog[open] .checkout-modal-card,
dialog[open] .fx-dialog-inner,
dialog[open] .modal-card,
.modal-overlay > .modal-card,
.modal-overlay .modal-card,
.popup-overlay > .popup-card,
.popup-overlay .popup-card,
#modal-quick-project .modal-card,
.modal-card {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 28px 70px -15px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
[data-theme="dark"] dialog[open] .admin-edit-dialog-card,
[data-theme="dark"] dialog[open] .client-request-dialog-card,
[data-theme="dark"] dialog[open] .checkout-modal-card,
[data-theme="dark"] dialog[open] .fx-dialog-inner,
[data-theme="dark"] dialog[open] .modal-card,
[data-theme="dark"] .modal-overlay > .modal-card,
[data-theme="dark"] .modal-overlay .modal-card,
[data-theme="dark"] .popup-overlay > .popup-card,
[data-theme="dark"] .popup-overlay .popup-card,
[data-theme="dark"] #modal-quick-project .modal-card,
[data-theme="dark"] .modal-card {
  background: rgba(17, 24, 39, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 28px 70px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
#modal-quick-project .modal-card,
#modal-quick-project > .modal-card {
  width: min(540px, calc(100vw - 32px)) !important;
  max-width: 540px !important;
  margin: auto !important;
}


/* ==========================================================================
   RETRAAK ELEVATED PRICING CARDS & BADGES SYSTEM
   ========================================================================== */
/* Pro Card: Deep obsidian dark surface, Pay Page compact clean design */
.price-card.highlight.card,
.price-card.highlight,
.app-content .price-card.highlight,
.app-main .price-card.highlight {
  background: #0b0d14 !important;
  background-image: radial-gradient(900px 500px at 50% 0%, rgba(16, 185, 129, 0.12) 0%, rgba(11, 13, 20, 0) 70%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 48px -12px rgba(11, 13, 20, 0.45) !important;
  position: relative !important;
  transition: transform 0.2s cubic-bezier(.22, .8, .3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.price-card.highlight.card:hover,
.price-card.highlight:hover,
.app-content .price-card.highlight:hover,
.app-main .price-card.highlight:hover {
  
  box-shadow: 0 24px 54px -10px rgba(11, 13, 20, 0.55) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
.price-card.highlight.card :is(h1, h2, h3, h4, h5, .price, .price-currency, .price-amount, strong, b, label, .feature-name):not(.btn):not([class*="badge"]):not([class*="pill"]):not([class*="tag"]) {
  color: #ffffff !important;
}
.price-card.highlight.card li:not(.btn):not([class*="badge"]):not([class*="pill"]) {
  color: rgba(255, 255, 255, 0.78) !important;
}
.price-card.highlight.card :is(.muted, .price-period, .price-card-head p, .price-billed-note) {
  color: rgba(255, 255, 255, 0.65) !important;
}
.price-card.highlight.card .pricing-features-list svg,
.price-card.highlight.card ul svg {
  color: #10B981 !important;
  stroke: #10B981 !important;
}
.price-card.highlight.card .pricing-features-list,
.price-card.highlight.card ul {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Solid Opaque MOST POPULAR badge matching COLLABORATIVE pill (Fixes image_18bdf0.png) */
.price-card.highlight .price-badge,
.price-card.highlight.card .price-badge {
  background: var(--plan-highlight, #1D49E8) !important;
  border: 2px solid #FFFFFF !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(29, 73, 232, 0.35) !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

/* Crisp White Pro CTA matching pay page */
.price-card.highlight .btn-primary,
.price-card.highlight .btn,
.price-card.highlight .price-cta,
.price-card.highlight.card .btn-primary,
.price-card.highlight.card .btn,
.price-card.highlight.card .price-cta {
  background: #ffffff !important;
  color: #0b0d14 !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
  font-weight: 700 !important;
}
.price-card.highlight .btn-primary:hover,
.price-card.highlight .btn:hover,
.price-card.highlight .price-cta:hover,
.price-card.highlight.card .btn-primary:hover,
.price-card.highlight.card .btn:hover,
.price-card.highlight.card .price-cta:hover,
.price-card.highlight .btn-primary:active,
.price-card.highlight .btn:active,
.price-card.highlight .price-cta:active,
.price-card.highlight.card .btn-primary:active,
.price-card.highlight.card .btn:active,
.price-card.highlight.card .price-cta:active,
.price-card.highlight .btn-primary:focus,
.price-card.highlight .btn:focus,
.price-card.highlight .price-cta:focus,
.price-card.highlight.card .btn-primary:focus,
.price-card.highlight.card .btn:focus,
.price-card.highlight.card .price-cta:focus,
.price-card.highlight .btn.is-loading,
.price-card.highlight .btn-primary.is-loading,
.price-card.highlight .price-cta.is-loading,
.price-card.highlight.card .btn.is-loading,
.price-card.highlight.card .btn-primary.is-loading,
.price-card.highlight.card .price-cta.is-loading,
.price-card.highlight button[type="submit"]:hover,
.price-card.highlight button[type="submit"]:active,
.price-card.highlight button[type="submit"]:focus,
.price-card.highlight button[type="submit"].is-loading,
.price-card.highlight button[type="submit"]:disabled {
  background: #f1f5f9 !important;
  color: #0b0d14 !important;
  border-color: #f1f5f9 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22) !important;
  transform: none !important;
}

/* Free & Team pricing cards: Frosted glass with specular highlight and smooth hover lift */
.price-card:not(.highlight) {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 20px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 30px -5px rgba(0, 0, 0, 0.05) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease !important;
}
.price-card:not(.highlight):hover {
  
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 20px 40px -10px rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}

/* Pricing Badges: Pro Tool & Team */
.feature-pro-pill,
.price-card .feature-pro-pill,
.pro-tag,
li .feature-pro-pill {
  display: inline-block !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(112, 69, 232, 0.14) !important;
  border: 1px solid rgba(112, 69, 232, 0.35) !important;
  color: #7045E8 !important;
  margin-left: 6px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}
/* Non-highlighted / Light Card Badges */
.price-card:not(.highlight) .feature-pro-pill,
.card:not(.highlight) .feature-pro-pill,
body:not(.dark) .price-card:not(.highlight) .pricing-features-list .feature-pro-pill {
  background: rgba(112, 69, 232, 0.12) !important;
  border: 1px solid rgba(112, 69, 232, 0.3) !important;
  color: #7045E8 !important;
}
.feature-team-pill,
.price-card .feature-team-pill,
li .feature-team-pill,
.price-card:not(.highlight) .feature-team-pill,
.card:not(.highlight) .feature-team-pill,
body:not(.dark) .price-card:not(.highlight) .pricing-features-list .feature-team-pill {
  display: inline-block !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #047857 !important;
  margin-left: 6px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

/* Highlighted / Dark Card Badges (Highest Specificity) */
.price-card.highlight .feature-pro-pill,
html body .price-card.highlight .feature-pro-pill,
html body .price-card.highlight .pricing-features-list .feature-pro-pill,
html body .price-card.highlight li .feature-pro-pill {
  background: rgba(112, 69, 232, 0.22) !important;
  border: 1px solid rgba(167, 139, 250, 0.45) !important;
  color: #DDD6FE !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
}
.price-card.highlight .feature-team-pill,
html body .price-card.highlight .feature-team-pill,
html body .price-card.highlight .pricing-features-list .feature-team-pill,
html body .price-card.highlight li .feature-team-pill {
  background: rgba(16, 185, 129, 0.22) !important;
  border: 1px solid rgba(52, 211, 153, 0.45) !important;
  color: #6EE7B7 !important;
}

/* Invoice document hover side-effects neutralization */
.invoice-paper tr:hover,
.invoice-paper tr:hover > td,
.invoice-paper tr:hover > th,
.invoice-sheet tr:hover,
.invoice-sheet tr:hover > td,
.invoice-sheet tr:hover > th,
.invoice-rendered-pane tr:hover,
.invoice-rendered-pane tr:hover > td,
.invoice-rendered-pane tr:hover > th,
.inv-paper tr:hover,
.inv-paper tr:hover > td,
.inv-paper tr:hover > th,
.inv-render tr:hover,
.inv-render tr:hover > td,
.inv-render tr:hover > th,
.invoice-preview-wrap tr:hover,
.invoice-preview-wrap tr:hover > td,
.invoice-preview-wrap tr:hover > th,
.invoice-tpl-mini-card tr:hover > td {
  background: inherit !important;
}
td.inv-total-dark-card,
tr:hover > td.inv-total-dark-card,
table tr td.inv-total-dark-card:hover,
.inv-total-dark-card {
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #ffffff !important;
}
.inv-total-dark-card * {
  color: #ffffff !important;
}

/* Invoice templates grid: 3/3 columns */
.invoice-templates-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
}
@media (max-width: 900px) {
  .invoice-templates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 580px) {
  .invoice-templates-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================================
   RUI QUICKVIEW DRAWER SYSTEM - Fixed, Smooth, Zero Layout Shift
   ========================================================================== */
.rui-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  display: flex !important;
  justify-content: flex-end !important;
  background: rgba(15, 23, 42, 0.48) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  margin: 0 !important;
  padding: 0 !important;
}
.rui-drawer-backdrop.is-open {
  opacity: 1 !important;
  visibility: visible !important;
}
.rui-drawer-panel {
  position: relative !important;
  width: min(520px, 100vw) !important;
  height: 100% !important;
  height: 100dvh !important;
  background: var(--surface, #ffffff) !important;
  border-left: 1px solid var(--border, #e2e8f0) !important;
  box-shadow: -18px 0 50px rgba(15, 23, 42, 0.22) !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.rui-drawer-backdrop.is-open .rui-drawer-panel {
  transform: translateX(0) !important;
}
.rui-drawer-head {
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--border, #e2e8f0) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  background: var(--surface, #ffffff) !important;
  flex-shrink: 0 !important;
}
.rui-drawer-head h3 {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--ink, #111318) !important;
}
.rui-drawer-body {
  padding: 24px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}
.rui-drawer-foot {
  padding: 16px 24px !important;
  border-top: 1px solid var(--border, #e2e8f0) !important;
  background: var(--surface, #ffffff) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}
.drawer-kv-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 16px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 16px !important;
}
.drawer-kv-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 0 !important;
}
.drawer-kv-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--muted, #64748b) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
.drawer-kv-value {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--ink, #0f172a) !important;
  overflow-wrap: anywhere !important;
}

/* ==========================================================================
   AUTH SHOWCASE, MICRO-GRID AND LUXURIOUS FROSTED GLASS CARD
   ========================================================================== */
.auth-showcase {
  background: radial-gradient(120% 140% at 85% 10%, rgba(112, 69, 232, 0.35) 0%, rgba(59, 130, 246, 0.12) 50%, #0B0E17 100%), #0B0E17 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 60px -15px rgba(112, 69, 232, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  margin-right: 0 !important;
}
.auth-content {
  background-color: #F8FAFC !important;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(112, 69, 232, 0.06) 0%, transparent 70%),
    radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px) !important;
  background-size: 100% 100%, 24px 24px !important;
}
.auth-form-card {
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
  border-radius: 24px !important;
}

/* ==========================================================================
   KANBAN TASK MODAL STANDARD WIDTH & DIALOG GLASS EFFECT
   ========================================================================== */
#kanban-task-dialog,
#kanban-modal {
  max-width: min(580px, 92vw) !important;
  width: 100% !important;
  margin: 0 auto !important;
}
#kanban-task-dialog .admin-edit-dialog-card,
#kanban-modal .admin-edit-dialog-card {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.18) !important;
  border-radius: 24px !important;
  padding: 0 !important;
}

/* ==========================================================================
   RETRAAK FROSTED GLASS CARDS, MODAL HEADERS, AND CONTROLS
   ========================================================================== */
/* 1. Frosted Glass Cards Across All Pages (Workspace, User Dashboard, Pilot & Admin) */
html body:is(.card, section.card, .admin-content .card, .app-content .card, .workspace-shell .card, .admin-shell .card, .backup-stats-grid > .card):not(.price-card.highlight):not(.side-plan):not(.inv-total-dark-card) {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 10px 32px -4px rgba(15, 23, 42, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.9) !important;
}
[data-theme="dark"] html body:is(.card, section.card, .admin-content .card, .app-content .card, .workspace-shell .card, .admin-shell .card, .backup-stats-grid > .card):not(.price-card.highlight):not(.side-plan):not(.inv-total-dark-card),
html body[data-theme="dark"] :is(.card, section.card, .admin-content .card, .app-content .card, .workspace-shell .card, .admin-shell .card, .backup-stats-grid > .card):not(.price-card.highlight):not(.side-plan):not(.inv-total-dark-card) {
  background: rgba(17, 24, 39, 0.75) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.08) !important;
}

/* 3. Time Zone Dropdown */
#edit-timezone,
select[name="timezone"] {
  display: block !important;
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
}
[data-theme="dark"] #edit-timezone,
[data-theme="dark"] select[name="timezone"] {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

/* 4. Animated AI Loading Dots */
.ai-dots-loader {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
.ai-dots-loader .ai-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  animation: aiDotsBounce 1.4s infinite ease-in-out both !important;
}
.ai-dots-loader .ai-dot:nth-child(1) {
  animation-delay: -0.32s !important;
  background: #7c3aed !important;
}
.ai-dots-loader .ai-dot:nth-child(2) {
  animation-delay: -0.16s !important;
  background: #6366f1 !important;
}
.ai-dots-loader .ai-dot:nth-child(3) {
  animation-delay: 0s !important;
  background: #a855f7 !important;
}
@keyframes aiDotsBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.35;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.6));
  }
}

/* ==========================================================================
   RETRAAK UNIFIED GLASS DIALOGS & EDGE-TO-EDGE HEADERS
   ========================================================================== */
.modal-card,
.admin-edit-dialog-card,
.client-request-dialog-card,
.rui-confirm-card,
.checkout-modal-card,
.fx-dialog-inner,
#admin-clear-audit-modal,
dialog[open] .admin-edit-dialog-card,
dialog[open] .client-request-dialog-card,
dialog[open] .checkout-modal-card,
dialog[open] .fx-dialog-inner,
dialog[open] #admin-clear-audit-modal,
dialog[open] .modal-card {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 28px 70px -15px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  box-sizing: border-box !important;
}
[data-theme="dark"] .modal-card,
[data-theme="dark"] .admin-edit-dialog-card,
[data-theme="dark"] .client-request-dialog-card,
[data-theme="dark"] .rui-confirm-card,
[data-theme="dark"] .checkout-modal-card,
[data-theme="dark"] .fx-dialog-inner,
[data-theme="dark"] #admin-clear-audit-modal,
[data-theme="dark"] dialog[open] .admin-edit-dialog-card,
[data-theme="dark"] dialog[open] .client-request-dialog-card,
[data-theme="dark"] dialog[open] .checkout-modal-card,
[data-theme="dark"] dialog[open] .fx-dialog-inner,
[data-theme="dark"] dialog[open] #admin-clear-audit-modal,
[data-theme="dark"] dialog[open] .modal-card {
  background: rgba(17, 24, 39, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  box-shadow: 0 28px 70px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.modal-card-head,
.admin-edit-dialog-heading,
.client-request-dialog-heading,
.dialog-head,
.modal-head,
.retraak-ai-header,
.checkout-modal-header,
#admin-clear-audit-modal .modal-card-head,
dialog .admin-edit-dialog-heading,
dialog .client-request-dialog-heading {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 22px 28px 18px !important;
  border-radius: 24px 24px 0 0 !important;
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
}
[data-theme="dark"] .modal-card-head,
[data-theme="dark"] .admin-edit-dialog-heading,
[data-theme="dark"] .client-request-dialog-heading,
[data-theme="dark"] .dialog-head,
[data-theme="dark"] .modal-head,
[data-theme="dark"] .retraak-ai-header,
[data-theme="dark"] .checkout-modal-header,
[data-theme="dark"] #admin-clear-audit-modal .modal-card-head,
[data-theme="dark"] dialog .admin-edit-dialog-heading,
[data-theme="dark"] dialog .client-request-dialog-heading {
  background: rgba(17, 24, 39, 0.5) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.modal-card > :is(form, .modal-card-body, .stack-form, .admin-change-password-form),
.admin-edit-dialog-card > :is(form, .stack-form),
.client-request-dialog-card > :is(form),
#admin-clear-audit-modal > :is(form, .modal-card-body, .stack-form) {
  padding: 24px 28px !important;
  box-sizing: border-box !important;
}

/* Universal radio button reset: remove any outer square border box and restore crisp circular appearance */
input[type="radio"],
.qr-type-choice input[type="radio"],
.modal-card input[type="radio"],
dialog input[type="radio"] {
  -webkit-appearance: radio !important;
  appearance: radio !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  accent-color: var(--primary, #2563EB) !important;
  border-radius: 50% !important;
}

/* Confirmation Dialogs: Unified Frosted Glass & Sizing */
.rui-confirm-card {
  padding: 26px 28px 24px !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-sizing: border-box !important;
}
[data-theme="dark"] .rui-confirm-card {
  background: rgba(17, 24, 39, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
.rui-confirm-card .modal-actions {
  margin: 20px 0 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-top: none !important;
  border-radius: 0 !important;
  display: flex !important;
  gap: 12px !important;
  justify-content: flex-end !important;
}
[data-theme="dark"] .rui-confirm-card .modal-actions {
  background: transparent !important;
  border-top: none !important;
}

/* ==========================================================================
   HERO CONTAINER RESPONSIVE INTEGRITY & ANTI-COLLAPSE PROTECTION
   ========================================================================== */
.futuristic-hero,
section.futuristic-hero,
body.site main > .futuristic-hero:first-child {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.futuristic-hero .hero-grid,
.hero-grid,
body.site main > .futuristic-hero:first-child .hero-grid {
  width: min(1240px, calc(100% - 48px)) !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr) !important;
  gap: clamp(28px, 4vw, 56px) !important;
  align-items: center !important;
}

.hero-copy {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.futuristic-headline {
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: manual !important;
}

.futuristic-stack-wrap {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 991px) {
  .futuristic-hero .hero-grid,
  .hero-grid,
  body.site main > .futuristic-hero:first-child .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    width: min(100% - 32px, 640px) !important;
  }
}

@media (max-width: 760px) {
  .futuristic-hero .hero-grid,
  .hero-grid,
  body.site main > .futuristic-hero:first-child .hero-grid {
    width: min(100% - 24px, 100%) !important;
    gap: 28px !important;
  }
  .futuristic-headline {
    font-size: clamp(28px, 7.5vw, 36px) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.025em !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  .hero-lead {
    font-size: 15px !important;
    line-height: 1.55 !important;
    max-width: 100% !important;
  }
  .futuristic-gradient {
    display: inline-block !important;
    max-width: 100% !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
}

/* Mobile bottom sheet slide-up animation for dialogs, modals & confirm popups */
@keyframes rui-sheet-slide-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
@media (max-width: 800px) {
  dialog[open] .modal-card,
  dialog[open] .admin-edit-dialog-card,
  dialog[open] .client-request-dialog-card,
  dialog[open] .checkout-modal-card,
  dialog[open] .fx-dialog-inner,
  dialog[open] #admin-clear-audit-modal,
  .modal-overlay > .modal-card,
  .modal-overlay > .modal-card-wrap > .modal-card,
  .popup-overlay > .popup-card,
  .rui-confirm-card {
    border-radius: 24px 24px 0 0 !important;
    animation: rui-sheet-slide-up .36s cubic-bezier(0.16, 1, 0.3, 1) both !important;
  }
}

/* Scroll-Lock Background Layout Shift Elimination */
html.is-scroll-locked,
html.is-scroll-locked body,
html.is-scroll-locked :is(body.admin, body.app, .admin-layout, .app-shell, .app-content, .admin-content, .site-header, body) {
  padding-right: 0 !important;
}

/* Universal Vibrant Plan Pills */
.plan-color-pill.plan-free,
.plan-pill.plan-free {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}
.plan-color-pill.plan-pro,
.plan-pill.plan-pro {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}
.plan-color-pill.plan-team,
.plan-pill.plan-team {
  background: rgba(124, 58, 237, 0.1) !important;
  color: #6d28d9 !important;
  border: 1px solid rgba(124, 58, 237, 0.25) !important;
}

/* Universal High-Contrast Status Pills */
.pill-teal, .pill-green, .pill-emerald, .pill-success,
.badge-teal, .badge-green, .badge-emerald, .badge-success {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}
.pill-amber, .pill-yellow, .pill-orange, .pill-warning,
.badge-amber, .badge-yellow, .badge-orange, .badge-warning {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}
.pill-red, .pill-rose, .pill-danger,
.badge-red, .badge-rose, .badge-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

/* ==========================================================================
   VIBRANT MESH GLASSMORPHIC SIDEPANELS (Admin & User Workspaces)
   ========================================================================== */
.admin-shell .sidebar,
.admin-shell aside#app-sidebar,
.admin-shell .admin-sidebar {
  background: radial-gradient(120% 80% at 0% 0%, rgba(37, 99, 235, 0.14) 0%, rgba(10, 10, 15, 0.94) 65%),
              radial-gradient(100% 100% at 100% 100%, rgba(124, 58, 237, 0.12) 0%, rgba(10, 10, 15, 0.94) 65%),
              #0a0a0f !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.workspace-shell .sidebar,
.workspace-shell aside#app-sidebar,
.workspace-shell .user-sidebar-v2 {
  background: radial-gradient(100% 60% at 0% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(255, 255, 255, 0.88) 70%),
              radial-gradient(80% 80% at 100% 100%, rgba(124, 58, 237, 0.06) 0%, rgba(255, 255, 255, 0.88) 70%),
              rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-right: 1px solid rgba(226, 232, 240, 0.85) !important;
}

/* Confirmation Dialogs: Standardize into single seamless frosted glass card */
.rui-confirm-card,
.critical-delete-dialog {
  padding: 28px !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 28px 70px -15px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  box-sizing: border-box !important;
}
.rui-confirm-card .modal-actions,
.critical-delete-actions {
  margin: 20px 0 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-top: none !important;
  border-radius: 0 !important;
  display: flex !important;
  gap: 12px !important;
  justify-content: flex-end !important;
}




/* High-specificity confirmation modal & badge & search fixes */
html body .modal-overlay .rui-confirm-card,
html body .rui-confirm-card,
html body .critical-delete-dialog {
  padding: 28px !important;
  max-width: 440px !important;
  width: calc(100vw - 32px) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 28px 70px -15px rgba(15, 23, 42, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  box-sizing: border-box !important;
}
html body .modal-overlay .rui-confirm-card #rui-confirm-title {
  margin: 12px 0 8px 0 !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  color: #0B0F19 !important;
  line-height: 1.3 !important;
}
html body .modal-overlay .rui-confirm-card #rui-confirm-text {
  margin: 0 0 6px 0 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: #475569 !important;
}
html body .modal-overlay .rui-confirm-card .modal-actions {
  margin: 22px 0 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  gap: 10px !important;
  justify-content: flex-end !important;
}
html body .plan-color-pill.plan-free {
  background: rgba(100, 116, 139, 0.14) !important;
  color: #334155 !important;
  border: 1px solid rgba(100, 116, 139, 0.3) !important;
  font-weight: 700 !important;
}
html body .plan-color-pill.plan-pro {
  background: rgba(37, 99, 235, 0.14) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(37, 99, 235, 0.32) !important;
  font-weight: 700 !important;
}
html body .plan-color-pill.plan-team {
  background: rgba(124, 58, 237, 0.14) !important;
  color: #6d28d9 !important;
  border: 1px solid rgba(124, 58, 237, 0.32) !important;
  font-weight: 700 !important;
}
html body :is(.crm-search-input-wrap, .input-with-icon, .user-filter-form, .log-filter-bar, .filter-bar) input[type="search"],
html body input.crm-search-input {
  background-image: none !important;
  padding-left: 38px !important;
}


/* ==========================================================================
   ROUND 2 MASTER POLISH: PALETTE, LIQUID GLASS, MOTIONS & HOVER DATA VIEWER
   Palette: #0F131E, #FFFFFF, #F0F1F4, #182B9F, #1D49E8, #3A27A1
   ========================================================================== */
:root {
  --rt-obsidian: #0F131E;
  --rt-white: #FFFFFF;
  --rt-ice: #F0F1F4;
  --rt-royal: #182B9F;
  --rt-electric: #1D49E8;
  --rt-indigo: #3A27A1;
}

/* Vibrant Liquid Glass Ambient Mesh Across User, Admin & Client Surfaces */
html body.workspace-shell,
html body .app-shell,
html body .app-main,
html body .admin-main,
html body .pilot-main,
html body.client-portal-shell {
  background-color: #F0F1F4 !important;
  background-image:
    radial-gradient(at 6% 8%, rgba(29, 73, 232, 0.12) 0px, transparent 46%),
    radial-gradient(at 94% 12%, rgba(58, 39, 161, 0.11) 0px, transparent 48%),
    radial-gradient(at 50% 48%, rgba(24, 43, 159, 0.06) 0px, transparent 58%),
    radial-gradient(at 15% 88%, rgba(16, 185, 129, 0.08) 0px, transparent 50%) !important;
  background-attachment: scroll !important;
}

/* True Apple Liquid Glass Cards on User, Admin & Client Panels */
html body :is(.card, .panel-card, .pilot-kpi, .dashboard-kpi, .velocity-metric-card, .workspace-detail-glass-card):not(.highlight):not(.pop):not(.side-plan) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0.68) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 14px 36px -14px rgba(15, 19, 30, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.24s ease !important;
}
html body :is(.pilot-kpi, .dashboard-kpi, .velocity-metric-card, .dw-stat-tile):hover {
  
  border-color: rgba(29, 73, 232, 0.38) !important;
  box-shadow: 0 20px 42px -12px rgba(29, 73, 232, 0.16), inset 0 1px 0 #ffffff !important;
}

/* Waving Hand & Greeting Sub-Headline */
@keyframes retraakWaveHand {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(16deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(14deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(10deg); }
}
.welcome-wave {
  display: inline-block;
  transform-origin: 70% 75%;
}
.welcome-sub-greeting {
  font-size: 0.72em;
  font-weight: 600;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 12px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Live Velocity & Conversion Metrics Strip */
@keyframes retraakBarGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.retraak-velocity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 20px;
}
@media (max-width: 980px) {
  .retraak-velocity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .retraak-velocity-grid { grid-template-columns: 1fr; }
}
.velocity-metric-card {
  padding: 16px 18px !important;
  border-radius: 18px !important;
  cursor: pointer;
}
.vm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.vm-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}
.vm-val {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.02em;
}
.vm-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 19, 30, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}
.vm-bar-fill {
  height: 100%;
  border-radius: 999px;
  transform-origin: left center;
}
.vm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
}

/* SVG Bars & Chart Bars */
.pilot-bars .pilot-bar,
.chart-bars .chart-bar {
  transform-origin: bottom center;
  animation: none !important;
}
.pilot-bars .pilot-bar:hover {
  opacity: 0.88 !important;
  filter: none !important;
}

/* Floating Apple Solid Obsidian Hover Data Viewer (Compositor-Accelerated, Zero GPU Blur Thrashing) */
#retraak-hover-viewer {
  position: fixed !important;
  top: -9999px;
  left: -9999px;
  z-index: 2147483646 !important;
  pointer-events: none !important;
  min-width: 190px !important;
  max-width: 290px !important;
  padding: 11px 14px !important;
  border-radius: 14px !important;
  background: #0F131E !important;
  background-color: #0F131E !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 16px 36px -8px rgba(15, 19, 30, 0.45) !important;
  color: #FFFFFF !important;
  opacity: 0 !important;
  visibility: hidden !important;
  will-change: transform, opacity !important;
  transition: opacity 0.12s ease !important;
}
#retraak-hover-viewer.is-active {
  opacity: 1 !important;
  visibility: visible !important;
}
#retraak-hover-viewer .rhv-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #60A5FA !important;
  margin-bottom: 3px;
}
#retraak-hover-viewer .rhv-val {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF !important;
  line-height: 1.25;
}
#retraak-hover-viewer .rhv-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78) !important;
  margin-top: 4px;
  line-height: 1.4;
}

/* Ensure all admin-edit-dialog-card popups have 0 outer padding and clean edge-to-edge header */
html body dialog.admin-edit-dialog .admin-edit-dialog-card {
  padding: 0 !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 70px -15px rgba(15, 19, 30, 0.26), inset 0 1px 0 #ffffff !important;
}
html body dialog.admin-edit-dialog .admin-edit-dialog-heading {
  margin: 0 !important;
  padding: 22px 28px 18px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 241, 244, 0.65) 100%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  border-radius: 24px 24px 0 0 !important;
}
html body dialog.admin-edit-dialog .admin-edit-dialog-card > :is(form, .stack-form, .modal-card-body) {
  padding: 24px 28px !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Plan Avatar Rings synced with Palette (#1D49E8 Pro, #3A27A1 Team, #64748B Free) */
html body .retraak-plan-ring-pro {
  border: 0 !important;
  box-shadow: 0 0 0 2.5px var(--plan-ring-pro, #1D49E8), 0 0 12px rgba(29, 73, 232, 0.35) !important;
}
html body .retraak-plan-ring-team {
  border: 0 !important;
  box-shadow: 0 0 0 2.5px var(--plan-ring-team, #E5A50A), 0 0 14px rgba(229, 165, 10, 0.48) !important;
}
html body .retraak-plan-ring-free {
  border: 0 !important;
  box-shadow: 0 0 0 2px var(--plan-ring-free, #CBD5E1) !important;
}


/* ==========================================================================
   ROUND 3 MASTER POLISH: PERIWINKLE/SAPPHIRE LIQUID GLASS POPUPS & CARDS,
   CENTERED DIALOGS, UNIFORM VELOCITY CARDS & COOKIE BANNER GLASS
   ========================================================================== */

/* 1. Center ALL native <dialog> and .modal-overlay popups in the exact middle of the viewport */
html body dialog[open],
html body dialog.admin-edit-dialog[open],
html body #kanban-task-dialog[open] {
  position: fixed !important;
  inset: 0 !important;
  margin: auto !important;
  max-height: min(90dvh, 880px) !important;
  animation: rtPopupSpringIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) backwards !important;
}
html body .modal-overlay.is-open {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}
@keyframes rtPopupSpringIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 2. Apply image_17737d.png Periwinkle/Sapphire Apple Liquid Glass Effect to ALL Popup Cards */
html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .retraak-ai-dialog, .sc-dialog-form, #admin-clear-audit-modal),
html body dialog.admin-edit-dialog .admin-edit-dialog-card,
html body .modal-overlay .rui-confirm-card {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(29, 73, 232, 0.12) 0%, rgba(58, 39, 161, 0.07) 52%, rgba(255, 255, 255, 0.95) 100%),
    rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(29, 73, 232, 0.24) !important;
  outline: 6px solid rgba(29, 73, 232, 0.055) !important;
  border-radius: 24px !important;
  box-shadow:
    0 28px 68px -14px rgba(15, 19, 30, 0.24),
    inset 0 1px 0 #FFFFFF !important;
}
html body :is(.modal-card-head, .modal-head, .checkout-modal-header, .dialog-head, .admin-edit-dialog-heading, .client-request-dialog-heading, .retraak-ai-header) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(240, 244, 255, 0.45) 100%) !important;
  border-bottom: 1px solid rgba(29, 73, 232, 0.14) !important;
}
/* Ensure form inputs inside glass popups remain crisp white and unaffected */
html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea) {
  background-color: rgba(255, 255, 255, 0.96) !important;
  color: #0F131E !important;
  border: 1px solid #CBD5E1 !important;
}
html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea):focus {
  border-color: #1D49E8 !important;
  box-shadow: 0 0 0 3px rgba(29, 73, 232, 0.14) !important;
}

/* 3. Apply Periwinkle/Sapphire Liquid Glass & Vibrant Mesh to User, Admin & Client Panels */
html body.workspace-shell,
html body .app-shell,
html body .app-main,
html body .admin-main,
html body .pilot-main,
html body.client-portal-shell {
  background-color: #EEF1F7 !important;
  background-image:
    radial-gradient(at 6% 8%, rgba(29, 73, 232, 0.15) 0px, transparent 45%),
    radial-gradient(at 94% 10%, rgba(58, 39, 161, 0.14) 0px, transparent 48%),
    radial-gradient(at 48% 50%, rgba(24, 43, 159, 0.08) 0px, transparent 55%),
    radial-gradient(at 14% 88%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
    radial-gradient(at 88% 86%, rgba(29, 73, 232, 0.12) 0px, transparent 48%) !important;
  background-attachment: scroll !important;
}
html body :is(.card, .panel-card, .pilot-kpi, .dashboard-kpi, .velocity-metric-card, .workspace-detail-glass-card):not(.highlight):not(.pop):not(.side-plan) {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(29, 73, 232, 0.065) 0%, rgba(58, 39, 161, 0.035) 55%, rgba(255, 255, 255, 0.92) 100%),
    rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(29, 73, 232, 0.16) !important;
  box-shadow: 0 14px 36px -14px rgba(15, 19, 30, 0.09), inset 0 1px 0 #FFFFFF !important;
}

/* 4. Fix Velocity Metric Cards Uniform Height & Top Alignment (Fixes image_177a62.png) */
html body .retraak-velocity-grid {
  align-items: stretch !important;
}
html body .retraak-velocity-grid > .velocity-metric-card,
html body .retraak-velocity-grid > .card.velocity-metric-card,
html body .retraak-velocity-grid > .card + .card {
  margin: 0 !important;
  margin-top: 0 !important;
  height: 100% !important;
  min-height: 108px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}
html body .user-bento-pair-grid > .card,
html body .user-bento-pair-grid > .card + .card {
  margin: 0 !important;
  height: 100% !important;
}

/* 5. Cookie Consent Banner Periwinkle/Sapphire Liquid Glass */
html body #cookie-consent.rt-cookie-liquid-glass {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(29, 73, 232, 0.12) 0%, rgba(58, 39, 161, 0.07) 52%, rgba(255, 255, 255, 0.96) 100%),
    rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(29, 73, 232, 0.24) !important;
  outline: 6px solid rgba(29, 73, 232, 0.055) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 60px -12px rgba(15, 19, 30, 0.22), inset 0 1px 0 #FFFFFF !important;
}


/* ==========================================================================
   ROUND 4 MASTER POLISH: BLACK & WHITE BUTTON CONTRAST, SOLID PRICING BADGES,
   UNIFIED MINIMAL LIQUID GLASS POPUPS (.fx-dialog + <dialog>), & RED CROSS
   ========================================================================== */

/* 1. High-Contrast Black & White Button System (Fixes image_22c4fd.png & image_22c503.png) */
html body :is(.btn-primary, a.btn-primary, button.btn-primary, .btn-brand, a.btn-brand, .mx .mx-btn-primary, a.mx-btn-primary, .rt-bw-primary-btn):not(:disabled) {
  background: var(--cta, #0F131E) !important;
  border: 1px solid var(--cta, #0F131E) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-weight: 750 !important;
}
html body :is(.btn-primary, a.btn-primary, button.btn-primary, .btn-brand, a.btn-brand, .mx .mx-btn-primary, a.mx-btn-primary, .rt-bw-primary-btn):not(:disabled) :is(span, strong, small) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}
html body :is(.btn-primary, a.btn-primary, button.btn-primary, .btn-brand, a.btn-brand, .mx .mx-btn-primary, a.mx-btn-primary, .rt-bw-primary-btn):not(:disabled):is(:hover, :focus-visible, :active) {
  background: var(--cta-hover, #182B9F) !important;
  border-color: var(--cta-hover, #182B9F) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html body :is(.btn-secondary, a.btn-secondary, button.btn-secondary, .btn-outline, .mx .mx-btn:not(.mx-btn-primary):not(.mx-btn-danger):not(.mx-btn-ghost)):not(:disabled) {
  background: #FFFFFF !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1.5px solid #CBD5E1 !important;
  font-weight: 700 !important;
}
html body :is(.btn-secondary, a.btn-secondary, button.btn-secondary, .btn-outline, .mx .mx-btn:not(.mx-btn-primary):not(.mx-btn-danger):not(.mx-btn-ghost)):not(:disabled):is(:hover, :focus-visible, :active) {
  background: #0F131E !important;
  border-color: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}
html body :is(.btn-secondary, a.btn-secondary, button.btn-secondary, .btn-outline, .mx .mx-btn:not(.mx-btn-primary):not(.mx-btn-danger):not(.mx-btn-ghost)):not(:disabled):is(:hover, :focus-visible, :active) :is(span, strong, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* 2. Compact AI Sticky Actions Bar (Fixes image_22d3e3.png) */
html body .ai-sticky-actions {
  width: max-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  padding: 10px 14px !important;
  border-radius: 16px !important;
}

/* 3. Unified Minimal Apple Liquid Glass Popups Across Admin, User, Tasks, Kanban, & Features (.fx-dialog) */
html body dialog.fx-dialog[open],
html body dialog.admin-edit-dialog[open],
html body dialog[open] {
  position: fixed !important;
  inset: 0 !important;
  margin: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}
html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .fx-dialog-inner, .sc-dialog-form, #admin-clear-audit-modal) {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(29, 73, 232, 0.10) 0%, rgba(58, 39, 161, 0.06) 52%, rgba(255, 255, 255, 0.96) 100%),
    rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(29, 73, 232, 0.22) !important;
  outline: 6px solid rgba(29, 73, 232, 0.045) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 68px -14px rgba(15, 19, 30, 0.24), inset 0 1px 0 #FFFFFF !important;
  color: #0F131E !important;
}
html body :is(.modal-card-head, .admin-edit-dialog-heading, .client-request-dialog-heading, .fx-dialog-head, .checkout-modal-header) {
  padding: 20px 26px 16px !important;
  margin: 0 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(240, 244, 255, 0.5) 100%) !important;
  border-bottom: 1px solid rgba(29, 73, 232, 0.14) !important;
  border-radius: 24px 24px 0 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
}
html body .fx-dialog-body {
  padding: 22px 26px 24px !important;
}

/* 4. Authoritative Red Cross (×) with No Background & Deep Red 90deg Hover Motion */
html body :is(.dialog-close-btn, .modal-close-btn, .modal-close-x, .modal-close, button.close, .critical-delete-close, .client-request-close, .fx-dialog-close, .checkout-modal-close, .popup-close, .rui-confirm-close, .message-drawer-close, .client-message-drawer-close, dialog [data-dialog-close].icon-btn) {
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2.7' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 16px 16px !important;
  color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.18s ease !important;
}
html body :is(.dialog-close-btn, .modal-close-btn, .modal-close-x, .modal-close, button.close, .critical-delete-close, .client-request-close, .fx-dialog-close, .checkout-modal-close, .popup-close, .rui-confirm-close, .message-drawer-close, .client-message-drawer-close, dialog [data-dialog-close].icon-btn) > * {
  opacity: 0 !important;
  pointer-events: none !important;
}
html body :is(.dialog-close-btn, .modal-close-btn, .modal-close-x, .modal-close, button.close, .critical-delete-close, .client-request-close, .fx-dialog-close, .checkout-modal-close, .popup-close, .rui-confirm-close, .message-drawer-close, .client-message-drawer-close, dialog [data-dialog-close].icon-btn):is(:hover, :focus-visible, :active) {
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23991B1B' stroke-width='3.1' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 17px 17px !important;
  color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  
}


/* ==========================================================================
   ROUND 5 MASTER OVERRIDES:
   - Single Unified Hover Viewer (Hide legacy .retraak-chart-tooltip)
   - Unified Single-Card Sidebar Profile & Logout (.user-sidebar-footer-v2)
   - Sleek Black & White AI Trigger Buttons (.retraak-ai-trigger-btn)
   - Solid Pricing Badges & Distinct Pro (#1D49E8) / Team (#3A27A1) Colors
   ========================================================================== */
html body .retraak-chart-tooltip {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html body .user-sidebar-footer-v2 > a.user-sidebar-profile,
html body .workspace-shell .user-sidebar-footer-v2 > a.user-sidebar-profile {
  border: 0 !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 2px 4px !important;
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-main {
  background: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.14) !important;
}
html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-main:hover {
  background: #182B9F !important;
  border-color: #182B9F !important;
  color: #FFFFFF !important;
}
html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-sub {
  background: #FFFFFF !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid #CBD5E1 !important;
}
html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-sub:hover {
  background: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #0F131E !important;
}


/* ==========================================================================
   ROUND 6 MASTER OVERRIDES:
   1. +20% Apple Liquid Glassmorphism Across All Cards, Modals, Drawers & Navs
   2. Client Tracking Header, Nav Pill Bar, Top 3 Stat Cards & Section Order
   3. Right-Hand Liquid Glass Slidebar Drawer (Client Chat, User & Admin Drawers)
   4. Admin Panel Top 3 / 4 KPI Cards Glassmorphism & Full Mobile Responsiveness
   5. Responsive Admin & User Messages Inbox + Spring Motions
   ========================================================================== */

/* 1. +20% Apple Liquid Glassmorphism & Atmospheric Mesh Backgrounds */
html body.site,
html body.client-portal-body,
html body.workspace-shell,
html body.app-shell,
html body.admin-shell {
  background-color: #EEF1F8 !important;
  background-image:
    radial-gradient(at 6% 8%, rgba(29, 73, 232, 0.20) 0px, transparent 46%),
    radial-gradient(at 94% 12%, rgba(88, 28, 235, 0.18) 0px, transparent 48%),
    radial-gradient(at 50% 42%, rgba(24, 43, 159, 0.11) 0px, transparent 54%),
    radial-gradient(at 14% 84%, rgba(16, 185, 129, 0.12) 0px, transparent 48%),
    radial-gradient(at 88% 88%, rgba(29, 73, 232, 0.16) 0px, transparent 50%) !important;
  background-attachment: scroll !important;
}

html body :is(
  .card:not(.dash-welcome):not(.pilot-hero):not(.pay-style-plan.highlight):not(.price-card.highlight),
  section.card:not(.dash-welcome):not(.pilot-hero),
  article.card:not(.dash-welcome):not(.pilot-hero):not(.price-card.highlight),
  .client-portal-stats article,
  .client-stat-glass-card,
  .velocity-metric-card,
  .registry-kpi,
  .crm-kpi-card,
  .pilot-kpi,
  .dashboard-kpi,
  .metric-checkable-card,
  .user-summary .card,
  .workspace-detail-glass-card,
  .admin-user-profile-card,
  .showcase-hero-card,
  .showcase-stat-card,
  .showcase-review-card,
  .showcase-form-card
) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78) 0%, rgba(244, 247, 255, 0.56) 52%, rgba(235, 240, 255, 0.44) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.94) !important;
  box-shadow:
    0 20px 46px -12px rgba(15, 23, 42, 0.10),
    0 4px 16px -2px rgba(29, 73, 232, 0.07),
    inset 0 1.5px 0 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 0 rgba(29, 73, 232, 0.10),
    inset 0 0 24px rgba(29, 73, 232, 0.055) !important;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease !important;
}

html body :is(
  .velocity-metric-card,
  .registry-kpi,
  .crm-kpi-card,
  .pilot-kpi,
  .dashboard-kpi,
  .metric-checkable-card,
  .client-portal-stats article,
  .user-summary .card,
  .showcase-stat-card
):hover {
  
  border-color: rgba(29, 73, 232, 0.42) !important;
  box-shadow:
    0 26px 54px -12px rgba(29, 73, 232, 0.18),
    0 8px 22px -4px rgba(88, 28, 235, 0.12),
    inset 0 2px 0 0 #FFFFFF,
    inset 0 0 28px rgba(29, 73, 232, 0.09) !important;
}

/* 2. Client Tracking Header, Navigation Bar & Section Ordering (image_266f58.png) */
html body .client-tracking-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  padding: 12px clamp(14px, 3vw, 28px) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84) 0%, rgba(244, 247, 255, 0.68) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08), inset 0 1px 0 #FFFFFF !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100vw !important;
}

html body .client-tracking-nav {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  max-width: 100% !important;
  padding: 5px 6px !important;
  border-radius: 16px !important;
  background: rgba(241, 245, 255, 0.78) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(29, 73, 232, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  box-sizing: border-box !important;
}

html body .client-tracking-nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 13px !important;
  border-radius: 11px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body .client-tracking-nav a:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #1D49E8 !important;
  
}

html body .client-tracking-nav a.is-active {
  background: #08080B !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(8, 8, 11, 0.22) !important;
}

@media (max-width: 900px) {
  html body .client-tracking-header {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  html body .client-tracking-nav {
    order: 3 !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 5px 8px !important;
  }
  html body .client-tracking-nav::-webkit-scrollbar {
    display: none !important;
  }
  html body .client-tracking-nav a {
    flex: 0 0 auto !important;
    padding: 6px 11px !important;
    font-size: 12px !important;
  }
  html body .client-tracking-header-actions {
    margin-left: auto !important;
  }
}

/* Fix Client Portal section ordering so Top 3 Stat Cards are ALWAYS first */
html body .client-portal-main {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}
html body .client-portal-main > * {
  order: 0 !important;
}

html body .client-portal-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  order: -1 !important;
}

html body .client-portal-stats article {
  position: relative !important;
  overflow: hidden !important;
  padding: 20px 22px !important;
  border-radius: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-height: 126px !important;
}

html body .client-portal-stats article::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3.5px !important;
  background: linear-gradient(90deg, #1D49E8 0%, #581CEB 55%, #10B981 100%) !important;
  opacity: 0.9 !important;
}

@media (max-width: 820px) {
  html body .client-portal-stats {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* 3. Right-Hand Liquid Glass Slidebar Drawer (Client Chat, User & Admin Drawers - image_266fb8.png) */
html body .client-message-drawer-backdrop,
html body .message-drawer-backdrop,
html body .rui-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  background: rgba(8, 8, 11, 0.42) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  z-index: 99980 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

html body .client-message-drawer-backdrop[hidden],
html body .message-drawer-backdrop[hidden],
html body .rui-drawer-backdrop[hidden] {
  display: none !important;
}

html body .client-message-drawer-panel,
html body .message-drawer-panel,
html body .rui-drawer-panel {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(500px, 100vw) !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 24px 0 0 24px !important;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.90) 0%, rgba(244, 247, 255, 0.80) 55%, rgba(235, 240, 255, 0.74) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.96) !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  box-shadow:
    -24px 0 64px -12px rgba(8, 8, 11, 0.24),
    -4px 0 20px rgba(29, 73, 232, 0.10),
    inset 1.5px 0 0 rgba(255, 255, 255, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  overflow: hidden !important;
  z-index: 99985 !important;
  transform: translateX(0) !important;
  animation: retraakRightDrawerSlideIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

html body .rui-drawer-panel {
  width: min(920px, 100vw) !important;
}

@keyframes retraakRightDrawerSlideIn {
  from {
    opacity: 0.4;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  html body .client-message-drawer-panel,
  html body .message-drawer-panel,
  html body .rui-drawer-panel {
    width: min(94vw, 440px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 22px 0 0 22px !important;
  }
}

html body .client-message-drawer-head,
html body .rui-drawer-head {
  padding: 18px 20px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-bottom: 1px solid rgba(29, 73, 232, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

html body .client-message-thread {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding: 18px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  background:
    radial-gradient(at 15% 15%, rgba(29, 73, 232, 0.06) 0px, transparent 50%),
    radial-gradient(at 85% 80%, rgba(88, 28, 235, 0.06) 0px, transparent 50%) !important;
}

html body .client-message-empty-card {
  margin: auto 0 !important;
  padding: 24px 20px !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(244, 247, 255, 0.72) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 14px 34px -10px rgba(29, 73, 232, 0.12), inset 0 1px 0 #FFFFFF !important;
  text-align: center !important;
}

html body .cm-starter-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

html body .cm-starter-chip {
  padding: 9px 16px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body .cm-starter-chip:hover {
  background: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #0F131E !important;
  
  box-shadow: 0 6px 14px rgba(15, 19, 30, 0.16) !important;
}

html body .client-message-form {
  flex-shrink: 0 !important;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border-top: 1px solid rgba(29, 73, 232, 0.12) !important;
  margin: 0 !important;
}

/* 4. Admin Panel Top 3 / 4 KPI Cards Glassmorphism & Responsiveness */
html body.admin-shell .admin-content :is(
  .retraak-top-3-glass-grid,
  .admin-orders-stats,
  .registry-kpis,
  .crm-kpi-grid,
  .card-grid.cols-3
) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  margin-bottom: 20px !important;
  box-sizing: border-box !important;
}

html body.admin-shell .admin-content :is(.user-summary, .card-grid.cols-4) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  margin-bottom: 18px !important;
}

html body.admin-shell .admin-content .user-summary .card {
  min-height: 92px !important;
  height: auto !important;
  padding: 16px 18px !important;
  border-radius: 18px !important;
  position: relative !important;
  overflow: hidden !important;
}

html body.admin-shell .admin-content .user-summary .card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #1D49E8, #581CEB, #10B981) !important;
}

@media (max-width: 980px) {
  html body.admin-shell .admin-content :is(
    .retraak-top-3-glass-grid,
    .admin-orders-stats,
    .registry-kpis,
    .crm-kpi-grid,
    .card-grid.cols-3,
    .user-summary,
    .card-grid.cols-4
  ) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 600px) {
  html body.admin-shell .admin-content :is(
    .retraak-top-3-glass-grid,
    .admin-orders-stats,
    .registry-kpis,
    .crm-kpi-grid,
    .card-grid.cols-3,
    .user-summary,
    .card-grid.cols-4,
    .pilot-kpis,
    .pilot-stat-row,
    .ai-kpis
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
}

/* 5. Admin & User Messages Responsiveness (.mx-inbox, .message-inbox-layout) */
html body .mx-inbox {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.80) 0%, rgba(244, 247, 255, 0.60) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.10), inset 0 1.5px 0 #FFFFFF !important;
  border-radius: 22px !important;
}

@media (max-width: 960px) {
  html body .mx-inbox {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  html body .mx-nav {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  html body .mx-list {
    border-right: 0 !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
    max-height: 360px !important;
    overflow-y: auto !important;
  }
  html body .mx-reader {
    min-height: 380px !important;
    width: 100% !important;
  }
  html body .message-inbox-layout,
  html body .messages-split-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
}


/* ==========================================================================
   ROUND 7 MASTER OVERRIDES:
   1. Fixed-Bottom Floating Bulk Action Bar (.bulk-action-bar, .rt-fixed-bottom-bulk-bar)
   2. Continuous Unbroken Table Row Borders (.rt-continuous-table, .admin-orders-list)
   3. Universal Card Glassmorphism (Including .fx-card, .fx-kpi, .pilot-stat, .invoice-card-wrapper)
      with Crisp White Inner Inputs & Subcards
   4. Pricing Cards Selection, Centered Badges, No Heavy Top Outline, Non-Overlapping Checkmarks
   ========================================================================== */

/* 1. Fixed-Bottom Floating Bulk Action Bar (Slides up from bottom of viewport - no scrolling needed) */
html body #bulk-action-bar,
html body .bulk-action-bar,
html body .rt-fixed-bottom-bulk-bar {
  position: fixed !important;
  bottom: 26px !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  transform: translateX(-50%) translateY(16px) !important;
  z-index: 99990 !important;
  width: auto !important;
  max-width: calc(100vw - 28px) !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(11, 15, 28, 0.94) 0%, rgba(24, 43, 159, 0.90) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 22px 50px -8px rgba(8, 8, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease !important;
}

html body #bulk-action-bar.is-visible,
html body .bulk-action-bar.is-visible,
html body #bulk-action-bar[style*="flex"],
html body .bulk-action-bar[style*="flex"] {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
}

html body .bulk-action-bar .bulk-bar-inner {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

html body .bulk-action-bar .bulk-count {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #FFFFFF !important;
  padding: 0 8px 0 4px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.22) !important;
  white-space: nowrap !important;
}

/* 2. Continuous Unbroken Table Row Borders Across Admin & Workspace Tables */
html body .admin-orders-list table,
html body .rt-continuous-table,
html body .admin-shell .table-responsive > table,
html body .workspace-shell .table-responsive > table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

html body .admin-orders-list table tbody tr,
html body .rt-continuous-table tbody tr {
  border-bottom: 1px solid rgba(226, 232, 240, 0.88) !important;
}

html body .admin-orders-list table tbody tr:last-child,
html body .rt-continuous-table tbody tr:last-child {
  border-bottom: 0 !important;
}

html body .admin-orders-list table th,
html body .admin-orders-list table td,
html body .rt-continuous-table th,
html body .rt-continuous-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.88) !important;
  vertical-align: middle !important;
}

html body .admin-orders-list table tbody tr:last-child td,
html body .rt-continuous-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* 3. Universal Card Glassmorphism for Feature Cards, KPI Tiles, Invoice Cards & Modals */
html body :is(
  .fx-card,
  .fx-kpi,
  .pilot-stat,
  .invoice-card-wrapper,
  .futuristic-card,
  .hero-mini-card,
  .workflow-step-card,
  .faq-item,
  .contact-card,
  .modal-card,
  .rui-confirm-card,
  .admin-edit-dialog-card
) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(244, 247, 255, 0.62) 54%, rgba(235, 240, 255, 0.50) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow:
    0 20px 46px -12px rgba(15, 23, 42, 0.10),
    0 4px 16px -2px rgba(29, 73, 232, 0.07),
    inset 0 1.5px 0 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 0 rgba(29, 73, 232, 0.09) !important;
}

/* Inner inputs, miniature invoice previews, and nested boxes inside glass cards stay crisp white with high-contrast ink */
html body :is(.card, .fx-card, .modal-card, .admin-edit-dialog-card) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
  select,
  textarea:not(#template-code-box):not(#edit-tpl-code):not(.mx-code-input):not([data-dark-editor]),
  .invoice-tpl-mini-card,
  .sc-scorecard
) {
  background-color: #FFFFFF !important;
  color: #0F131E !important;
}

/* Dark Code Editors inside Invoice Studio & Email Templates: High-Contrast Slate & Luminous Code Text */
html body textarea#template-code-box,
html body textarea#edit-tpl-code,
html body textarea.mx-code-input,
html body textarea[data-dark-editor] {
  background-color: #0F172A !important;
  color: #F8FAFC !important;
  caret-color: #38BDF8 !important;
  border: 1.5px solid #334155 !important;
}

/* 4. Billing & Landing Pricing Cards Clean Feature List & Badge Alignment */
html body .price-card .price-badge {
  position: absolute !important;
  top: -14px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  height: 28px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.07em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18) !important;
}

html body .price-card {
  border-top: 1.5px solid rgba(255, 255, 255, 0.95) !important;
  outline: none !important;
}

html body .price-card ul li,
html body .price-card .pricing-features-list li {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}


/* ==========================================================================
   ROUND 8 FINAL POLISH:
   1. Custom Slim Overlay Scrollbars Inside Website & Dashboards
   2. Vibrant Multi-Tone Atmospheric Mesh Backgrounds (Admin, User, Showcase, Site)
   3. Bright Luminous White-Crystal Apple Liquid Glass Cards (Never Dark/Dull)
   4. High-Contrast "Most Popular" (Pro) Pricing Card on Landing Page & Billing
   5. Flat, Clean User Left Sidebar Profile Footer Matching Top Brand Card
   ========================================================================== */

html {
  overflow-x: clip !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(29, 73, 232, 0.48) transparent !important;
}

::-webkit-scrollbar {
  width: 7px !important;
  height: 7px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(29, 73, 232, 0.52) 0%, rgba(88, 28, 235, 0.52) 100%) !important;
  border-radius: 999px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #1D49E8 0%, #581CEB 100%) !important;
}

/* Vibrant Multi-Tone Mesh Background for Admin, User Workspace & Client Portal */
html body.admin-shell,
html body.workspace-shell,
html body.app-shell,
html body.client-portal-body {
  background-color: #EBF0FE !important;
  background-image:
    radial-gradient(at 4% 6%, rgba(29, 73, 232, 0.28) 0px, transparent 44%),
    radial-gradient(at 96% 10%, rgba(88, 28, 235, 0.25) 0px, transparent 46%),
    radial-gradient(at 52% 38%, rgba(6, 182, 212, 0.15) 0px, transparent 52%),
    radial-gradient(at 12% 88%, rgba(16, 185, 129, 0.18) 0px, transparent 46%),
    radial-gradient(at 90% 88%, rgba(29, 73, 232, 0.24) 0px, transparent 48%),
    linear-gradient(135deg, #EEF2FF 0%, #E6ECFE 50%, #EDF2FF 100%) !important;
  background-attachment: scroll !important;
}

html body.admin-shell .app-main,
html body.admin-shell .admin-content,
html body.workspace-shell .app-main,
html body.workspace-shell .app-content {
  background: transparent !important;
}

/* Bright Luminous White-Crystal Apple Liquid Glass for All Admin & User Cards */
html body :is(
  .card:not(.dash-welcome):not(.pilot-hero):not(.pay-style-plan.highlight):not(.price-card.highlight),
  section.card:not(.dash-welcome):not(.pilot-hero),
  article.card:not(.dash-welcome):not(.pilot-hero):not(.price-card.highlight),
  .users-table-card,
  .users-supabase-card,
  .outreach-card,
  .outreach-preview,
  .settings-invoice-controls,
  .settings-invoice-preview,
  .fx-card,
  .client-portal-stats article,
  .client-stat-glass-card,
  .velocity-metric-card,
  .registry-kpi,
  .crm-kpi-card,
  .pilot-kpi,
  .dashboard-kpi,
  .metric-checkable-card,
  .user-summary .card,
  .workspace-detail-glass-card,
  .admin-user-profile-card,
  .showcase-hero-card,
  .showcase-stat-card,
  .showcase-review-card,
  .showcase-form-card
) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 255, 0.76) 55%, rgba(240, 245, 255, 0.68) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 20px 46px -14px rgba(15, 23, 42, 0.09),
    0 4px 16px -2px rgba(29, 73, 232, 0.07),
    inset 0 1.5px 0 0 #FFFFFF,
    inset 0 -1px 0 0 rgba(29, 73, 232, 0.10) !important;
}

/* Pro / Most Popular Pricing Card: Luminous Sapphire Glass + Crisp Dark Text */
html body .price-card.highlight,
html body article.card.price-card.highlight {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 240, 255, 0.88) 55%, rgba(219, 232, 255, 0.80) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 2px solid rgba(29, 73, 232, 0.55) !important;
  color: #0F131E !important;
  box-shadow:
    0 28px 60px -14px rgba(29, 73, 232, 0.22),
    0 8px 24px -6px rgba(29, 73, 232, 0.14),
    inset 0 2px 0 0 #FFFFFF !important;
}

html body .price-card.highlight h3,
html body .price-card.highlight .rt-feature-text,
html body .price-card.highlight ul li {
  color: #0F131E !important;
}

html body .price-card.highlight .price,
html body .price-card.highlight .price-currency {
  color: #1D49E8 !important;
}

html body .price-card.highlight .muted,
html body .price-card.highlight .price-period {
  color: #475569 !important;
}

/* User Left Sidebar Profile Footer: Flat & Clean Like Top .user-brand-box */
html body .user-sidebar-footer-v2 {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(226, 232, 240, 0.92) !important;
  box-shadow: none !important;
  border-radius: 14px !important;
  padding: 8px 12px !important;
  transform: none !important;
}

html body .user-sidebar-footer-v2:hover,
html body .user-sidebar-footer-v2 .user-sidebar-profile:hover {
  
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.95) !important;
}


/* === ROUND 9: SUBTLE MULTI-HUE MESH BACKGROUNDS (ADMIN, USER, AUTH, LANDING) & PRICING PILL/CHECK FIX === */
html body.admin-shell {
  background-color: #DCE3F4 !important;
  background-image:
    radial-gradient(at 8% 10%, rgba(29, 73, 232, 0.20) 0px, transparent 46%),
    radial-gradient(at 90% 12%, rgba(139, 92, 246, 0.19) 0px, transparent 46%),
    radial-gradient(at 85% 86%, rgba(236, 72, 153, 0.11) 0px, transparent 48%),
    radial-gradient(at 15% 86%, rgba(16, 185, 129, 0.12) 0px, transparent 48%),
    radial-gradient(at 52% 48%, rgba(14, 165, 233, 0.10) 0px, transparent 52%),
    linear-gradient(135deg, #E2E8F7 0%, #DCE3F5 48%, #E5E1F6 100%) !important;
  background-attachment: scroll !important;
}

html body.workspace-shell,
html body.app-shell {
  background-color: #DCE3F4 !important;
  background-image:
    radial-gradient(at 6% 8%, rgba(29, 73, 232, 0.20) 0px, transparent 46%),
    radial-gradient(at 92% 10%, rgba(139, 92, 246, 0.19) 0px, transparent 46%),
    radial-gradient(at 84% 86%, rgba(236, 72, 153, 0.12) 0px, transparent 48%),
    radial-gradient(at 14% 88%, rgba(16, 185, 129, 0.13) 0px, transparent 48%),
    radial-gradient(at 50% 48%, rgba(14, 165, 233, 0.11) 0px, transparent 52%),
    linear-gradient(135deg, #E2E8F7 0%, #DCE3F5 48%, #E5E1F6 100%) !important;
  background-attachment: scroll !important;
}

/* Auth / Login / Signup Pages: Subtle Multi-Hue Mesh & Frosted Liquid Glass Card */
html body.auth-page,
html body.login-page,
html body:has(.auth-screen),
html body:has(.auth-card),
.auth-screen,
.auth-wrapper {
  background-color: #DCE3F4 !important;
  background-image:
    radial-gradient(at 12% 14%, rgba(29, 73, 232, 0.20) 0px, transparent 48%),
    radial-gradient(at 88% 16%, rgba(139, 92, 246, 0.19) 0px, transparent 48%),
    radial-gradient(at 82% 84%, rgba(236, 72, 153, 0.13) 0px, transparent 48%),
    radial-gradient(at 16% 84%, rgba(16, 185, 129, 0.13) 0px, transparent 48%),
    linear-gradient(135deg, #E2E8F7 0%, #DCE3F5 50%, #E5E1F6 100%) !important;
  background-attachment: scroll !important;
}

html body :is(.auth-card, .login-card, .signup-card, .auth-box, .auth-panel, .auth-form-card) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84) 0%, rgba(246, 249, 255, 0.72) 55%, rgba(238, 243, 255, 0.62) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 28px 64px -16px rgba(15, 23, 42, 0.14),
    0 6px 20px -4px rgba(29, 73, 232, 0.09),
    inset 0 1.5px 0 0 #FFFFFF,
    inset 0 -1px 0 0 rgba(29, 73, 232, 0.12) !important;
}

/* Pricing Card Checkmarks & Trial Pill Contrast Override (Fixes image_340094.png) */
html body .price-card ul.rt-clean-feature-list > li.rt-clean-feature-item > .rt-check-badge svg,
html body .price-card.highlight ul.rt-clean-feature-list > li.rt-clean-feature-item > .rt-check-badge svg,
html body .price-card.highlight.card .pricing-features-list .rt-check-badge svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

html body .price-card.highlight .pricing-trial-note,
html body .price-card.highlight .pricing-trial-note .rt-trial-note-text {
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
}

html body .price-card.highlight .pricing-trial-note .rt-trial-note-sub,
html body .price-card.highlight .pricing-trial-note span {
  color: #1E3A8A !important;
  -webkit-text-fill-color: #1E3A8A !important;
  opacity: 1 !important;
}


/* ==========================================================================
   ROUND 10 SPECIFICATION:
   1. Butter-Smooth High-Refresh-Rate Scrolling (Sticky & Modal Safe)
   2. Futuristic Custom Checkboxes Across Entire Platform
   3. Clean Black (#0F131E) Modal/Popup Close (×) Buttons with Smooth Hover Motion
   4. Top-Docked Bulk Action Bar (No Redundant Bottom Floating Bar)
   5. Invoice Studio Contrast & Strict A4 Multi-Page Preview Stage
   ========================================================================== */

/* 1. Smooth Scrolling & Sticky Element Preservation */
html, body {
  scroll-behavior: auto !important;
}

/* Ensure no ancestor transform or overflow:hidden traps position:sticky headers/sidebars */
html body.admin-shell .app-main,
html body.workspace-shell .app-main,
html body.admin-shell .admin-content,
html body.workspace-shell .app-content {
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}

/* 2. Futuristic Custom Selection Checkboxes Across Entire Platform */
html body input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 6px !important;
  border: 1.5px solid #94A3B8 !important;
  background-color: rgba(255, 255, 255, 0.92) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px 12px !important;
  cursor: pointer !important;
  display: inline-grid !important;
  place-content: center !important;
  vertical-align: middle !important;
  position: relative !important;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06), inset 0 1px 0 #FFFFFF !important;
  transition:
    background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.16s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body input[type="checkbox"]:hover:not(:disabled) {
  border-color: #1D49E8 !important;
  background-color: #F8FAFF !important;
  box-shadow: 0 0 0 3px rgba(29, 73, 232, 0.14), 0 2px 6px rgba(29, 73, 232, 0.12) !important;
  
}

html body input[type="checkbox"]:focus-visible {
  outline: none !important;
  border-color: #1D49E8 !important;
  box-shadow: 0 0 0 3.5px rgba(29, 73, 232, 0.24) !important;
}

html body input[type="checkbox"]:checked {
  background-color: #0F131E !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.2 8.4 6.6 11.8 12.8 4.4'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #0F131E 0%, #1D49E8 100%) !important;
  border-color: #1D49E8 !important;
  box-shadow: 0 4px 12px rgba(29, 73, 232, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  transform: scale(1.02) !important;
}

html body input[type="checkbox"]:indeterminate {
  background-color: #1D49E8 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FFFFFF' stroke-width='2.6' stroke-linecap='round'%3E%3Cline x1='3.5' y1='8' x2='12.5' y2='8'/%3E%3C/svg%3E") !important;
  border-color: #1D49E8 !important;
  box-shadow: 0 4px 12px rgba(29, 73, 232, 0.28) !important;
}

html body input[type="checkbox"]:disabled {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* 3. Clean Black (#0F131E) Modal/Popup Close (×) Buttons with Smooth Hover Animation */
html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .critical-delete-close,
  .rui-confirm-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn)
) {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(15, 19, 30, 0.12) !important;
  background: rgba(15, 19, 30, 0.05) !important;
  color: #0F131E !important;
  display: inline-grid !important;
  place-items: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition:
    background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease !important;
}

html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .critical-delete-close,
  .rui-confirm-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn)
) svg {
  color: inherit !important;
  stroke: currentColor !important;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .critical-delete-close,
  .rui-confirm-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn)
):hover {
  background: #0F131E !important;
  color: #FFFFFF !important;
  border-color: #0F131E !important;
  
  box-shadow: 0 6px 16px rgba(15, 19, 30, 0.22) !important;
}

html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .critical-delete-close,
  .rui-confirm-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn)
):hover svg {
  
}

/* 4. Top-Bar Bulk Action Bar (Replaces Redundant Bottom Floating Bar) */
html body .rt-fixed-bottom-bulk-bar {
  display: none !important;
}

html body #bulk-action-bar,
html body .bulk-action-bar {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 10 !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border-radius: 12px !important;
  background: rgba(15, 19, 30, 0.94) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 8px 22px -6px rgba(15, 23, 42, 0.22) !important;
}

html body .bulk-action-bar .bulk-bar-inner {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

/* 5. Invoice Templates & Split-Screen Studio Contrast Fixes */
html body .template-nav-scroll a.btn-secondary,
html body .invoice-preview-switcher .preview-tab-btn:not(.active):not(.btn-primary) {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0F131E !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  font-weight: 700 !important;
}

html body .template-nav-scroll a.btn-primary,
html body .invoice-preview-switcher .preview-tab-btn.active,
html body .invoice-preview-switcher .preview-tab-btn.btn-primary {
  background: linear-gradient(135deg, #0F131E 0%, #1D49E8 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(29, 73, 232, 0.55) !important;
  font-weight: 800 !important;
}


/* ==========================================================================
   ROUND 11 MASTER FIXES:
   1. Clean Transparent Popup Close (×) Icon (Never a blank/black square box)
   2. Calm Checkbox Hover (No blue halo ring or scale jump on hover)
   3. Global Tab & Filter Bar Pill Consistency (All tabs share border-radius: 9999px)
   4. Contract & SOW Action Buttons Padding, Background & Rounded Corners
   5. CRM Delivery Logs Empty State Centered Alignment
   ========================================================================== */

/* 1. Popup / Modal / Drawer Close (×) Button: Crisp visible × cross with NO box background */
html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross]
) {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 9999px !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  display: inline-grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease !important;
}

html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross]
) > * {
  display: none !important;
  opacity: 0 !important;
}

html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross]
):hover {
  background: transparent !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23991B1B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  border: 0 !important;
  box-shadow: none !important;
  
}

/* 2. Checkbox Hover: Clean & Calm (No outer halo ring or scale jump on hover) */
html body input[type="checkbox"]:hover:not(:disabled):not(:checked) {
  border-color: #64748B !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  
}

html body input[type="checkbox"]:checked:hover:not(:disabled) {
  background-color: #0F131E !important;
  border-color: #1D49E8 !important;
  box-shadow: 0 2px 6px rgba(29, 73, 232, 0.24) !important;
  
}

/* 3. Global Tab Bars & Filter Buttons: Uniform Pill Border-Radius (Fixes rounded-square vs pill mismatch) */
html body :is(.contact-tabs, .pilot-tabs, .pilot-segmented, .int-tabs, .mx-tabs, .registry-tabs, .fx-tabs) :is(a, button, .btn, .btn-sm, .btn-xs) {
  border-radius: 9999px !important;
}

html body :is(.contact-tabs, .pilot-tabs, .pilot-segmented, .int-tabs, .mx-tabs, .registry-tabs, .fx-tabs) :is(a, button):not(.active):not(.is-active):not([aria-current="page"]):not(.btn-primary) {
  border-radius: 9999px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
}

html body :is(.contact-tabs, .pilot-tabs, .pilot-segmented, .int-tabs, .mx-tabs, .registry-tabs, .fx-tabs) :is(a, button):not(.active):not(.is-active):not([aria-current="page"]):not(.btn-primary):hover {
  border-radius: 9999px !important;
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0F131E !important;
}

html body :is(.contact-tabs, .pilot-tabs, .pilot-segmented, .int-tabs, .mx-tabs, .registry-tabs, .fx-tabs) :is(a.active, a.is-active, a[aria-current="page"], a.btn-primary, button.active, button.is-active, button.btn-primary) {
  border-radius: 9999px !important;
  background: #0F131E !important;
  color: #FFFFFF !important;
  border-color: #0F131E !important;
}

/* Standard action buttons (.btn, .btn-sm, .btn-xs) outside tab bars share consistent 10px radius */
html body :is(.btn, .btn-sm, .btn-xs):not(.pill):not(.rounded-full):not(.contact-tabs *):not(.pilot-tabs *):not(.fx-tabs *):not(.registry-tabs *) {
  border-radius: 10px !important;
}

/* 4. Contract, SOW & NDA Top & Preview Action Buttons: Proper Padding, Background & Rounded Corners */
html body .contract-preview-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  padding-bottom: 14px !important;
  margin-bottom: 18px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
}

html body .contract-preview-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

html body .contract-preview-actions .btn,
html body .page-heading-row .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 38px !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

html body .contract-preview-actions .btn-secondary,
html body .page-heading-row .btn-secondary {
  background: #FFFFFF !important;
  color: #0F131E !important;
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

html body .contract-preview-actions .btn-secondary:hover,
html body .page-heading-row .btn-secondary:hover {
  background: #F8FAFC !important;
  border-color: #1D49E8 !important;
  color: #1D49E8 !important;
}

/* 5. Lead Row Delete Button & CRM Delivery Logs Empty State Text Alignment */
html body .lead-delete-btn {
  width: auto !important;
  min-width: 64px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  background: rgba(220, 38, 38, 0.08) !important;
  background-image: none !important;
  border: 1px solid rgba(220, 38, 38, 0.28) !important;
  color: #DC2626 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

html body .lead-delete-btn:hover {
  background: #DC2626 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  
}

html body #crm-delivery-logs-section div[style*="text-align:center"] p,
html body #crm-delivery-logs-section div[style*="text-align: center"] p {
  margin: 4px auto 0 !important;
  text-align: center !important;
  max-width: 560px !important;
}



/* ==========================================================================
   ROUND 12 MASTER OVERRIDES:
   1. Zero Hover Background on All Cross (×) & Notification Dismiss Buttons
   2. Strict Button Size Consistency (.btn-xs = 28px, .btn-sm = 34px, .btn = 38px)
   3. Invoice Footer Pinned to Bottom of Sheet ("On the Footer")
   ========================================================================== */

/* 1. Notification Dismiss (×) & All Cross Buttons: Red (#EF4444) -> Deep Red (#991B1B), ZERO Background Ever */
html body :is(
  .notif-entry .notif-dismiss-button,
  .notif-entry button[data-notif-dismiss],
  .toast-stack .toast .toast-close
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #EF4444 !important;
  opacity: 0.9 !important;
  border-radius: 0 !important;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease, opacity 0.18s ease !important;
}

html body :is(
  .notif-entry .notif-dismiss-button,
  .notif-entry button[data-notif-dismiss],
  .toast-stack .toast .toast-close
) svg {
  color: inherit !important;
  stroke: currentColor !important;
}

html body :is(
  .notif-entry .notif-dismiss-button,
  .notif-entry button[data-notif-dismiss],
  .toast-stack .toast .toast-close
):is(:hover, :focus, :focus-visible, :active) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #991B1B !important;
  opacity: 1 !important;
  
}

/* 2. Global Button Size Consistency (Beats any .app-main .btn-ghost specificity chain) */
html body :is(.btn-xs, a.btn-xs, button.btn-xs, .app-main .btn-xs, .admin-shell .btn-xs, .workspace-shell .btn-xs):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not(.contact-tabs *):not(.pilot-tabs *) {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  min-width: 0 !important;
  padding: 0 11px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}

html body :is(.lead-delete-btn, .app-main .btn-xs.btn-ghost.lead-delete-btn, .admin-shell .btn-xs.btn-ghost.lead-delete-btn, .pilot-single-lead-del-form .lead-delete-btn):not(.topbar-icon):not(.menu-toggle) {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 11px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  background: rgba(220, 38, 38, 0.08) !important;
  background-image: none !important;
  border: 1px solid rgba(220, 38, 38, 0.28) !important;
  color: #DC2626 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
}

html body :is(.lead-delete-btn, .app-main .btn-xs.btn-ghost.lead-delete-btn, .admin-shell .btn-xs.btn-ghost.lead-delete-btn, .pilot-single-lead-del-form .lead-delete-btn):not(.topbar-icon):not(.menu-toggle):hover {
  background: #DC2626 !important;
  background-image: none !important;
  border-color: #DC2626 !important;
  color: #FFFFFF !important;
  
}

html body :is(.btn-sm, a.btn-sm, button.btn-sm, .app-main .btn-sm, .admin-shell .btn-sm, .workspace-shell .btn-sm):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not(.contact-tabs *):not(.pilot-tabs *):not(.fx-tabs *):not(.registry-tabs *) {
  min-height: 34px !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}

/* 3. Invoice Footer Pinned to Bottom of Sheet ("On the Footer") */
html body .retraak-a4-sheet {
  display: flex !important;
  flex-direction: column !important;
}
html body .retraak-a4-sheet > div {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 297mm !important;
}
html body .retraak-a4-sheet > div > div:last-child {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
}
html body .retraak-a4-sheet .inv-footer,
html body .inv-footer {
  margin-top: auto !important;
  padding-top: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}


/* Unified Main-Window Scroll Architecture (Prevents nested scroll traps in Admin & Tables) */
@media (min-width: 961px) {
  html body.admin-shell {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  html body.admin-shell > .app-main {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
  }
}
html body :is(.table-wrap, .table-responsive, .pilot-table-scroll) {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

/* ==========================================================================
   RETRAAK V25 MASTER UI POLISH:
   1. ALL Delete Buttons = Exact Lead Delete Button Style
   2. ALL Cross (×) Buttons = Exact Lead Delete Button Style with "×"
   3. Zero Text-Only / Hover-Only Buttons Globally
   4. Admin Contact Inbox Right Card & Equal Height Alignment
   5. User Client Messages Full Width Layout
   6. Platform Settings Top 4 Cards Zero Blank Space
   ========================================================================== */

/* 1. Standard Non-Danger Buttons: Always Visible Background & Border (Never plain text until hover) */
html body .btn:not(.btn-primary):not(.btn-brand):not(.btn-danger):not(.btn-success):not(.lead-delete-btn):not(.delete-btn):not(.topbar-icon):not(.menu-toggle):not(.nav-cta):not([role="tab"]):not(.side-plan-primary-btn):not(.side-plan-secondary-btn),
html body .btn-secondary:not(.btn-danger):not(.lead-delete-btn):not([role="tab"]),
html body .btn-ghost:not(.btn-danger):not(.lead-delete-btn):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not([role="tab"]):not(.filter-tab):not(.tab-btn),
html body .btn-outline:not(.btn-danger):not(.lead-delete-btn):not([role="tab"]) {
  background: #FFFFFF !important;
  color: #0F131E !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 1px 2px rgba(15, 19, 30, 0.05) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

html body .btn:not(.btn-primary):not(.btn-brand):not(.btn-danger):not(.btn-success):not(.lead-delete-btn):not(.delete-btn):not(.topbar-icon):not(.menu-toggle):not(.nav-cta):not([role="tab"]):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):hover,
html body .btn-secondary:not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):hover,
html body .btn-ghost:not(.btn-danger):not(.lead-delete-btn):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not([role="tab"]):not(.filter-tab):not(.tab-btn):hover,
html body .btn-outline:not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):hover {
  background: #F1F5F9 !important;
  color: #1D49E8 !important;
  border-color: rgba(29, 73, 232, 0.38) !important;
  box-shadow: 0 4px 10px rgba(29, 73, 232, 0.08) !important;
  
}

/* Uniform Button Size Tiers */
html body .btn,
html body a.btn,
html body button.btn {
  border-radius: 10px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

html body .btn:not(.btn-xs):not(.btn-sm):not(.btn-lg):not(.topbar-icon):not(.menu-toggle) {
  min-height: 38px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
}

html body .btn.btn-sm:not(.btn-xs) {
  min-height: 32px !important;
  height: 32px !important;
  padding: 5px 12px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
}

html body .btn.btn-xs {
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

/* 2. ALL DELETE BUTTONS GLOBALLY = EXACT LEAD DELETE BUTTON STYLE */
html body .btn-danger,
html body .btn.btn-danger,
html body .btn-sm.btn-danger,
html body .btn-xs.btn-danger,
html body .lead-delete-btn:not(.avatar-remove-text-btn),
html body .delete-btn,
html body .btn-delete,
html body button[name="action"][value*="delete" i],
html body button[name="action"][value*="clear" i],
html body button[name="action"][value*="purge" i],
html body button[name="action"][value="empty_recycle_bin"],
html body button[data-confirm*="Delete" i],
html body button[data-confirm*="Remove" i],
html body button[data-confirm*="Clear" i],
html body button[data-confirm*="Purge" i],
html body a[data-confirm*="Delete" i],
html body .legacy-notif-clear-unused {
  background: rgba(220, 38, 38, 0.08) !important;
  color: #DC2626 !important;
  border: 1px solid rgba(220, 38, 38, 0.28) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease !important;
}

/* Compact sizing for table/row delete buttons to match Lead Delete button */
html body td .btn-danger,
html body td .lead-delete-btn:not(.avatar-remove-text-btn),
html body td .delete-btn,
html body td button[name="action"][value*="delete" i],
html body .lead-delete-btn:not(.avatar-remove-text-btn),
html body .btn-xs.btn-danger {
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  border-radius: 8px !important;
}

html body .btn-danger:hover,
html body .btn.btn-danger:hover,
html body .btn-sm.btn-danger:hover,
html body .btn-xs.btn-danger:hover,
html body .lead-delete-btn:hover,
html body .delete-btn:hover,
html body .btn-delete:hover,
html body button[name="action"][value*="delete" i]:hover,
html body button[name="action"][value*="clear" i]:hover,
html body button[name="action"][value*="purge" i]:hover,
html body button[name="action"][value="empty_recycle_bin"]:hover,
html body button[data-confirm*="Delete" i]:hover,
html body button[data-confirm*="Remove" i]:hover,
html body button[data-confirm*="Clear" i]:hover,
html body button[data-confirm*="Purge" i]:hover,
html body a[data-confirm*="Delete" i]:hover,
html body .legacy-notif-clear-unused:hover {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24) !important;
  
}

html body .btn-danger svg,
html body .lead-delete-btn svg,
html body .delete-btn svg,
html body button[name="action"][value*="delete" i] svg {
  stroke: currentColor !important;
}

/* 3. ALL CROSS (×) CLOSE & DISMISS BUTTONS = EXACT LEAD DELETE STYLE WITH "×" */
html body .dialog-close-btn,
html body .modal-close-btn,
html body .modal-close,
html body .modal-close-x,
html body .popup-close,
html body .rui-confirm-close,
html body .critical-delete-close,
html body .client-request-close,
html body .fx-dialog-close,
html body .checkout-modal-close,
html body .retraak-ai-close,
html body .message-drawer-close,
html body .client-message-drawer-close,
html body button[data-dialog-close]:not(.btn),
html body button[data-modal-close]:not(.btn),
html body #rt-v20-btn-close,
html body #rt-v25-cookie-close,
html body #rt-site-bar-dismiss {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 8px !important;
  border: 1px solid rgba(220, 38, 38, 0.28) !important;
  outline: none !important;
  box-shadow: none !important;
  background-color: rgba(220, 38, 38, 0.08) !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 28px !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23DC2626' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 14px 14px !important;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease !important;
}

html body .dialog-close-btn > *,
html body .modal-close-btn > *,
html body .modal-close > *,
html body .modal-close-x > *,
html body .popup-close > *,
html body .rui-confirm-close > *,
html body .critical-delete-close > *,
html body .client-request-close > *,
html body .fx-dialog-close > *,
html body .checkout-modal-close > *,
html body .retraak-ai-close > *,
html body .message-drawer-close > *,
html body .client-message-drawer-close > *,
html body button[data-dialog-close]:not(.btn) > *,
html body button[data-modal-close]:not(.btn) > *,
html body #rt-v20-btn-close > *,
html body #rt-v25-cookie-close > *,
html body #rt-site-bar-dismiss > * {
  display: none !important;
}

html body .dialog-close-btn:hover,
html body .modal-close-btn:hover,
html body .modal-close:hover,
html body .modal-close-x:hover,
html body .popup-close:hover,
html body .rui-confirm-close:hover,
html body .critical-delete-close:hover,
html body .client-request-close:hover,
html body .fx-dialog-close:hover,
html body .checkout-modal-close:hover,
html body .retraak-ai-close:hover,
html body .message-drawer-close:hover,
html body .client-message-drawer-close:hover,
html body button[data-dialog-close]:not(.btn):hover,
html body button[data-modal-close]:not(.btn):hover,
html body #rt-v20-btn-close:hover,
html body #rt-v25-cookie-close:hover,
html body #rt-site-bar-dismiss:hover {
  background-color: #DC2626 !important;
  border-color: #DC2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24) !important;
  
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
}

/* 4. ADMIN CONTACT INBOX (.mx-inbox on pilot/submissions.php) RIGHT CARD & ALIGNMENT FIX */
html body .mx-inbox:not(:has(.mx-reader)) {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

html body .mx-inbox > .mx-card,
html body .mx-inbox > .mx-card.mx-inbox-list {
  margin: 0 !important;
  margin-top: 0 !important;
  min-height: 520px !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

html body .mx-inbox > .mx-card .mx-empty {
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  flex: 1 1 auto !important;
  width: 100% !important;
}

@media (max-width: 980px) {
  html body .mx-inbox:not(:has(.mx-reader)) {
    grid-template-columns: 1fr !important;
  }
}

/* 5. USER CLIENT MESSAGES (app/messages.php) 100% FULL WIDTH */
html body .message-inbox-page,
html body .message-inbox-page:not(.is-drawer) {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 4px 0 28px !important;
  box-sizing: border-box !important;
}

html body .message-inbox-page .mx-inbox:has(.mx-reader) {
  width: 100% !important;
  max-width: 100% !important;
  min-height: calc(100vh - 210px) !important;
}

/* 6. CRM DELIVERY LOGS TABLE ALIGNMENT */
html body .crm-log-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

html body .crm-log-table th,
html body .crm-log-table td {
  vertical-align: middle !important;
  text-align: left !important;
  padding: 12px 14px !important;
  line-height: 1.4 !important;
}

html body .crm-log-table th:last-child,
html body .crm-log-table td:last-child {
  text-align: right !important;
  white-space: nowrap !important;
}

/* 7. UNIFIED COMPOSITOR SCROLL ROOT (ZERO DOUBLE-SCROLL, ZERO STUCK SCROLL) */
html:not(.is-scroll-locked):not(:has(dialog[open])) {
  overflow-x: clip !important;
  overflow-y: auto !important;
  scroll-behavior: auto !important;
  height: auto !important;
}

html:not(.is-scroll-locked) body:not(.message-drawer-open),
html:not(.is-scroll-locked) body.workspace-shell:not(.message-drawer-open),
html:not(.is-scroll-locked) body.admin-shell:not(.message-drawer-open) {
  overflow-x: clip !important;
  overflow-y: visible !important;
  height: auto !important;
  min-height: 100vh !important;
}

@media (min-width: 961px) {
  html body.workspace-shell > .app-main,
  html body.admin-shell > .app-main {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
  }
}

/* ==========================================================================
   RETRAAK V26 COMPREHENSIVE UI/UX POLISH:
   1. Seamless Unbroken Background Continuity Across All Page Lengths (image_6ec474.png)
   2. Client Messages / Inbox Translucent Liquid Glassmorphism (image_6ec455.png)
   3. SOW & NDA Preview Header Box Glassmorphism Integration (image_6ec438.png)
   4. Topbar "+ New project" (.btn-brand) & Hero Banner CTA High Contrast (image_6ec41e.png)
   ========================================================================== */

/* 1. SEAMLESS CONTINUOUS MULTI-HUE MESH BACKGROUND ON ROOT HTML & BODY (ZERO HORIZONTAL BANDS) */
html:has(body.admin-shell),
html:has(body.workspace-shell),
html:has(body.app-shell),
html:has(body.client-portal-body),
html:has(body.auth-page),
html body.admin-shell,
html body.workspace-shell,
html body.app-shell,
html body.client-portal-body,
html body.auth-page {
  background-color: #DCE3F4 !important;
  background-image:
    radial-gradient(at 6% 8%, rgba(29, 73, 232, 0.20) 0px, transparent 48%),
    radial-gradient(at 92% 10%, rgba(139, 92, 246, 0.19) 0px, transparent 48%),
    radial-gradient(at 84% 86%, rgba(236, 72, 153, 0.12) 0px, transparent 50%),
    radial-gradient(at 14% 88%, rgba(16, 185, 129, 0.13) 0px, transparent 50%),
    radial-gradient(at 50% 48%, rgba(14, 165, 233, 0.11) 0px, transparent 54%),
    linear-gradient(135deg, #E2E8F7 0%, #DCE3F5 48%, #E5E1F6 100%) !important;
  background-attachment: fixed !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  min-height: 100vh !important;
  height: auto !important;
}

html body.admin-shell > .app-main,
html body.admin-shell .admin-content,
html body.workspace-shell > .app-main,
html body.workspace-shell .app-content,
html body.app-shell > .app-main,
html body.app-shell .app-content {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  min-height: 100vh !important;
  height: auto !important;
  overflow: visible !important;
}

/* 2. CLIENT MESSAGES / INBOX LIQUID GLASSMORPHISM (Fixes flat white box in image_6ec455.png) */
html body .message-inbox-layout {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72) 0%, rgba(244, 247, 255, 0.54) 52%, rgba(235, 240, 255, 0.42) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.94) !important;
  border-radius: 22px !important;
  box-shadow:
    0 20px 48px -12px rgba(15, 23, 42, 0.10),
    0 4px 16px -2px rgba(29, 73, 232, 0.07),
    inset 0 1.5px 0 0 #FFFFFF,
    inset 0 -1px 0 0 rgba(29, 73, 232, 0.10) !important;
  min-height: calc(100vh - 210px) !important;
  overflow: hidden !important;
}

html body .message-conversation-list {
  background: rgba(255, 255, 255, 0.34) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 0 !important;
  border-right: 1px solid rgba(29, 73, 232, 0.14) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body .message-list-header {
  background: rgba(255, 255, 255, 0.38) !important;
  border-bottom: 1px solid rgba(29, 73, 232, 0.12) !important;
  padding: 16px 18px 12px !important;
}

html body .message-search-wrap input[type="search"] {
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid rgba(29, 73, 232, 0.16) !important;
  border-radius: 10px !important;
  color: #0F131E !important;
}

html body .message-inbox-card {
  background: transparent !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body .message-thread-heading {
  background: rgba(255, 255, 255, 0.36) !important;
  border-bottom: 1px solid rgba(29, 73, 232, 0.12) !important;
  padding: 16px 22px !important;
}

html body .message-reply-form {
  background: rgba(255, 255, 255, 0.42) !important;
  border-top: 1px solid rgba(29, 73, 232, 0.12) !important;
  padding: 16px 22px !important;
}

html body .message-empty-state .message-empty-icon,
html body .message-list-empty .message-list-empty-icon {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(235, 240, 255, 0.78)) !important;
  border: 1px solid rgba(29, 73, 232, 0.2) !important;
  color: #1D49E8 !important;
  box-shadow: 0 8px 20px rgba(29, 73, 232, 0.1) !important;
}

/* 3. SOW & NDA TOP PREVIEW ACTION BOX SEAMLESS GLASS INTEGRATION (Fixes image_6ec438.png) */
html body .document-preview-card {
  position: sticky !important;
  top: 86px !important;
  padding: 22px 24px !important;
  overflow: visible !important;
}

html body .contract-preview-topbar,
html body .document-preview-card .contract-preview-topbar,
html body #contract-preview-card .contract-preview-topbar,
html body #sow-preview-card .contract-preview-topbar {
  position: static !important;
  top: auto !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  box-shadow: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(29, 73, 232, 0.15) !important;
  border-radius: 0 !important;
  padding: 0 0 16px 0 !important;
  margin: 0 0 18px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

html body .retraak-legal-a4-stage {
  background: rgba(255, 255, 255, 0.36) !important;
  border: 1px solid rgba(29, 73, 232, 0.14) !important;
  border-radius: 16px !important;
  padding: 22px 16px !important;
}

/* 4. DASHBOARD & HEADER BUTTONS AUDIT (Fixes Topbar "+ New project" & Dark Hero Banner CTA in image_6ec41e.png) */
html body .btn-brand,
html body a.btn-brand,
html body button.btn-brand,
html body .app-topbar .topbar-right .btn-brand,
html body .app-topbar .topbar-right a.btn-brand {
  background: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.16) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  min-height: 36px !important;
  height: 36px !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-decoration: none !important;
}

html body .btn-brand :is(span, strong, small, svg),
html body a.btn-brand :is(span, strong, small, svg),
html body .app-topbar .topbar-right .btn-brand :is(span, strong, small, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: currentColor !important;
}

html body .btn-brand:hover,
html body a.btn-brand:hover,
html body .app-topbar .topbar-right .btn-brand:hover {
  background: #1D49E8 !important;
  border-color: #1D49E8 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(29, 73, 232, 0.28) !important;
  
}

/* Dark Hero Welcome Card (.dash-welcome) High-Contrast Pure White CTA & Frosted Ghost Pill */
html body .dash-welcome .welcome-actions .btn-primary,
html body .dash-welcome a.btn-primary,
html body .dash-welcome button.btn-primary {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body .dash-welcome .welcome-actions .btn-primary:hover,
html body .dash-welcome a.btn-primary:hover,
html body .dash-welcome button.btn-primary:hover {
  background: #F8FAFC !important;
  background-color: #F8FAFC !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #F8FAFC !important;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

html body .dash-welcome .welcome-actions .btn-ghost,
html body .dash-welcome .welcome-actions .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body .dash-welcome .welcome-actions .btn-ghost:hover,
html body .dash-welcome .welcome-actions .btn:not(.btn-primary):hover {
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* Admin Hero (.pilot-hero) High-Contrast Pure White CTA & Frosted Pill */
html body.admin-shell .pilot-hero-actions .btn-primary,
html body.admin-shell .pilot-hero .btn-primary,
html body.admin-shell .pilot-hero-actions a.btn-primary {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #0B0C12 !important;
  -webkit-text-fill-color: #0B0C12 !important;
  border: 1px solid #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25) !important;
  font-weight: 700 !important;
  padding: 9px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body.admin-shell .pilot-hero-actions .btn-primary:hover,
html body.admin-shell .pilot-hero .btn-primary:hover,
html body.admin-shell .pilot-hero-actions a.btn-primary:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  background-color: rgba(255, 255, 255, 0.92) !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.38) !important;
}

html body.admin-shell .pilot-hero-actions .btn:not(.btn-primary),
html body.admin-shell .pilot-hero .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  padding: 9px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body.admin-shell .pilot-hero-actions .btn:not(.btn-primary):hover,
html body.admin-shell .pilot-hero .btn:not(.btn-primary):hover {
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

@media (max-width: 680px) {
  html body .app-topbar .topbar-right .btn-brand span,
  html body .app-topbar .topbar-right .btn-primary span {
    display: none !important;
  }
  html body .app-topbar .topbar-right .btn-brand,
  html body .app-topbar .topbar-right .btn-primary {
    width: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }
}


/* ==========================================================================
   RETRAAK V28 MASTER OVERRIDES:
   1. Button Hover & Child Text / Pill Contrast Fixes (Fixes image_6c8a3a, image_6c89e5, image_6c8661, image_6c865b)
   2. Clean Borderless Neutral Close (×) Icons on All Modals/Popups/Drawers (Fixes image_6c73d4, image_6c7398)
   3. Global Delete Button Consistency Matching Lead Delete Pill (Fixes image_6c82fb)
   4. Smooth GPU-Accelerated Motion & Micro-Animations Across Landing, User & Admin
   ========================================================================== */

/* 1. SECONDARY / GHOST / OUTLINE BUTTON HOVER CONTRAST FIX (NEVER WHITE TEXT ON LIGHT HOVER) */
html body :is(
  .btn:not(.btn-primary):not(.btn-brand):not(.btn-danger):not(.btn-success):not(.lead-delete-btn):not(.delete-btn):not(.topbar-icon):not(.menu-toggle):not(.nav-cta):not([role="tab"]):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not([role="tab"]):not(.filter-tab):not(.tab-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-outline:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *)
):not(:disabled) {
  background: #FFFFFF !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  font-weight: 700 !important;
}

html body :is(
  .btn:not(.btn-primary):not(.btn-brand):not(.btn-danger):not(.btn-success):not(.lead-delete-btn):not(.delete-btn):not(.topbar-icon):not(.menu-toggle):not(.nav-cta):not([role="tab"]):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not([role="tab"]):not(.filter-tab):not(.tab-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-outline:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *)
):not(:disabled) :is(span, strong, small, svg):not(.pill) {
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  stroke: currentColor !important;
}

html body :is(
  .btn:not(.btn-primary):not(.btn-brand):not(.btn-danger):not(.btn-success):not(.lead-delete-btn):not(.delete-btn):not(.topbar-icon):not(.menu-toggle):not(.nav-cta):not([role="tab"]):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not([role="tab"]):not(.filter-tab):not(.tab-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-outline:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *)
):not(:disabled):is(:hover, :focus-visible, :active) {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border-color: #94A3B8 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
  
}

html body :is(
  .btn:not(.btn-primary):not(.btn-brand):not(.btn-danger):not(.btn-success):not(.lead-delete-btn):not(.delete-btn):not(.topbar-icon):not(.menu-toggle):not(.nav-cta):not([role="tab"]):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-secondary:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.topbar-icon):not(.menu-toggle):not(.demo-exit):not([role="tab"]):not(.filter-tab):not(.tab-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  a.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  button.btn-ghost:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.welcome-actions *):not(.pilot-hero-actions *),
  .btn-outline:not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not([role="tab"]):not(.welcome-actions *):not(.pilot-hero-actions *)
):not(:disabled):is(:hover, :focus-visible, :active) :is(span, strong, small, svg):not(.pill) {
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  stroke: currentColor !important;
}

/* Fix child .pill badges inside .btn-primary and .btn-secondary (Fixes image_6c8661 & image_6c865b) */
html body :is(.btn-primary, a.btn-primary, button.btn-primary, .btn-brand, a.btn-brand) .pill {
  background: rgba(255, 255, 255, 0.20) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

html body :is(.btn-secondary, a.btn-secondary, button.btn-secondary, .btn-ghost, a.btn-ghost, button.btn-ghost) .pill,
html body :is(.btn-secondary, a.btn-secondary, button.btn-secondary, .btn-ghost, a.btn-ghost, button.btn-ghost):is(:hover, :focus-visible, :active) .pill {
  background: #E2E8F0 !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
}

/* 2. CLEAN BORDERLESS NEUTRAL CLOSE (×) BUTTON ON ALL MODALS, POPUPS & DRAWERS (Fixes image_6c73d4 & image_6c7398) */
html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross],
  #rt-site-bar-dismiss
) {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 8px !important;
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F131E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 16px 16px !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 30px !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease !important;
}

html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross],
  #rt-site-bar-dismiss
) > * {
  display: none !important;
  opacity: 0 !important;
}

html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross],
  #rt-site-bar-dismiss
):is(:hover, :focus-visible, :active) {
  background-color: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23DC2626' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
}

/* 3. GLOBAL DELETE BUTTONS = EXACT LEAD DELETE PILL STYLE (Fixes image_6c82fb) */
html body :is(
  .btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .btn.btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .btn-sm.btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .btn-xs.btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .lead-delete-btn:not(.avatar-remove-text-btn),
  .delete-btn,
  .btn-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok),
  button[name="action"][value="empty_recycle_bin"],
  button[data-confirm*="Delete" i]:not(.rui-btn-ok),
  button[data-confirm*="Deleted" i]:not(.rui-btn-ok),
  button[data-confirm*="Remove" i]:not(.rui-btn-ok),
  button[data-confirm*="Clear" i]:not(.rui-btn-ok),
  button[data-confirm*="Purge" i]:not(.rui-btn-ok),
  a[data-confirm*="Delete" i],
  .legacy-notif-clear-unused
) {
  background: #FEE2E2 !important;
  background-image: none !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  border: 1px solid #FECACA !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease !important;
}

html body :is(
  .btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .lead-delete-btn:not(.avatar-remove-text-btn),
  .delete-btn,
  .btn-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok)
) :is(span, strong, small, svg) {
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  stroke: currentColor !important;
}

/* Table row & action group delete buttons match exact sibling button height (32px) */
html body :is(td, .fx-row-actions, .task-row-actions, .table-actions, .row-actions) :is(
  .btn-danger,
  .lead-delete-btn:not(.avatar-remove-text-btn),
  .delete-btn,
  .btn-delete,
  button[name="action"][value*="delete" i],
  button[name="action"][value*="remove" i]
) {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 13px !important;
  font-size: 12.5px !important;
  border-radius: 10px !important;
}

html body :is(
  .btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .btn.btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .btn-sm.btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .btn-xs.btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .lead-delete-btn:not(.avatar-remove-text-btn),
  .delete-btn,
  .btn-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok),
  button[name="action"][value="empty_recycle_bin"],
  button[data-confirm*="Delete" i]:not(.rui-btn-ok),
  button[data-confirm*="Deleted" i]:not(.rui-btn-ok),
  button[data-confirm*="Remove" i]:not(.rui-btn-ok),
  button[data-confirm*="Clear" i]:not(.rui-btn-ok),
  button[data-confirm*="Purge" i]:not(.rui-btn-ok),
  a[data-confirm*="Delete" i],
  .legacy-notif-clear-unused
):is(:hover, :focus-visible, :active) {
  background: #DC2626 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24) !important;
  
}

html body :is(
  .btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .lead-delete-btn:not(.avatar-remove-text-btn),
  .delete-btn,
  .btn-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok)
):is(:hover, :focus-visible, :active) :is(span, strong, small, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: currentColor !important;
}

/* Modal final confirmation button (.rui-btn-ok.btn-danger) stays solid red */
html body .rui-confirm .rui-btn-ok.btn-danger,
html body button[data-critical-confirm].btn-danger {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #DC2626 !important;
  border-radius: 10px !important;
  padding: 8px 18px !important;
  min-height: 38px !important;
  font-weight: 700 !important;
}

/* 4. SMOOTH GPU-ACCELERATED ENTRANCE & MICRO-ANIMATIONS (GLITCH-FREE) */
@keyframes rtHeroFloatCard {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
}

html body .retraak-motion-enter {
  opacity: 1 !important;
}

html body.site .hero-mini-card {
  animation: rtHeroFloatCard 5.5s ease-in-out infinite !important;
}

html body :is(.card, .price-card, .kpi, .pilot-kpi, .dashboard-kpi) {
  transition: box-shadow 0.18s ease, border-color 0.15s ease !important;
}


/* ==========================================================================
   RETRAAK V29 MASTER OVERRIDES:
   1. Zero Background Color Divide on User & Admin Panels (Fixes image_60acfa.png)
   2. Generous Bottom Spacing Under Every Last Card Across All Pages (Fixes image_60a918, image_60a5b7, image_60a5af)
   3. Fix 4x Tiled Close Icon on Hover (Fixes image_60b4bc.png)
   4. Global Delete Button Consistency Matching Lead Delete Pill (Fixes image_60a558.png)
   5. Clean Pagination Bar Styling (.retraak-pagination) for >20 Data Lists
   ========================================================================== */

/* 1. SINGLE CONTINUOUS FIXED ROOT CANVAS (ELIMINATES HORIZONTAL COLOR DIVIDE AT 100VH) */
html:has(body.admin-shell),
html:has(body.workspace-shell),
html:has(body.app-shell),
html:has(body.client-portal-body),
html:has(body.auth-page) {
  background-color: #DCE3F4 !important;
  background-image:
    radial-gradient(at 6% 8%, rgba(29, 73, 232, 0.20) 0px, transparent 50%),
    radial-gradient(at 92% 10%, rgba(139, 92, 246, 0.19) 0px, transparent 50%),
    radial-gradient(at 84% 86%, rgba(236, 72, 153, 0.12) 0px, transparent 52%),
    radial-gradient(at 14% 88%, rgba(16, 185, 129, 0.13) 0px, transparent 52%),
    radial-gradient(at 50% 48%, rgba(14, 165, 233, 0.11) 0px, transparent 55%),
    linear-gradient(135deg, #E2E8F7 0%, #DCE3F5 48%, #E5E1F6 100%) !important;
  background-attachment: fixed !important;
  background-size: 100vw 100vh !important;
  background-position: 0 0 !important;
  background-repeat: no-repeat !important;
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
}

/* Make body and inner shells 100% transparent with max-height: none so no second background ever creates a seam */
html body.admin-shell,
html body.workspace-shell,
html body.app-shell,
html body.client-portal-body,
html body.admin-shell > .app-main,
html body.workspace-shell > .app-main,
html body.app-shell > .app-main,
html body.admin-shell .admin-content,
html body.workspace-shell .app-content,
html body.app-shell .app-content {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  max-height: none !important;
  height: auto !important;
  min-height: 100vh !important;
}

/* 2. GENEROUS BOTTOM SPACING UNDER EVERY LAST CARD ACROSS ALL USER & ADMIN PAGES */
html body.admin-shell > .app-main,
html body.workspace-shell > .app-main,
html body.app-shell > .app-main {
  padding-bottom: 64px !important;
}

html body.admin-shell .admin-content,
html body.workspace-shell .app-content,
html body.app-shell .app-content,
html body.client-portal-body .client-portal-main {
  padding-bottom: 64px !important;
}

html body :is(.admin-content, .app-content, .client-portal-main) > :is(.card, section.card, .card-grid, .pilot-grid-main, .pilot-grid-3, .settings-grid):last-of-type {
  margin-bottom: 36px !important;
}

/* 3. PREVENT 4X TILED SVG ON CLOSE (×) HOVER (EXPLICIT NO-REPEAT & CENTER) */
html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross]
),
html body :is(
  .dialog-close-btn,
  .dialog-close,
  .modal-close-btn,
  .modal-close,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .critical-delete-close,
  .client-request-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .retraak-ai-close,
  .message-drawer-close,
  .client-message-drawer-close,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  button[data-rui-close-cross]
):is(:hover, :focus, :focus-visible, :active) {
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 16px 16px !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 4. GLOBAL DELETE BUTTONS = EXACT LEAD DELETE PILL DESIGN (Fixes image_60a558.png) */
html body :is(
  .lead-delete-btn:not(.avatar-remove-text-btn),
  .btn.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-xs.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-sm.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-ghost.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .delete-btn,
  .btn-delete,
  .inv-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  .int-danger,
  button.text-danger,
  #btn-delete-lead-modal,
  #sig-upload-remove,
  #sow-upload-remove,
  form:has(input[name="action"][value*="delete" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="remove" i]):not(:has(input[value="remove_avatar"])) button[type="submit"]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  form:has(input[name="action"][value*="clear" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="purge" i]) button[type="submit"]:not(.rui-btn-ok),
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok),
  button[title*="Delete" i]:not(.rui-btn-ok),
  button[title*="Remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn)
) {
  background: rgba(254, 226, 226, 0.85) !important;
  background-color: rgba(254, 226, 226, 0.85) !important;
  background-image: none !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  border: 1px solid #FECACA !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease !important;
}

html body :is(
  .lead-delete-btn:not(.avatar-remove-text-btn),
  .btn.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-xs.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-sm.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-ghost.lead-delete-btn:not(.avatar-remove-text-btn),
  .btn-danger:not(.rui-btn-ok):not([data-critical-confirm]),
  .delete-btn,
  .btn-delete,
  .inv-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  .int-danger,
  button.text-danger,
  #btn-delete-lead-modal,
  #sig-upload-remove,
  #sow-upload-remove,
  form:has(input[name="action"][value*="delete" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="remove" i]):not(:has(input[value="remove_avatar"])) button[type="submit"]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  form:has(input[name="action"][value*="clear" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="purge" i]) button[type="submit"]:not(.rui-btn-ok),
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok),
  button[title*="Delete" i]:not(.rui-btn-ok),
  button[title*="Remove" i]:not(.rui-btn-ok):not(.avatar-remove-text-btn)
):is(:hover, :focus-visible, :active) {
  background: #DC2626 !important;
  background-color: #DC2626 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24) !important;
  
}

/* 5. CLEAN PAGINATION BAR STYLING (.retraak-pagination) FOR >20 DATA LISTS */
html body .retraak-pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding: 12px 4px 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

html body .retraak-pagination .pagination-info {
  font-size: 12.5px !important;
  color: #64748B !important;
}

html body .retraak-pagination .pagination-links {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: wrap !important;
}

html body .retraak-pagination .pagination-num,
html body .retraak-pagination .pagination-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
}

html body .retraak-pagination .pagination-num:hover,
html body .retraak-pagination .pagination-btn:not(.pagination-disabled):hover {
  background: #F1F5F9 !important;
  border-color: #0F172A !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
}

html body .retraak-pagination .pagination-num.is-active {
  background: #0F172A !important;
  border-color: #0F172A !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html body .retraak-pagination .pagination-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}


/* ==========================================================================
   RETRAAK V30 MASTER OVERRIDES:
   1. Notification Dropdown Clean Read & Clear Buttons (Zero Red Boxes - Fixes image_52a49a, image_52a47c)
   2. Authentic 4-Color Google G Icon on Login & Signup (Fixes image_52a0be)
   3. Zero Blank Scrollable Space at Bottom of Short Pages (Fixes image_529dae, image_529d56)
   4. Invoice Studio & Preview Zero Horizontal Scrollbar (Fixes image_529594)
   5. Cookie Telemetry Modal 540px Compact Width (Fixes image_5291f1)
   6. Vibrant Plan Tier Pill Colors (Free / Pro / Team - Fixes image_528a35)
   7. Profile Remove Image Plain Red Text & +10% Larger Profile Avatar
   8. Executive-Grade Professional AI Action Buttons & Animations
   9. Creem Command Center Animated Pill Button Tabs Everywhere
   ========================================================================== */

/* 1. NOTIFICATION DROPDOWN CLEAN "READ" & "CLEAR" PILL BUTTONS (ZERO RED BOXES) */
html body #notif-menu .notif-entry {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
}

html body #notif-menu .notif-entry-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}

html body #notif-menu .notif-action-pill,
html body #notif-menu button[data-notif-state],
html body #notif-menu button[data-notif-dismiss] {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: #F8FAFC !important;
  background-color: #F8FAFC !important;
  background-image: none !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 7px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  height: 25px !important;
  min-height: 25px !important;
  max-height: 25px !important;
  width: auto !important;
  min-width: 44px !important;
  max-width: none !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  cursor: pointer !important;
  transform: none !important;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease !important;
}

html body #notif-menu .notif-action-pill:hover,
html body #notif-menu button[data-notif-state]:hover {
  background: #0F172A !important;
  background-color: #0F172A !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #0F172A !important;
  
}

html body #notif-menu .notif-clear-pill:hover,
html body #notif-menu button[data-notif-dismiss]:hover {
  background: #F1F5F9 !important;
  background-color: #F1F5F9 !important;
  background-image: none !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  border-color: #FCA5A5 !important;
  
}

html body #notif-menu .notif-menu-footer button,
html body #notif-menu .notif-menu-footer [data-notif-clear-all] {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

html body #notif-menu .notif-menu-footer button:hover:not(:disabled),
html body #notif-menu .notif-menu-footer [data-notif-clear-all]:hover:not(:disabled) {
  background: #F1F5F9 !important;
  background-color: #F1F5F9 !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border-color: #94A3B8 !important;
}

/* 2. GOOGLE ICON ON LOGIN / SIGNUP: PRESERVE 4-COLOR FILL WITH ZERO STROKE (Fixes image_52a0be.png) */
html body .google-btn svg,
html body .google-btn svg * {
  stroke: none !important;
  stroke-width: 0 !important;
}
/* Preserving native fill attributes on each Google SVG path */

/* 3. ZERO EXCESSIVE BOTTOM BLANK SPACE ON SHORT PAGES (Fixes image_529dae.png & image_529d56.png) */
html body.admin-shell > .app-main,
html body.workspace-shell > .app-main,
html body.app-shell > .app-main {
  min-height: 100vh !important;
  height: auto !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

html body.admin-shell .admin-content,
html body.workspace-shell .app-content,
html body.app-shell .app-content,
html body.client-portal-body .client-portal-main {
  min-height: 0 !important;
  height: auto !important;
  padding-bottom: 24px !important;
  box-sizing: border-box !important;
}

html body :is(.admin-content, .app-content, .client-portal-main) > :last-child {
  margin-bottom: 0 !important;
}

/* 4. INVOICE STUDIO & PREVIEW ZERO HORIZONTAL SCROLLBAR (Fixes image_529594.png) */
html body .template-nav-scroll {
  display: flex !important;
  flex-wrap: wrap !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

html body .retraak-a4-preview-stage,
html body #live-preview-container,
html body .invoice-rendered-pane,
html body .invoice-preview-viewport {
  overflow-x: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html body .retraak-a4-preview-stage .retraak-a4-sheet,
html body #live-preview-container .retraak-a4-sheet,
html body .invoice-rendered-pane .retraak-a4-sheet {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* 5. ADAPTIVE CONTENT-AWARE DIALOG & POPUP SIZING SYSTEM (Fixes image_516045.png & prevents cramped or bloated modals) */
html body dialog.admin-edit-dialog[open],
html body dialog[open]:not(.full-width-dialog) {
  width: min(620px, calc(100vw - 32px)) !important;
  max-width: 620px !important;
  height: fit-content !important;
  margin: auto !important;
}

html body #consent-telemetry-dialog,
html body #consent-telemetry-dialog[open],
html body #consent-telemetry-dialog .admin-edit-dialog-card {
  width: min(540px, calc(100vw - 32px)) !important;
  max-width: 540px !important;
  height: fit-content !important;
  margin: auto !important;
}

/* 6. BRAND-ALIGNED PLAN TIER & SUBTLE PILL COLORS (CALM FREE BADGE, ZERO POPPING - Fixes Free badge & contrast) */
html body :is(.pill.plan-free, .pill-plan-free, .plan-badge-free, .plan-color-pill.plan-free, .pill-gray, .pill-muted, .pill-subtle) {
  background: #F0F1F4 !important;
  background-color: #F0F1F4 !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid rgba(15, 19, 30, 0.14) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

html body :is(.pill.plan-pro, .pill-plan-pro, .plan-badge-pro) {
  background: linear-gradient(135deg, #1D49E8 0%, #182B9F 100%) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(29, 73, 232, 0.45) !important;
  box-shadow: 0 2px 8px rgba(29, 73, 232, 0.22) !important;
  font-weight: 800 !important;
}

html body :is(.pill.plan-team, .pill-plan-team, .plan-badge-team) {
  background: linear-gradient(135deg, #3A27A1 0%, #182B9F 100%) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(58, 39, 161, 0.45) !important;
  box-shadow: 0 2px 10px rgba(58, 39, 161, 0.24) !important;
  font-weight: 800 !important;
}

html body .pill.pill-primary:not(.plan-free):not(.plan-pro):not(.plan-team) {
  background: #EEF2FF !important;
  background-color: #EEF2FF !important;
  background-image: none !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border: 1px solid rgba(29, 73, 232, 0.30) !important;
  font-weight: 700 !important;
}

/* 7. PROFILE REMOVE IMAGE PLAIN RED TEXT & +10% LARGER PROFILE AVATAR */
html body .avatar-remove-text-btn,
html body form:has(input[name="action"][value="remove_avatar"]) button[type="submit"] {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 2px 4px !important;
  height: auto !important;
  min-height: 0 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transform: none !important;
}

html body .avatar-remove-text-btn:hover,
html body form:has(input[name="action"][value="remove_avatar"]) button[type="submit"]:hover {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #B91C1C !important;
  -webkit-text-fill-color: #B91C1C !important;
  text-decoration: underline !important;
  
}

html body .avatar-hover-container,
html body .admin-avatar-circle {
  width: 94px !important;
  height: 94px !important;
  min-width: 94px !important;
  min-height: 94px !important;
}

html body .user-footer-avatar,
html body .admin-sidebar-profile .avatar,
html body .profile-btn .avatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
}

/* 8. EXECUTIVE-GRADE PROFESSIONAL AI BUTTONS ("Write with AI", "Polish Tone", "Summarize Brief") */
@keyframes rtAiSparklePulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.16) rotate(12deg); }
}

html body .retraak-ai-trigger-wrap {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}

html body .retraak-ai-btn-group {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  padding: 4px 5px !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08), inset 0 1px 0 #FFFFFF !important;
}

/* Primary AI CTA: "Write with AI", "Generate with AI", "Summarise with AI" */
html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-main,
html body #retraak-ai-generate-btn,
html body .btn-ai,
html body .retraak-ai-submit,
html body button[data-ai-action] {
  background: linear-gradient(135deg, #4F46E5 0%, #6D28D9 52%, #2563EB 100%) !important;
  background-size: 200% 200% !important;
  background-position: 0% 50% !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 9999px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  cursor: pointer !important;
  transition: background-position 0.35s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease !important;
}

html body #retraak-ai-generate-btn,
html body .retraak-ai-submit {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-main :is(span, svg),
html body #retraak-ai-generate-btn :is(span, svg),
html body .btn-ai :is(span, svg),
html body .retraak-ai-submit :is(span, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  fill: currentColor !important;
  stroke: none !important;
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-main:hover,
html body #retraak-ai-generate-btn:hover,
html body .btn-ai:hover,
html body .retraak-ai-submit:hover,
html body button[data-ai-action]:hover {
  background-position: 100% 50% !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.48) !important;
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-main:hover svg,
html body .btn-ai:hover svg {
  animation: rtAiSparklePulse 0.8s ease-in-out infinite !important;
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-main:active,
html body #retraak-ai-generate-btn:active,
html body .btn-ai:active {
  transform: translateY(0) scale(0.97) !important;
}

/* Secondary AI Action Chips: "Polish Tone" & "Summarize Brief" */
html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-sub {
  background: linear-gradient(135deg, #FFFFFF 0%, #EEF2FF 100%) !important;
  color: #4338CA !important;
  -webkit-text-fill-color: #4338CA !important;
  border: 1px solid rgba(99, 102, 241, 0.28) !important;
  border-radius: 9999px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08) !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-sub :is(span, svg) {
  color: #4F46E5 !important;
  -webkit-text-fill-color: #4F46E5 !important;
  fill: currentColor !important;
  stroke: none !important;
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-sub:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28) !important;
  
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-sub:hover :is(span, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  fill: currentColor !important;
}

html body .retraak-ai-btn-group .retraak-ai-trigger-btn.retraak-ai-btn-sub:active {
  transform: translateY(0) scale(0.97) !important;
}

/* AI Assistant Modal Action Chips (.retraak-ai-action-chip) */
html body .retraak-ai-action-chip {
  background: #F8FAFC !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 9999px !important;
  height: 32px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body .retraak-ai-action-chip:hover:not(.active) {
  background: #EEF2FF !important;
  color: #4338CA !important;
  -webkit-text-fill-color: #4338CA !important;
  border-color: #818CF8 !important;
  
}

html body .retraak-ai-action-chip.active {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.30) !important;
  transform: translateY(-1px) !important;
}

html body .retraak-ai-action-chip.active svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

/* 9. UNIFIED INVOICE REGISTRY TAB BARS, HORIZONTAL SCROLLABLE TEMPLATE SWITCHERS, & BRAND PALETTE CONTRAST (V32) */
@keyframes rtTabPaneFade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

html body :is(.creem-tab-pane, .invoice-rendered-pane, .tab-pane, [role="tabpanel"]) {
  animation: rtTabPaneFade 0.18s ease-out both !important;
}

/* Tab Bar Container - Clean Single Glass Pill Bar Matching Invoice Registry */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .sc-plan-tabs
):not(.template-nav-scroll):not(.invoice-preview-switcher) {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 5px 6px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(15, 19, 30, 0.12) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 16px rgba(15, 19, 30, 0.05), inset 0 1px 0 #FFFFFF !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  transform: none !important;
  animation: none !important;
}

/* Horizontally Scrollable Single-Row Invoice Template Switchers (Fixes image_4f5bb9 & image_4efa43) */
html body :is(.template-nav-scroll, .invoice-preview-switcher) {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(24, 43, 159, 0.26) transparent !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(15, 19, 30, 0.12) !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 16px rgba(15, 19, 30, 0.05), inset 0 1px 0 #FFFFFF !important;
  box-sizing: border-box !important;
}

html body :is(.template-nav-scroll, .invoice-preview-switcher)::-webkit-scrollbar {
  height: 5px !important;
}

html body :is(.template-nav-scroll, .invoice-preview-switcher)::-webkit-scrollbar-track {
  background: transparent !important;
}

html body :is(.template-nav-scroll, .invoice-preview-switcher)::-webkit-scrollbar-thumb {
  background: rgba(24, 43, 159, 0.24) !important;
  border-radius: 9999px !important;
}

html body :is(.template-nav-scroll, .invoice-preview-switcher)::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 73, 232, 0.45) !important;
}

html body :is(.template-nav-scroll, .invoice-preview-switcher) > :is(a, button) {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Tab Items Inside Any Tab Bar - High Specificity to Beat Global .btn-ghost Rules */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a, button, .btn, .btn-sm, .btn-xs, .btn-ghost, .btn-secondary):not(.not-a-tab-1):not(.not-a-tab-2):not(.not-a-tab-3):not(.not-a-tab-4):not(.not-a-tab-5):not(.not-a-tab-6):not(.not-a-tab-7):not(.not-a-tab-8):not(.not-a-tab-9):not(.not-a-tab-10):not(.not-a-tab-11):not(.not-a-tab-12):not(.not-a-tab-13):not(.not-a-tab-14) {
  border-radius: 9999px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 15px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  position: relative !important;
  text-decoration: none !important;
  transform: none !important;
  animation: none !important;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
}

/* Inactive Tab Items - Brand Ink (#0F131E), Zero Background Card, Zero Border */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a, button, .btn, .btn-sm, .btn-xs, .btn-ghost, .btn-secondary):not(.btn-primary):not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]):not(.not-a-tab-1):not(.not-a-tab-2):not(.not-a-tab-3):not(.not-a-tab-4):not(.not-a-tab-5):not(.not-a-tab-6):not(.not-a-tab-7):not(.not-a-tab-8):not(.not-a-tab-9):not(.not-a-tab-10) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a, button, .btn, .btn-sm, .btn-xs, .btn-ghost, .btn-secondary):not(.btn-primary):not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]):not(.not-a-tab-1):not(.not-a-tab-2):not(.not-a-tab-3):not(.not-a-tab-4):not(.not-a-tab-5):not(.not-a-tab-6):not(.not-a-tab-7):not(.not-a-tab-8):not(.not-a-tab-9):not(.not-a-tab-10) :is(span, strong, small, svg):not(.pill) {
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  stroke: currentColor !important;
}

/* Hover on Inactive Tab Items - Subtle Surface Tint (#F0F1F4) with Deep Navy (#182B9F) */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a, button, .btn, .btn-sm, .btn-xs, .btn-ghost, .btn-secondary):not(.btn-primary):not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]):not(.not-a-tab-1):not(.not-a-tab-2):not(.not-a-tab-3):not(.not-a-tab-4):not(.not-a-tab-5):not(.not-a-tab-6):not(.not-a-tab-7):not(.not-a-tab-8):not(.not-a-tab-9):not(.not-a-tab-10):hover {
  background: #F0F1F4 !important;
  background-color: #F0F1F4 !important;
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
  border: 0 !important;
  box-shadow: none !important;
  
}

html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a, button, .btn, .btn-sm, .btn-xs, .btn-ghost, .btn-secondary):not(.btn-primary):not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]):not(.not-a-tab-1):not(.not-a-tab-2):not(.not-a-tab-3):not(.not-a-tab-4):not(.not-a-tab-5):not(.not-a-tab-6):not(.not-a-tab-7):not(.not-a-tab-8):not(.not-a-tab-9):not(.not-a-tab-10):hover :is(span, strong, small, svg):not(.pill) {
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
  stroke: currentColor !important;
}

/* Active Tab Item - Crisp Dark Ink Pill (#0F131E) Matching Invoice Registry */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(
  a.btn-primary,
  a.active,
  a.is-active,
  a[aria-current="page"],
  button.btn-primary,
  button.active,
  button.is-active,
  button[aria-current="page"],
  button[aria-selected="true"]
):not(.not-a-tab-1):not(.not-a-tab-2):not(.not-a-tab-3):not(.not-a-tab-4):not(.not-a-tab-5):not(.not-a-tab-6):not(.not-a-tab-7):not(.not-a-tab-8):not(.not-a-tab-9):not(.not-a-tab-10) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 0 !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.20) !important;
  transform: none !important;
}

html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(
  a.btn-primary,
  a.active,
  a.is-active,
  a[aria-current="page"],
  button.btn-primary,
  button.active,
  button.is-active,
  button[aria-current="page"],
  button[aria-selected="true"]
):not(.not-a-tab-1):not(.not-a-tab-2):not(.not-a-tab-3):not(.not-a-tab-4):not(.not-a-tab-5):not(.not-a-tab-6):not(.not-a-tab-7):not(.not-a-tab-8):not(.not-a-tab-9):not(.not-a-tab-10) :is(span, strong, small, svg):not(.pill) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: currentColor !important;
}

/* Count badges inside tabs: Subtle surface (#F0F1F4) when inactive, translucent white when active */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a, button):not(.active):not(.is-active):not(.btn-primary) :is(.pill, span:nth-child(2)) {
  background: #F0F1F4 !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid rgba(15, 19, 30, 0.14) !important;
  padding: 1px 7px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a.active, a.is-active, a.btn-primary, button.active, button.is-active, button.btn-primary) :is(.pill, span:nth-child(2)) {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  padding: 1px 7px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

/* 10. ADMIN SIDEBAR (DARK) & USER SIDEBAR (LIGHT) HIGH-CONTRAST ACTIVE & HOVER STATES (Fixes image_4f5b80 & image_4f0904) */
html body .user-sidebar-v2 .nav-single-link.active,
html body .user-sidebar-v2 .nav-single-link.active:hover,
html body .user-sidebar-v2 .nav-single-link.active:focus-visible,
html body .user-sidebar-v2 .nav-sub-link.active,
html body .user-sidebar-v2 .nav-sub-link.active:hover,
html body .user-sidebar-v2 .nav-sub-link.is-active,
html body .user-sidebar-v2 .nav-sub-link.is-active:hover,
html body.admin-shell .sidebar .nav-single-link.active,
html body.admin-shell .sidebar .nav-single-link.active:hover,
html body.admin-shell .sidebar .nav-sub-link.active,
html body.admin-shell .sidebar .nav-sub-link.active:hover,
html body.admin-shell .sidebar .nav-sub-link[aria-current="page"],
html body.admin-shell .sidebar .nav-single-link[aria-current="page"] {
  background: linear-gradient(135deg, #1D49E8 0%, #182B9F 55%, #3A27A1 100%) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: rgba(29, 73, 232, 0.45) !important;
  box-shadow: 0 6px 16px rgba(29, 73, 232, 0.28) !important;
}

html body .user-sidebar-v2 .nav-single-link.active :is(span, svg, .nav-icon, *),
html body .user-sidebar-v2 .nav-single-link.active:hover :is(span, svg, .nav-icon, *),
html body .user-sidebar-v2 .nav-sub-link.active :is(span, svg, .nav-sub-icon, *),
html body .user-sidebar-v2 .nav-sub-link.active:hover :is(span, svg, .nav-sub-icon, *),
html body.admin-shell .sidebar .nav-single-link.active :is(span, svg, .nav-icon, *),
html body.admin-shell .sidebar .nav-single-link.active:hover :is(span, svg, .nav-icon, *),
html body.admin-shell .sidebar .nav-sub-link.active :is(span, svg, .nav-sub-icon, *),
html body.admin-shell .sidebar .nav-sub-link.active:hover :is(span, svg, .nav-sub-icon, *) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: currentColor !important;
}

/* Light User Sidebar Inactive Hover: Soft Brand Blue Tint */
html body .user-sidebar-v2 :is(.nav-single-link, .nav-group-toggle, .nav-sub-link):not(.active):not(.is-active):hover {
  background: rgba(29, 73, 232, 0.08) !important;
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
}

html body .user-sidebar-v2 :is(.nav-single-link, .nav-group-toggle, .nav-sub-link):not(.active):not(.is-active):hover :is(span, svg, .nav-icon, .nav-sub-icon, *) {
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
  stroke: currentColor !important;
}

/* Dark Admin Sidebar Inactive Hover: Translucent Dark-Glass Highlight with White Text (Never White-on-White!) */
html body.admin-shell .sidebar :is(.nav-single-link, .nav-group-toggle, .nav-sub-link):not(.active):not(.is-active):hover {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html body.admin-shell .sidebar :is(.nav-single-link, .nav-group-toggle, .nav-sub-link):not(.active):not(.is-active):hover :is(span, svg, .nav-icon, .nav-sub-icon, *) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: currentColor !important;
}

/* Global Secondary / Ghost / Outline Button Hovers Use Brand Surface (#F0F1F4) & Deep Navy (#182B9F) */
html body :is(.btn-secondary, a.btn-secondary, button.btn-secondary, .btn-ghost, a.btn-ghost, button.btn-ghost, .btn-outline):not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.delete-btn):not(:disabled):not(.admin-tabs-bar *):not(.registry-tabs *):not(.contact-tabs *):not(.pilot-tabs *):not(.mx-tabs *):not(.fx-tabs *):hover {
  background: #F0F1F4 !important;
  background-color: #F0F1F4 !important;
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
  border-color: rgba(24, 43, 159, 0.28) !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.06) !important;
}

html body :is(.btn-secondary, a.btn-secondary, button.btn-secondary, .btn-ghost, a.btn-ghost, button.btn-ghost, .btn-outline):not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(.delete-btn):not(:disabled):not(.admin-tabs-bar *):not(.registry-tabs *):not(.contact-tabs *):not(.pilot-tabs *):not(.mx-tabs *):not(.fx-tabs *):hover :is(span, strong, small, svg):not(.pill) {
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
  stroke: currentColor !important;
}

/* Cookie Banner: Enforce Zero Black Outline Globally & Wide Modern Proportions */
html body #rt-site-bar-v27 {
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  outline: none !important;
  box-shadow: 0 22px 50px -12px rgba(15, 19, 30, 0.18), 0 4px 16px rgba(15, 19, 30, 0.06) !important;
  width: min(500px, calc(100vw - 32px)) !important;
}
html body #rt-site-bar-v27 .rt-sb27-btns {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
@media (max-width: 520px) {
  html body #rt-site-bar-v27 .rt-sb27-btns {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
html body #rt-site-bar-v27 .rt-sb27-btn-danger {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #DC2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22) !important;
}
html body #rt-site-bar-v27 .rt-sb27-btn-danger:hover {
  background: #B91C1C !important;
  border-color: #B91C1C !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.32) !important;
}

/* 11. ADMIN INVOICE STUDIO SPLIT-SCREEN EQUAL WIDTHS & STICKY FLOATING CODE EDITOR */
@media (min-width: 1025px) {
  html body.admin-shell .admin-content .admin-invoice-studio-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 20px !important;
  }
  html body.admin-shell .admin-content .admin-invoice-editor-col {
    position: sticky !important;
    top: 84px !important;
    align-self: start !important;
    width: 100% !important;
    min-width: 0 !important;
    z-index: 5 !important;
  }
  html body.admin-shell .admin-content .admin-invoice-preview-col {
    align-self: start !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}


/* ==========================================================================
   RETRAAK V34 MASTER OVERRIDES:
   1. High-Contrast, Crisp Tag & Pill Colors Across User & Admin Panels (Fixes image_43ab9e, image_43a8b5, image_43a4f8)
   2. Profile "Remove image" Strictly Plain Red Text Only - Zero Button Background/Border (Fixes image_43a8b5)
   3. Cookie Banner Clean Soft Border & Zero Black Outline
   ========================================================================== */

/* 1. HIGH-CONTRAST TAGS & PILLS ACROSS USER & ADMIN PANELS */
html body .pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: 9999px !important;
  padding: 3px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.005em !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

/* Primary Pill: Crisp Royal Blue Gradient with Pure White Text */
html body .pill.pill-primary:not(.plan-free):not(.plan-pro):not(.plan-team) {
  background: #EEF2FF !important;
  background-color: #EEF2FF !important;
  background-image: none !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border: 1px solid rgba(29, 73, 232, 0.30) !important;
  font-weight: 700 !important;
}

/* Blue / Info Pill & @username Showcase Badge: Crisp Soft Indigo-Blue Fill with Deep Royal Blue Text */
html body :is(.pill.pill-blue, .pill.pill-info, .pill.pill-cyan, #profile-header-uname-badge, a.pill[id^="users-row-uname-link-"]) {
  background: #EEF2FF !important;
  background-color: #EEF2FF !important;
  background-image: none !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border: 1px solid rgba(29, 73, 232, 0.30) !important;
  box-shadow: 0 1px 2px rgba(29, 73, 232, 0.06) !important;
  font-weight: 800 !important;
}

html body :is(#profile-header-uname-badge, a.pill[id^="users-row-uname-link-"]):hover {
  background: #1D49E8 !important;
  background-color: #1D49E8 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #182B9F !important;
}

/* Emerald / Teal / Green / Active Status Pill: High-Contrast Emerald Fill with Deep Forest Text */
html body :is(.pill.pill-teal, .pill.pill-green, .pill.pill-emerald, .pill.pill-success) {
  background: #ECFDF5 !important;
  background-color: #ECFDF5 !important;
  background-image: none !important;
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.36) !important;
  font-weight: 700 !important;
}

/* Violet / Purple / Role / Super Admin Pill: High-Contrast Royal Violet Fill with Deep Violet Text */
html body :is(.pill.pill-violet, .pill.pill-purple) {
  background: #F5F3FF !important;
  background-color: #F5F3FF !important;
  background-image: none !important;
  color: #5B21B6 !important;
  -webkit-text-fill-color: #5B21B6 !important;
  border: 1px solid rgba(109, 40, 217, 0.32) !important;
  font-weight: 700 !important;
}

/* Amber / Warning / Pending Pill: High-Contrast Warm Amber Fill with Deep Amber Text */
html body :is(.pill.pill-amber, .pill.pill-warning, .pill.pill-yellow) {
  background: #FFFBEB !important;
  background-color: #FFFBEB !important;
  background-image: none !important;
  color: #B45309 !important;
  -webkit-text-fill-color: #B45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
  font-weight: 700 !important;
}

/* Rose / Red / Danger Pill: High-Contrast Crimson Fill with Deep Red Text */
html body :is(.pill.pill-red, .pill.pill-rose, .pill.pill-danger) {
  background: #FEF2F2 !important;
  background-color: #FEF2F2 !important;
  background-image: none !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.34) !important;
  font-weight: 700 !important;
}

/* Neutral / Subtle / Free Plan Pill: Crisp Cool Slate Surface with Deep Ink Text (#0F131E) */
html body :is(.pill.plan-free, .pill-plan-free, .plan-badge-free, .plan-color-pill.plan-free, .pill.pill-gray, .pill.pill-muted, .pill.pill-subtle, .pill.pill-neutral):not(#profile-header-uname-badge):not([id^="users-row-uname-link-"]) {
  background: #EEF2F8 !important;
  background-color: #EEF2F8 !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid rgba(15, 19, 30, 0.20) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

/* Pro & Team Plan Pills: Vibrant High-Contrast Gradients with Pure White Text */
html body :is(.pill.plan-pro, .pill-plan-pro, .plan-badge-pro, .plan-color-pill.plan-pro) {
  background: linear-gradient(135deg, #1D49E8 0%, #182B9F 100%) !important;
  background-color: #1D49E8 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(29, 73, 232, 0.45) !important;
  box-shadow: 0 2px 8px rgba(29, 73, 232, 0.22) !important;
  font-weight: 800 !important;
}

html body :is(.pill.plan-team, .pill-plan-team, .plan-badge-team, .plan-color-pill.plan-team) {
  background: linear-gradient(135deg, #3A27A1 0%, #182B9F 100%) !important;
  background-color: #3A27A1 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(58, 39, 161, 0.45) !important;
  box-shadow: 0 2px 10px rgba(58, 39, 161, 0.24) !important;
  font-weight: 800 !important;
}

/* 2. PROFILE "REMOVE IMAGE" STRICTLY PLAIN RED TEXT ONLY - ZERO BUTTON BOX OR BORDER */
html body button.avatar-remove-text-btn,
html body .avatar-remove-text-btn,
html body form:has(input[name="action"][value="remove_avatar"]) button,
html body form:has(input[name="action"][value="remove_avatar"]) button[type="submit"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 2px 0 0 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: auto !important;
  min-width: 0 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  display: inline !important;
  transform: none !important;
}

html body button.avatar-remove-text-btn:is(:hover, :focus, :focus-visible, :active),
html body .avatar-remove-text-btn:is(:hover, :focus, :focus-visible, :active),
html body form:has(input[name="action"][value="remove_avatar"]) button:is(:hover, :focus, :focus-visible, :active),
html body form:has(input[name="action"][value="remove_avatar"]) button[type="submit"]:is(:hover, :focus, :focus-visible, :active) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  color: #B91C1C !important;
  -webkit-text-fill-color: #B91C1C !important;
  text-decoration: underline !important;
  
}


/* ==========================================================================
   RETRAAK V35 ENTERPRISE MASTER OVERRIDES:
   1. Pro vs. Team Badge Visual Hierarchy (Electric Indigo/Silver-Slate vs Obsidian Dark + Gold/Emerald)
   2. Native Smooth Scrolling Stability (Zero Background Splitting or Tearing)
   3. Glassmorphism Consistency for Message Inboxes, Chat Boxes & Modals
   4. SOW/MSA/NDA Preview Header Boxes & Top Action Containers Alignment
   5. Strict A4 Multi-Page Invoice Pagination & Print Flow
   ========================================================================== */

/* 1. PRO VS. TEAM BADGE VISUAL HIERARCHY */
html body :is(.pill.plan-pro, .pill-plan-pro, .plan-badge-pro, .plan-color-pill.plan-pro) {
  background: linear-gradient(135deg, #3B35E6 0%, #1D49E8 55%, #182B9F 100%) !important;
  background-color: #1D49E8 !important;
  color: #F8FAFC !important;
  -webkit-text-fill-color: #F8FAFC !important;
  border: 1px solid rgba(203, 213, 225, 0.68) !important;
  box-shadow: 0 2px 10px rgba(29, 73, 232, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.38) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
}

html body :is(.pill.plan-team, .pill-plan-team, .plan-badge-team, .plan-color-pill.plan-team) {
  background: linear-gradient(135deg, #090C14 0%, #111827 52%, #0F172A 100%) !important;
  background-color: #090C14 !important;
  color: #FDE68A !important;
  -webkit-text-fill-color: #FDE68A !important;
  border: 1px solid rgba(245, 158, 11, 0.68) !important;
  box-shadow: 0 3px 12px rgba(15, 19, 30, 0.36), 0 0 12px rgba(16, 185, 129, 0.24), inset 0 1px 0 rgba(253, 230, 138, 0.30) !important;
  font-weight: 800 !important;
  letter-spacing: 0.025em !important;
}

/* 2. NATIVE SMOOTH SCROLLING STABILITY (ZERO BACKGROUND SPLITTING OR TEARING) */
html {
  scroll-behavior: smooth !important;
  overflow-x: clip !important;
  background-color: var(--app-bg, #F0F1F4) !important;
}

html body {
  overflow-x: clip !important;
  overflow-y: visible !important;
  background-attachment: scroll !important;
}

/* 3. GLASSMORPHISM CONSISTENCY FOR MESSAGE INBOXES, CHAT BOXES & MODAL CONTAINERS */
html body :is(
  .mx-card,
  .mx-inbox-list,
  .chat-box,
  .chat-card,
  .messages-layout .card,
  .client-messages-panel,
  .modal-card,
  .admin-edit-dialog-card,
  .critical-delete-dialog
) {
  background: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(15, 19, 30, 0.11) !important;
  box-shadow: 0 16px 40px -12px rgba(15, 19, 30, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

/* 4. SOW / MSA / NDA PREVIEW HEADER BOXES & TOP ACTION CONTAINERS ALIGNMENT */
html body .contract-preview-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding: 14px 18px !important;
  margin-bottom: 16px !important;
  background: rgba(248, 250, 252, 0.92) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(15, 19, 30, 0.10) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 1px 0 #FFFFFF !important;
}

html body .contract-preview-title-wrap {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

html body .contract-preview-actions,
html body .dash-page-header-actions {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

/* 5. STRICT A4 MULTI-PAGE INVOICE & LEGAL PREVIEW DIMENSIONS & PAGE-BREAK FLOW */
html body .retraak-a4-sheet,
html body .retraak-legal-a4-sheet {
  width: 100% !important;
  max-width: 210mm !important;
  min-height: 297mm !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background: #FFFFFF !important;
  color: #0F131E !important;
  box-sizing: border-box !important;
  page-break-after: always !important;
  break-after: page !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }
  html body .retraak-a4-sheet,
  html body .retraak-legal-a4-sheet {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    box-shadow: none !important;
    border: 0 !important;
    page-break-inside: auto !important;
  }
  html body .retraak-a4-sheet tr,
  html body .retraak-legal-a4-sheet section,
  html body .retraak-legal-a4-sheet .sig-block {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}


/* ==========================================================================
   RETRAAK V36 MASTER OVERRIDES:
   1. Shining Gold Team Plan Badge & Ring Globally (Editable via --plan-grad-start-team / --plan-grad-end-team)
   2. Black & White Primary Buttons Globally with Brand Accent Hovers
   3. Fix Monitoring Tab Inner Span & Count Badge Contrast (Fixes image_163641.png & image_162bfb.png)
   4. Fix Dark Admin Sidebar Hover & Active .nav-badge Contrast (Fixes image_163664.png)
   ========================================================================== */

/* 1. GLOSSY GLASS PLAN BADGES & DYNAMIC ADMIN COLOR SYNC GLOBALLY */
html body :is(.pill.plan-free, .pill-plan-free, .plan-badge-free, .plan-color-pill.plan-free, .user-brand-pill.plan-free) {
  --_pc: var(--plan-color-free, #475569);
  background: linear-gradient(135deg, color-mix(in srgb, var(--_pc) 14%, #FFFFFF) 0%, color-mix(in srgb, var(--_pc) 7%, #FFFFFF) 52%, color-mix(in srgb, var(--_pc) 13%, #FFFFFF) 100%) !important;
  color: color-mix(in srgb, var(--_pc) 85%, #0F131E) !important;
  -webkit-text-fill-color: color-mix(in srgb, var(--_pc) 85%, #0F131E) !important;
  border: 1px solid color-mix(in srgb, var(--_pc) 34%, transparent) !important;
  box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--_pc) 18%, transparent), inset 0 1px 1px rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  font-weight: 800 !important;
}

html body :is(.pill.plan-pro, .pill-plan-pro, .plan-badge-pro, .plan-color-pill.plan-pro, .user-brand-pill.plan-pro) {
  --_pc: var(--plan-color-pro, #1D49E8);
  background: linear-gradient(135deg, color-mix(in srgb, var(--_pc) 20%, #FFFFFF) 0%, color-mix(in srgb, var(--_pc) 10%, #FFFFFF) 52%, color-mix(in srgb, var(--_pc) 18%, #FFFFFF) 100%) !important;
  color: color-mix(in srgb, var(--_pc) 86%, #0F131E) !important;
  -webkit-text-fill-color: color-mix(in srgb, var(--_pc) 86%, #0F131E) !important;
  border: 1px solid color-mix(in srgb, var(--_pc) 44%, transparent) !important;
  box-shadow: 0 2px 10px -2px color-mix(in srgb, var(--_pc) 25%, transparent), inset 0 1px 1px rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  font-weight: 800 !important;
}

html body :is(.pill.plan-team, .pill-plan-team, .plan-badge-team, .plan-color-pill.plan-team, .user-brand-pill.plan-team) {
  --_pc: var(--plan-color-team, #D97706);
  background: linear-gradient(135deg, color-mix(in srgb, var(--_pc) 22%, #FFFFFF) 0%, color-mix(in srgb, var(--_pc) 11%, #FFFFFF) 52%, color-mix(in srgb, var(--_pc) 20%, #FFFFFF) 100%) !important;
  color: color-mix(in srgb, var(--_pc) 86%, #0F131E) !important;
  -webkit-text-fill-color: color-mix(in srgb, var(--_pc) 86%, #0F131E) !important;
  border: 1px solid color-mix(in srgb, var(--_pc) 48%, transparent) !important;
  box-shadow: 0 2px 10px -2px color-mix(in srgb, var(--_pc) 28%, transparent), inset 0 1px 1px rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
}

/* 2. BLACK & WHITE PRIMARY BUTTONS GLOBALLY WITH ACCENT HOVER */
html body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .btn-brand,
  a.btn-brand,
  button.btn-brand,
  .mx-btn-primary
):not(.lead-delete-btn):not(.btn-danger):not(.retraak-ai-trigger-btn):not(#retraak-ai-generate-btn):not(.btn-ai):not(.side-plan *):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):not(.welcome-actions *):not(.pilot-hero-actions *) {
  background: var(--cta, #0F131E) !important;
  background-color: var(--cta, #0F131E) !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid var(--cta, #0F131E) !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.16) !important;
  font-weight: 700 !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
}

html body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .btn-brand,
  a.btn-brand,
  button.btn-brand,
  .mx-btn-primary
):not(.lead-delete-btn):not(.btn-danger):not(.retraak-ai-trigger-btn):not(#retraak-ai-generate-btn):not(.btn-ai):not(.side-plan *):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):not(.welcome-actions *):not(.pilot-hero-actions *) :is(span, strong, svg):not(.pill):not(.pilot-tab-count) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .btn-brand,
  a.btn-brand,
  button.btn-brand,
  .mx-btn-primary
):not(.lead-delete-btn):not(.btn-danger):not(.retraak-ai-trigger-btn):not(#retraak-ai-generate-btn):not(.btn-ai):not(.side-plan *):not(.side-plan-primary-btn):not(.side-plan-secondary-btn):not(.welcome-actions *):not(.pilot-hero-actions *):not(:disabled):hover {
  background: var(--cta-hover, #182B9F) !important;
  background-color: var(--cta-hover, #182B9F) !important;
  border-color: var(--cta-hover, #182B9F) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(24, 43, 159, 0.26) !important;
  
}

/* 3. FIX TAB BARS (.pilot-tabs, .pilot-chips, .admin-tabs-bar, etc.) INNER SPAN & COUNT BADGE CONTRAST (Fixes image_163641.png & image_162bfb.png) */
/* Never turn the first label <span> inside a tab into a nested pill box! Only style .pill or .pilot-tab-count or .mx-count as a badge */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-chips,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs,
  .template-nav-scroll,
  .invoice-preview-switcher,
  .sc-plan-tabs
) :is(a, button) > span:not(.pill):not(.pilot-tab-count):not(.mx-count) {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: inherit !important;
}

/* Count badges (.pilot-tab-count, .mx-count, .pill) inside INACTIVE tabs: Crisp Crimson or Slate with pure high-contrast text (Never dark-blue text on red!) */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-chips,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs
) :is(a, button):not(.active):not(.is-active):not([aria-current="page"]) :is(.pilot-tab-count, .mx-count.is-hot) {
  background: #DC2626 !important;
  background-color: #DC2626 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #DC2626 !important;
  padding: 1px 7px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

/* Count badges inside ACTIVE tabs: Translucent White Pill with Pure White Text */
html body :is(
  .admin-tabs-bar,
  .pilot-tabs,
  .pilot-chips,
  .pilot-segmented,
  .int-tabs,
  .mx-tabs,
  .contact-tabs,
  .fx-tabs,
  .registry-tabs
) :is(a.active, a.is-active, a[aria-current="page"], button.active, button.is-active) :is(.pilot-tab-count, .mx-count, .pill) {
  background: rgba(255, 255, 255, 0.22) !important;
  background-color: rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.36) !important;
  padding: 1px 7px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

/* Pilot Chips (.pilot-chips / .pilot-chip on Monitoring > Errors & Audit) Black & White Primary Active State */
html body .pilot-chips {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
}

html body .pilot-chips .pilot-chip:not(.is-active):not(.active):not([aria-current="page"]) {
  background: #FFFFFF !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid rgba(15, 19, 30, 0.14) !important;
  border-radius: 9999px !important;
  padding: 0 14px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

html body .pilot-chips .pilot-chip:not(.is-active):not(.active):not([aria-current="page"]):hover {
  background: #F0F1F4 !important;
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
  border-color: rgba(24, 43, 159, 0.28) !important;
}

html body .pilot-chips .pilot-chip:is(.is-active, .active, [aria-current="page"]) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  border-radius: 9999px !important;
  padding: 0 14px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.20) !important;
}

/* 4. FIX DARK ADMIN SIDEBAR .nav-badge CONTRAST ON DEFAULT, HOVER, AND ACTIVE (Fixes image_e4491f.png - Dark Translucent Glass Pill with Crisp White Text!) */
html body.admin-shell .sidebar .nav-badge,
html body.admin-shell .sidebar :is(.nav-single-link, .nav-sub-link):hover .nav-badge,
html body.admin-shell .sidebar :is(.nav-single-link, .nav-sub-link):not(.active):not(.is-active):hover .nav-badge,
html body.admin-shell .sidebar :is(.nav-single-link, .nav-sub-link):is(.active, .is-active, [aria-current="page"]) .nav-badge {
  background: rgba(255, 255, 255, 0.18) !important;
  background-color: rgba(255, 255, 255, 0.18) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  padding: 1px 8px !important;
  border-radius: 9999px !important;
  box-shadow: none !important;
}

/* Ensure .pilot-tabs and admin tab bars never render a native horizontal scrollbar track underneath the tabs */
html body :is(.admin-tabs-bar, .pilot-tabs, .pilot-segmented, .int-tabs, .mx-tabs, .contact-tabs, .fx-tabs, .registry-tabs):not(.template-nav-scroll):not(.invoice-preview-switcher) {
  overflow: visible !important;
  overflow-x: visible !important;
  scrollbar-width: none !important;
  border-radius: 18px !important;
}
html body :is(.admin-tabs-bar, .pilot-tabs, .pilot-segmented, .int-tabs, .mx-tabs, .contact-tabs, .fx-tabs, .registry-tabs):not(.template-nav-scroll):not(.invoice-preview-switcher)::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}


/* ==========================================================================
   RETRAAK V39 MASTER OVERRIDES:
   1. Shining Gold (#F59E0B -> #D97706 -> #B45309) Globally for Team Plan & User Profile Outline Ring (Fixes image_e43e18.png)
   2. Clean Sans-Serif Platform Font for @username Handles (No AI/Monospace Font - Fixes image_e43d7d.png)
   3. Sidebar Cards (.side-plan) High-Contrast White "View plans" Button & Placement ABOVE Logout Card (Fixes image_e4323f.png)
   4. AI Engine (.ai-admin-tabs) & Entitlements (.ent-tabs) Clean Active Pill with Zero Bottom Line (Fixes image_e42eda.png)
   5. Universal Apple-Grade Frosted Liquid Glassmorphism Across All Surfaces
   ========================================================================== */

/* 1. SHINING GOLD GLOBALLY FOR TEAM - USER PROFILE OUTLINE RING, PRICING CARDS, BADGES & CHECKMARKS */
html body .retraak-plan-ring-team,
html body img.retraak-plan-ring-team,
html body span.retraak-plan-ring-team,
html body .avatar-hover-container.retraak-plan-ring-team,
html body .admin-user-avatar.retraak-plan-ring-team,
html body .user-footer-avatar.retraak-plan-ring-team {
  border: 0 !important;
  box-shadow: 0 0 0 2.5px var(--plan-ring-team, #E5A50A), 0 0 14px rgba(229, 165, 10, 0.48) !important;
}

html body .retraak-plan-ring-pro,
html body img.retraak-plan-ring-pro,
html body span.retraak-plan-ring-pro,
html body .avatar-hover-container.retraak-plan-ring-pro,
html body .admin-user-avatar.retraak-plan-ring-pro,
html body .user-footer-avatar.retraak-plan-ring-pro {
  border: 0 !important;
  box-shadow: 0 0 0 2.5px var(--plan-ring-pro, #1D49E8), 0 0 12px rgba(29, 73, 232, 0.35) !important;
}

html body .retraak-plan-ring-free,
html body img.retraak-plan-ring-free,
html body span.retraak-plan-ring-free,
html body .avatar-hover-container.retraak-plan-ring-free,
html body .admin-user-avatar.retraak-plan-ring-free,
html body .user-footer-avatar.retraak-plan-ring-free {
  border: 0 !important;
  box-shadow: 0 0 0 2px var(--plan-ring-free, #CBD5E1) !important;
}

/* Team Pricing Card: Shining Gold Top Badge, Sub-Pill, Checkmarks, and Glass Border */
html body :is(.price-card.price-card-team, .price-card.rt-billing-plan-team, .price-card[data-plan-slug="team"]) {
  border: 1.5px solid rgba(217, 119, 6, 0.45) !important;
  box-shadow: 0 22px 48px -14px rgba(217, 119, 6, 0.16), 0 4px 14px rgba(15, 23, 42, 0.05), inset 0 1.5px 0 #FFFFFF !important;
}

html body .price-badge.price-badge-collaborative,
html body :is(.price-card-team, .rt-billing-plan-team, .price-card[data-plan-slug="team"]) .price-badge:not(.price-badge-current) {
  background: linear-gradient(135deg, var(--plan-grad-start-team, #F59E0B) 0%, #D97706 52%, var(--plan-grad-end-team, #B45309) 100%) !important;
  background-color: #D97706 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.36) !important;
}

html body .rt-trial-pill-team,
html body .price-card-team .pricing-trial-note {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  border: 1.5px solid rgba(217, 119, 6, 0.42) !important;
  color: #B45309 !important;
  -webkit-text-fill-color: #B45309 !important;
}

html body .rt-trial-pill-team .rt-trial-note-text {
  color: #B45309 !important;
  -webkit-text-fill-color: #B45309 !important;
}

html body .rt-trial-pill-team .rt-trial-note-sub {
  color: #92400E !important;
  -webkit-text-fill-color: #92400E !important;
}

html body .pricing-trial-note::before,
html body .pricing-trial-note::after {
  content: none !important;
  display: none !important;
}

html body .rt-check-badge.rt-check-team,
html body .price-card-team .rt-check-badge {
  background: linear-gradient(135deg, var(--plan-grad-start-team, #F59E0B) 0%, #D97706 52%, var(--plan-grad-end-team, #B45309) 100%) !important;
  background-color: #D97706 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.40) !important;
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.32) !important;
}

/* 2. CLEAN SANS-SERIF PLATFORM TYPOGRAPHY FOR @USERNAME HANDLES (NO MONOSPACE / AI FONT) */
html body :is(
  #admin-card-uname-badge,
  #profile-header-uname-badge,
  #profile-current-uname-pill,
  #profile-dl-uname,
  #admin-dl-uname-val,
  .sc-uname-pill,
  a[id^="users-row-uname-link-"]
) {
  font-family: var(--font-body, 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
}

/* 3. SIDEBAR CARDS (.side-plan): CRISP WHITE "VIEW PLANS" BUTTON & STRICT PLACEMENT ABOVE LOGOUT CARD */
html body aside.user-sidebar-v2,
html body .workspace-shell aside#app-sidebar.user-sidebar-v2 {
  display: flex !important;
  flex-direction: column !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

html body .user-sidebar-v2 > .user-brand-box {
  flex: 0 0 auto !important;
  order: 1 !important;
}

html body .user-sidebar-v2 > nav.user-sidebar-nav {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 10px !important;
  order: 2 !important;
}

html body .user-sidebar-v2 > .user-sidebar-card-slot {
  flex: 0 0 auto !important;
  order: 3 !important;
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  margin: 6px 10px 8px 10px !important;
  padding: 0 !important;
  z-index: 3 !important;
}

html body .user-sidebar-v2 > .user-sidebar-footer-v2,
html body .workspace-shell .user-sidebar-footer-v2 {
  flex: 0 0 auto !important;
  order: 4 !important;
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 10px 12px 10px !important;
  padding: 8px 12px !important;
  z-index: 3 !important;
}

/* High-Contrast Crisp White Primary Button Inside Dark .side-plan Card (Sidebar & Admin Live Preview) */
html body .side-plan :is(.btn-primary, a.btn-primary, .btn-light, a.btn-light, .side-plan-primary-btn),
html body .sc-mock .side-plan :is(.btn-primary, a.btn-primary, .btn-light, a.btn-light, .side-plan-primary-btn) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid #FFFFFF !important;
  border-radius: 10px !important;
  min-height: 36px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24) !important;
  pointer-events: auto !important;
}

html body .side-plan :is(.btn-primary, a.btn-primary, .btn-light, a.btn-light, .side-plan-primary-btn) :is(span, strong, svg),
html body .sc-mock .side-plan :is(.btn-primary, a.btn-primary, .btn-light, a.btn-light, .side-plan-primary-btn) :is(span, strong, svg) {
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
}

html body .side-plan :is(.btn-primary, a.btn-primary, .btn-light, a.btn-light, .side-plan-primary-btn):hover,
html body .sc-mock .side-plan :is(.btn-primary, a.btn-primary, .btn-light, a.btn-light, .side-plan-primary-btn):hover {
  background: #EEF2FF !important;
  background-color: #EEF2FF !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #C7D2FE !important;
  
}

html body .side-plan :is(.btn-ghost, a.btn-ghost, .side-plan-secondary-btn),
html body .sc-mock .side-plan :is(.btn-ghost, a.btn-ghost, .side-plan-secondary-btn) {
  background: rgba(255, 255, 255, 0.14) !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 10px !important;
  min-height: 36px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

html body .side-plan :is(.btn-ghost, a.btn-ghost, .side-plan-secondary-btn):hover,
html body .sc-mock .side-plan :is(.btn-ghost, a.btn-ghost, .side-plan-secondary-btn):hover {
  background: rgba(255, 255, 255, 0.24) !important;
  background-color: rgba(255, 255, 255, 0.24) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}

/* 4. AI ENGINE (.ai-admin-tabs) & ENTITLEMENTS (.ent-tabs) UNIFIED CLEAN PILL TABS (Fixes image_e42eda.png) */
html body :is(.ai-admin-tabs, .ent-tabs) {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 6px !important;
  background: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1px solid rgba(15, 19, 30, 0.12) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 16px rgba(15, 19, 30, 0.05), inset 0 1px 0 #FFFFFF !important;
}

html body :is(.ai-admin-tabs, .ent-tabs) a {
  border-radius: 9999px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

html body :is(.ai-admin-tabs, .ent-tabs) a:not(.is-active):not(.active):not([aria-current="page"]) {
  background: transparent !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
}

html body :is(.ai-admin-tabs, .ent-tabs) a:not(.is-active):not(.active):not([aria-current="page"]):hover {
  background: #F0F1F4 !important;
  color: #182B9F !important;
  -webkit-text-fill-color: #182B9F !important;
}

html body :is(.ai-admin-tabs, .ent-tabs) a:is(.is-active, .active, [aria-current="page"]),
html body.admin-shell .admin-content :is(.ai-admin-tabs, .ent-tabs) a:is(.is-active, .active, [aria-current="page"]) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 0 !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.20) !important;
}

html body :is(.ai-admin-tabs, .ent-tabs, .pilot-tabs, .admin-tabs-bar, .contact-tabs, .registry-tabs, .fx-tabs, .mx-tabs) a::after,
html body :is(.ai-admin-tabs, .ent-tabs, .pilot-tabs, .admin-tabs-bar, .contact-tabs, .registry-tabs, .fx-tabs, .mx-tabs) a::before {
  content: none !important;
  display: none !important;
}

/* 5. UNIVERSAL FROSTED LIQUID GLASSMORPHISM EVERYWHERE */
html body :is(
  .card:not(.dash-welcome):not(.pilot-hero):not(.side-plan):not(.inv-total-dark-card),
  section.card:not(.dash-welcome):not(.pilot-hero):not(.side-plan),
  article.card:not(.dash-welcome):not(.pilot-hero):not(.side-plan),
  .price-card:not(.highlight),
  .feature-card,
  .step-card,
  .faq-item,
  .stat-card,
  .kpi-card,
  .metric-card,
  .sc-preview-panel,
  .sc-list
) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84) 0%, rgba(246, 249, 255, 0.72) 55%, rgba(238, 243, 255, 0.62) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 18px 42px -14px rgba(15, 23, 42, 0.09), 0 4px 14px -2px rgba(29, 73, 232, 0.06), inset 0 1.5px 0 0 #FFFFFF !important;
}


/* ==========================================================================
   RETRAAK V41 MASTER OVERRIDES:
   1. Seamless Auth Recovery Canvas (Eliminates Top Horizontal Bar on forgot-password.php & reset-password.php - Fixes image_aa123b.png)
   2. Executive Glassmorphic Auth Recovery Layout (.auth-recovery-screen / .auth-recovery-card)
   3. Universal Avatar Circle Centering & 100% Scale (Fixes Pushed-to-the-Side Avatar in pilot/profile.php - Fixes image_aa0ebf.png)
   ========================================================================== */

/* 1. SEAMLESS AUTH PAGE CANVAS - ZERO TOP MARGIN COLLAPSE OR HORIZONTAL BAND */
html body.auth-page,
html body.auth-page > main,
html body.auth-page #main-content {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh !important;
  border: 0 !important;
}

html body.auth-page .site-header,
html body.auth-page header.site-header,
html body.auth-page .site-footer,
html body.auth-page .announcement-bar {
  display: none !important;
}

/* 2. EXECUTIVE PASSWORD RECOVERY & VERIFICATION LAYOUT */
.auth-recovery-screen {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vh, 56px) 20px;
  box-sizing: border-box;
  position: relative;
}

.auth-recovery-container {
  width: 100%;
  max-width: 460px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.auth-recovery-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-recovery-brand:hover {
  
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.12);
}

.auth-recovery-brand .auth-logo-img {
  height: 30px;
  width: auto;
  max-width: 155px;
  object-fit: contain;
}

html body .auth-form-card.auth-recovery-card {
  width: 100% !important;
  max-width: 460px !important;
  margin: 0 !important;
  padding: clamp(28px, 4vw, 38px) clamp(24px, 4vw, 36px) !important;
  border-radius: 24px !important;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 255, 0.84) 100%) !important;
  backdrop-filter: blur(22px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 24px 60px -14px rgba(15, 23, 42, 0.12),
    0 6px 20px -4px rgba(15, 23, 42, 0.05),
    inset 0 1.5px 0 0 #FFFFFF !important;
}

.auth-recovery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-recovery-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0F131E 0%, #1E293B 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 20px -6px rgba(15, 19, 30, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.auth-recovery-top .auth-step-label {
  margin: 0 !important;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15, 19, 30, 0.06);
  border: 1px solid rgba(15, 19, 30, 0.11);
  color: #0F131E !important;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.auth-input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon-wrap .auth-input-icon {
  position: absolute;
  left: 14px;
  color: #64748B;
  pointer-events: none;
  z-index: 2;
}

.auth-input-icon-wrap input {
  padding-left: 42px !important;
  height: 46px !important;
  min-height: 46px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1.5px solid rgba(203, 213, 225, 0.95) !important;
  font-size: 14px !important;
  color: #0F172A !important;
}

.auth-input-icon-wrap input:focus {
  border-color: #0F131E !important;
  box-shadow: 0 0 0 3.5px rgba(15, 19, 30, 0.10) !important;
  background: #FFFFFF !important;
}

.auth-recovery-meta-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: #475569;
  font-size: 12.5px;
  line-height: 1.48;
  text-align: left;
}

.auth-recovery-meta-box svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #0F131E;
}

.auth-recovery-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.auth-recovery-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0F131E !important;
  text-decoration: none !important;
  padding: 6px 12px;
  border-radius: 9px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.auth-back-link:hover {
  background: rgba(15, 19, 30, 0.06);
  
}

/* 3. UNIVERSAL AVATAR CIRCLE CENTERING & 100% CONTAINER FIT (Fixes image_aa0ebf.png) */
html body .avatar-hover-container,
html body .admin-avatar-circle {
  width: 94px !important;
  height: 94px !important;
  min-width: 94px !important;
  min-height: 94px !important;
  max-width: 94px !important;
  max-height: 94px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

html body .admin-avatar-img,
html body #adminAvatarImgPreview,
html body .avatar-preview-img,
html body #avatarImgPreview,
html body .admin-avatar-circle > img,
html body .avatar-hover-container > img {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

html body .user-footer-avatar,
html body .admin-footer-avatar,
html body .profile-btn .avatar,
html body .admin-user-avatar {
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  padding: 0 !important;
}


/* ==========================================================================
   RETRAAK V42 CLIENT TRACKING PORTAL CARD ORDERING & TOP BAR PRECISION
   1. Importance-Based Card Order inside .client-portal-main:
      Hero (#client-dashboard) -> 3 KPI Stat Cards (.client-portal-stats) ->
      Project Details & 4-Step Pipeline (#client-info) ->
      Project Plan & Milestones (#project-plan) ->
      Deliverable Reviews & Action Items (#action-items) ->
      Project Invoices (#client-invoices) ->
      Payment Requests & Submissions (#payment-telemetry) ->
      Bank Details & Payment Report (.client-payment-stage-grid) ->
      Messages with Project Team (#client-messages) ->
      All Workspace Orders (#client-orders)
   2. Top Bar Action Buttons (Project PDF & Digital Invoice) Always Visible & Active
   ========================================================================== */
html body .client-portal-main {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

html body .client-portal-main > .client-portal-hero { order: 1 !important; }
html body .client-portal-main > .client-portal-stats { order: 2 !important; }
html body .client-portal-main > .client-testimonial-request,
html body .client-portal-main > .client-latest-update,
html body .client-portal-main > .toast { order: 3 !important; }
html body .client-portal-main > #client-info,
html body .client-portal-main > .client-project-overview { order: 4 !important; scroll-margin-top: 108px !important; }
html body .client-portal-main > #project-plan { order: 5 !important; scroll-margin-top: 108px !important; }
html body .client-portal-main > #action-items { order: 6 !important; scroll-margin-top: 108px !important; }
html body .client-portal-main > #client-invoices { order: 7 !important; scroll-margin-top: 108px !important; }
html body .client-portal-main > #payment-telemetry { order: 8 !important; margin-top: 0 !important; scroll-margin-top: 108px !important; }
html body .client-portal-main > .client-payment-stage-grid { order: 9 !important; margin-top: 0 !important; scroll-margin-top: 108px !important; }
html body .client-portal-main > #client-messages,
html body .client-portal-main > .client-message-card { order: 10 !important; scroll-margin-top: 108px !important; }
html body .client-portal-main > #client-orders,
html body .client-portal-main > .client-orders-card { order: 11 !important; scroll-margin-top: 108px !important; }

html body .client-tracking-header .client-tracking-header-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

html body .client-tracking-header .header-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}


/* ==========================================================================
   RETRAAK V43 MASTER OVERRIDES:
   1. Distinct Notification / Toast Colors:
      - Success (.toast-ok, [data-toast-type="success"]): Emerald Green (#059669 -> #047857)
      - Failed / Error (.toast-err, [data-toast-type="error"]): Crimson Red (#DC2626 -> #B91C1C)
      - Common / Info (.toast-info, [data-toast-type="info"], default .toast): Obsidian Black (#0F131E -> #1E293B)
      - Warning (.toast-warning, [data-toast-type="warning"]): Warm Amber (#D97706 -> #B45309)
   ========================================================================== */

/* Common / Default / Info Toast -> Executive Black (#0F131E) */
html body .toast-stack .toast,
html body .toast-stack .toast-info,
html body .toast-stack .toast[data-toast-type="info"],
html body .pilot-toasts .pilot-toast {
  background: linear-gradient(135deg, #0F131E 0%, #1E293B 100%) !important;
  background-color: #0F131E !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 18px 42px -12px rgba(15, 19, 30, 0.42) !important;
}

/* Success Toast -> Emerald Green (#059669 -> #047857) */
html body .toast-stack .toast.toast-ok,
html body .toast-stack .toast.toast-success,
html body .toast-stack .toast[data-toast-type="success"],
html body .pilot-toasts .pilot-toast-ok,
html body :is(.app-content, .admin-content) > .toast.toast-ok {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  background-color: #059669 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(167, 243, 208, 0.35) !important;
  box-shadow: 0 18px 42px -12px rgba(5, 150, 105, 0.42) !important;
}

/* Failed / Error Toast -> Crimson Red (#DC2626 -> #B91C1C) */
html body .toast-stack .toast.toast-err,
html body .toast-stack .toast.toast-error,
html body .toast-stack .toast.toast-danger,
html body .toast-stack .toast[data-toast-type="error"],
html body .pilot-toasts .pilot-toast-bad,
html body :is(.app-content, .admin-content) > .toast.toast-err {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%) !important;
  background-color: #DC2626 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(254, 202, 202, 0.35) !important;
  box-shadow: 0 18px 42px -12px rgba(220, 38, 38, 0.42) !important;
}

/* Warning Toast -> Warm Amber (#D97706 -> #B45309) */
html body .toast-stack .toast.toast-warning,
html body .toast-stack .toast.toast-warn,
html body .toast-stack .toast[data-toast-type="warning"] {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
  background-color: #D97706 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(253, 230, 138, 0.35) !important;
  box-shadow: 0 18px 42px -12px rgba(217, 119, 6, 0.40) !important;
}

html body .toast-stack .toast *,
html body .toast-stack .toast .toast-title,
html body .toast-stack .toast .toast-body,
html body .toast-stack .toast strong {
  color: #FFFFFF !important;
}

html body .toast-stack .toast .toast-icon {
  background: rgba(255, 255, 255, 0.20) !important;
  color: #FFFFFF !important;
}

html body .toast-stack .toast .toast-close {
  color: #FFFFFF !important;
  opacity: 0.85 !important;
}

html body .toast-stack .toast .toast-close:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  opacity: 1 !important;
}

html body .toast-stack .toast .pilot-flash-close {
  display: none !important;
}


/* ==========================================================================
   V44 MOBILE HEADER SINGLE SIGN-IN & BLACK PROOF STRIP RESPONSIVE FIXES
   ========================================================================== */
html, body.site, body.site > main, html body.site .proof-strip.futuristic-strip {
  overflow-x: clip !important;
  max-width: 100vw !important;
}
@media (min-width: 961px) {
  html body .site-nav .site-nav-mobile-auth {
    display: none !important;
  }
}
@media (max-width: 960px) {
  html body .site-header .header-actions :is(.header-signin-btn, a.btn-ghost) {
    display: none !important;
  }
  html body .site-nav .site-nav-mobile-auth {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(15, 19, 30, 0.1) !important;
  }
  html body.site .proof-strip.futuristic-strip .proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body.site .proof-strip.futuristic-strip .proof-grid > div:nth-child(2n) {
    border-right: 0 !important;
  }
  html body.site .proof-strip.futuristic-strip .proof-grid > div:nth-child(-n+2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  }
}
@media (max-width: 640px) {
  html body.site .proof-strip.futuristic-strip .proof-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body.site .proof-strip.futuristic-strip .proof-grid > div,
  html body.site .proof-strip.futuristic-strip .proof-grid > div:nth-child(n) {
    border-right: 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    padding: 20px 4px !important;
  }
  html body.site .proof-strip.futuristic-strip .proof-grid > div:last-child {
    border-bottom: 0 !important;
  }
}


/* ==========================================================================
   V45 MAJOR BLACK & WHITE SYSTEM + ACCENT HARMONY & USERNAME PILL FIX
   (Fixes image_705ac0.png & image_70b132.png)
   ========================================================================== */
html body #profile-current-uname-pill {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 10px rgba(15, 19, 30, 0.14) !important;
}

html body #profile-showcase-url-preview {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1.5px solid #CBD5E1 !important;
}

/* Major Primary Buttons: Obsidian Black (#0F131E) with Pure White (#FFFFFF) text */
html body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .btn-brand,
  a.btn-brand,
  .rt-bw-primary-btn
):not(:disabled):not(.price-card.highlight.pay-style-plan .price-cta):not(.welcome-actions *):not(.pilot-hero-actions *):not(.side-plan *):not(.rt-project-completed-banner *) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  border: 1px solid #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(15, 19, 30, 0.16) !important;
}

html body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .btn-brand,
  a.btn-brand,
  .rt-bw-primary-btn
):not(:disabled):not(.price-card.highlight.pay-style-plan .price-cta):not(.welcome-actions *):not(.pilot-hero-actions *):not(.side-plan *):not(.rt-project-completed-banner *) :is(span, strong, small, svg):not(.pill) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  background: transparent !important;
}

html body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .btn-brand,
  a.btn-brand,
  .rt-bw-primary-btn
):not(:disabled):not(.price-card.highlight.pay-style-plan .price-cta):not(.welcome-actions *):not(.pilot-hero-actions *):not(.side-plan *):not(.rt-project-completed-banner *):is(:hover, :focus-visible, :active) {
  background: #1E293B !important;
  background-color: #1E293B !important;
  border-color: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 6px 18px rgba(15, 19, 30, 0.24) !important;
}

/* Major Secondary / Ghost Buttons: Crisp White (#FFFFFF) with Obsidian Black (#0F131E) text */
html body :is(
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .btn-outline
):not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(:disabled):not(.admin-tabs-bar *):not(.registry-tabs *):not(.contact-tabs *):not(.pilot-tabs *):not(.side-plan *) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1.5px solid #CBD5E1 !important;
}

html body :is(
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .btn-outline
):not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(:disabled):not(.admin-tabs-bar *):not(.registry-tabs *):not(.contact-tabs *):not(.pilot-tabs *):not(.side-plan *) :is(span, strong, small):not(.pill) {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  background: transparent !important;
}

html body :is(
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .btn-outline
):not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(:disabled):not(.admin-tabs-bar *):not(.registry-tabs *):not(.contact-tabs *):not(.pilot-tabs *):not(.side-plan *):hover {
  background: #0F131E !important;
  background-color: #0F131E !important;
  border-color: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html body :is(
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .btn-outline
):not(.btn-primary):not(.btn-danger):not(.lead-delete-btn):not(:disabled):not(.admin-tabs-bar *):not(.registry-tabs *):not(.contact-tabs *):not(.pilot-tabs *):not(.side-plan *):hover :is(span, strong, small, svg):not(.pill) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}


/* ==========================================================================
   V50 AUTH GOOGLE ZERO-OUTLINE & TOAST CIRCULAR CLOSE HOVER OVERRIDES
   ========================================================================== */
html body .google-btn,
html body .sb-google-btn,
html body #sb-google,
html body a.google-btn,
.google-btn,
.sb-google-btn {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: #F1F5F9 !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border-radius: 10px !important;
}
html body .google-btn:is(:hover, :focus, :focus-visible, :active),
html body .sb-google-btn:is(:hover, :focus, :focus-visible, :active),
html body #sb-google:is(:hover, :focus, :focus-visible, :active),
html body a.google-btn:is(:hover, :focus, :focus-visible, :active),
.google-btn:is(:hover, :focus, :focus-visible, :active),
.sb-google-btn:is(:hover, :focus, :focus-visible, :active) {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: #E2E8F0 !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
}

/* Toast Close Cross: Fully Circular (50% Radius) on Hover & Default */
html body .toast-stack .toast .toast-close,
html body .toast .toast-close,
html body .toast-close,
html body .toast button.close {
  border-radius: 50% !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color .15s ease, opacity .15s ease, transform .15s ease !important;
}
html body .toast-stack .toast .toast-close:hover,
html body .toast .toast-close:hover,
html body .toast-close:hover,
html body .toast button.close:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #FFFFFF !important;
  opacity: 1 !important;
  border-radius: 50% !important;
  
}

/* Single Crisp Plan Ring (Zero Double-Ring / Inner Border Conflict) + Team Gold Glow */
html body .retraak-plan-ring,
html body .retraak-plan-ring-free,
html body .retraak-plan-ring-pro,
html body .retraak-plan-ring-team,
html body .admin-user-avatar,
html body .avatar-hover-container,
html body .user-footer-avatar,
html body .admin-user-row-avatar {
  border: 0 !important;
  outline: none !important;
}
html body .retraak-plan-ring-free,
html body .avatar-hover-container.retraak-plan-ring-free,
html body .admin-user-avatar.retraak-plan-ring-free,
html body .user-footer-avatar.retraak-plan-ring-free {
  border: 0 !important;
  box-shadow: 0 0 0 2px var(--plan-ring-free, var(--plan-color-free, #CBD5E1)), 0 0 10px color-mix(in srgb, var(--plan-ring-free, var(--plan-color-free, #CBD5E1)) 28%, transparent) !important;
}
html body .retraak-plan-ring-pro,
html body .avatar-hover-container.retraak-plan-ring-pro,
html body .admin-user-avatar.retraak-plan-ring-pro,
html body .user-footer-avatar.retraak-plan-ring-pro {
  border: 0 !important;
  box-shadow: 0 0 0 2.5px var(--plan-ring-pro, var(--plan-color-pro, #1D49E8)), 0 0 12px color-mix(in srgb, var(--plan-ring-pro, var(--plan-color-pro, #1D49E8)) 42%, transparent) !important;
}
html body .retraak-plan-ring-team,
html body img.retraak-plan-ring-team,
html body span.retraak-plan-ring-team,
html body .avatar-hover-container.retraak-plan-ring-team,
html body .admin-user-avatar.retraak-plan-ring-team,
html body .user-footer-avatar.retraak-plan-ring-team {
  border: 0 !important;
  box-shadow: 0 0 0 2.5px var(--plan-ring-team, var(--plan-color-team, #D97706)), 0 0 14px color-mix(in srgb, var(--plan-ring-team, var(--plan-color-team, #D97706)) 48%, transparent) !important;
}

/* Stable High-Performance Card Surfaces for Monitoring, Analytics & Admin Detail Cards */
html body .an-kpi,
html body .an-card,
html body .an-privacy,
html body .pilot-tab-panel .card,
html body .account-detail-grid > div > .card {
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05) !important;
}


/* ==========================================================================
   V862 SEMANTIC EMOTION COLOR SYSTEM (GREEN / RED / AMBER / BLUE / VIOLET)
   ========================================================================== */
html body.admin-shell .pilot-kpi.is-ok .pilot-kpi-value,
html body.admin-shell .pilot-monitor-tile.is-ok .pilot-kpi-value,
html body.admin-shell .pilot-stat.is-ok strong {
  color: #059669 !important;
  -webkit-text-fill-color: #059669 !important;
}
html body.admin-shell .pilot-kpi.is-bad .pilot-kpi-value,
html body.admin-shell .pilot-monitor-tile.is-bad .pilot-kpi-value,
html body.admin-shell .pilot-stat.is-bad strong {
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
}
html body.admin-shell .pilot-kpi.is-warn .pilot-kpi-value,
html body.admin-shell .pilot-monitor-tile.is-warn .pilot-kpi-value,
html body.admin-shell .pilot-stat.is-warn strong {
  color: #D97706 !important;
  -webkit-text-fill-color: #D97706 !important;
}
html body.admin-shell .pilot-kpi.is-info .pilot-kpi-value,
html body.admin-shell .pilot-monitor-tile.is-info .pilot-kpi-value {
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
}
html body.admin-shell .pilot-kpi.is-violet .pilot-kpi-value,
html body.admin-shell .pilot-monitor-tile.is-violet .pilot-kpi-value {
  color: #6D28D9 !important;
  -webkit-text-fill-color: #6D28D9 !important;
}
html body.admin-shell .pilot-delta.is-up,
html body .an-change.up {
  background: #ECFDF5 !important;
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  font-weight: 700 !important;
}
html body.admin-shell .pilot-delta.is-down,
html body .an-change.down {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  font-weight: 700 !important;
}
html body.admin-shell .pilot-delta.is-warn {
  background: #FFFBEB !important;
  color: #B45309 !important;
  -webkit-text-fill-color: #B45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
  font-weight: 700 !important;
}
html body.admin-shell .pilot-fix {
  border-left: 3.5px solid #10B981 !important;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.03)) !important;
  color: #064E3B !important;
}
html body.admin-shell .pilot-fix span {
  color: #047857 !important;
}
html body.admin-shell .pilot-fix a {
  color: #1D49E8 !important;
  font-weight: 800 !important;
}


/* ==========================================================================
   V864 INVOICE PREVIEW COMPACT PROPORTIONS & GLOBAL TABLE TITLE ALIGNMENT
   (Fixes image_214a58.png & image_214a3c.png)
   ========================================================================== */
html body .settings-invoice-studio {
  display: grid !important;
  grid-template-columns: minmax(340px, 1fr) minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start !important;
}
@media (max-width: 1080px) {
  html body .settings-invoice-studio {
    grid-template-columns: 1fr !important;
  }
}
html body .settings-invoice-controls,
html body .settings-invoice-preview {
  padding: 20px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
html body .invoice-preview-switcher {
  display: flex !important;
  flex-wrap: wrap !important;
  overflow-x: visible !important;
  gap: 6px !important;
}
html body .settings-invoice-preview .invoice-rendered-pane {
  max-height: 560px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px !important;
  background: #F8FAFC !important;
}
html body .settings-invoice-preview .retraak-a4-sheet,
html body .admin-invoice-preview-col .retraak-a4-sheet {
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  zoom: 0.78;
  margin: 0 auto !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
  border-radius: 10px !important;
}

/* Global Table Header & Data Cell Alignment Across Admin & User Panels */
html body .analytics-page .an-table th,
html body .analytics-page .an-table td {
  padding: 12px 14px !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}
html body .analytics-page .an-table:not(.an-table-referrals) th:not(:last-child),
html body .analytics-page .an-table:not(.an-table-referrals) td:not(:last-child) {
  text-align: left !important;
}
html body .analytics-page .an-table th:last-child,
html body .analytics-page .an-table td:last-child,
html body .analytics-page .an-table-referrals th:not(:first-child),
html body .analytics-page .an-table-referrals td:not(:first-child) {
  text-align: right !important;
}
html body :is(.admin-content, .app-content) table:not([class*="inv"]) th,
html body :is(.admin-content, .app-content) table:not([class*="inv"]) td {
  vertical-align: middle !important;
}
html body :is(.admin-content, .app-content) table:not([class*="inv"]) th.right,
html body :is(.admin-content, .app-content) table:not([class*="inv"]) td.right {
  text-align: right !important;
}


/* ==========================================================================
   RETRAAK V866 MASTER OVERRIDES:
   1. Invoice Branding Studio: 35% Left Card / 65% Right Invoice Preview (Fixes image_1e845c.png)
   2. Invoice Line-Item Table Header & Cell 100% Alignment, Zero Overlap (Fixes image_1e813c.png)
   3. Google "G" Icon Zero Black Outline on App & Admin Login (Fixes image_1e26e9.png)
   4. All Popup / Modal / Dialog Close Crosses (×): Black Default -> Red on Hover
   5. Rich Semantic Emotion Colors Across User & Admin Panels
   ========================================================================== */

/* 1. Invoice Branding Studio: 35% Left Card / 65% Right Invoice Preview */
html body .settings-invoice-studio {
  display: grid !important;
  grid-template-columns: minmax(290px, 35fr) minmax(0, 65fr) !important;
  gap: 22px !important;
  align-items: start !important;
  width: 100% !important;
}
@media (max-width: 1080px) {
  html body .settings-invoice-studio {
    grid-template-columns: 1fr !important;
  }
}
html body .settings-invoice-controls {
  padding: 20px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
html body .settings-invoice-preview {
  padding: 22px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: visible !important;
}
html body .settings-invoice-preview .invoice-preview-viewport {
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html body .settings-invoice-preview .invoice-rendered-pane {
  max-height: none !important;
  overflow: visible !important;
  padding: 18px !important;
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 14px !important;
}
html body .settings-invoice-preview .retraak-a4-document {
  display: block !important;
  width: 100% !important;
}
html body .settings-invoice-preview .retraak-a4-sheet,
html body .admin-invoice-preview-col .retraak-a4-sheet {
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  zoom: 1 !important;
  margin: 0 auto !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(148, 163, 184, 0.30) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
html body .settings-invoice-preview .retraak-a4-sheet > div,
html body .admin-invoice-preview-col .retraak-a4-sheet > div {
  min-height: auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* 2. Invoice Table Header & Cell Alignment (Prevents display:block collapse in image_1e813c.png) */
html body .retraak-a4-sheet table,
html body .invoice-rendered-pane table,
html body #client-invoices table,
html body #live-preview-container table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  min-width: 0 !important;
}
html body .retraak-a4-sheet table[style*="width:3"],
html body .retraak-a4-sheet table[style*="width:290px"],
html body . invoice-rendered-pane table[style*="width:3"],
html body #client-invoices table[style*="width:3"] {
  width: 310px !important;
  max-width: 100% !important;
  margin-left: auto !important;
}
html body .retraak-a4-sheet thead,
html body .invoice-rendered-pane thead,
html body #client-invoices thead {
  display: table-header-group !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  overflow: visible !important;
}
html body .retraak-a4-sheet tbody,
html body .invoice-rendered-pane tbody,
html body #client-invoices tbody {
  display: table-row-group !important;
}
html body .retraak-a4-sheet tr,
html body .invoice-rendered-pane tr,
html body #client-invoices tr {
  display: table-row !important;
}
html body .retraak-a4-sheet th,
html body .retraak-a4-sheet td,
html body .invoice-rendered-pane th,
html body .invoice-rendered-pane td,
html body #client-invoices th,
html body #client-invoices td {
  display: table-cell !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}
html body .retraak-a4-sheet td::before,
html body .invoice-rendered-pane td::before,
html body #client-invoices td::before {
  content: none !important;
  display: none !important;
}

/* 3. Google "G" Icon Zero Black Outline on App & Admin Login (Fixes image_1e26e9.png) */
html body :is(.google-btn, .sb-google-btn, #sb-google, #sb-admin-google) svg,
html body :is(.google-btn, .sb-google-btn, #sb-google, #sb-admin-google) svg *,
html body svg.sb-google-mark,
html body svg.sb-google-mark * {
  stroke: none !important;
  stroke-width: 0 !important;
  outline: none !important;
  filter: none !important;
}

/* 4. All Popup / Modal / Dialog Close Crosses (×): Black Default (#0F131E) -> Crimson Red (#DC2626) on Hover */
html body :is(
  .dialog-close-btn,
  .modal-close-btn,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .message-drawer-close,
  .client-message-drawer-close,
  .invoice-preview-close,
  #rt-site-bar-dismiss,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  [data-close-modal]:not(.btn)
) {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F131E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 16px 16px !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease !important;
}
html body :is(
  .dialog-close-btn,
  .modal-close-btn,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .message-drawer-close,
  .client-message-drawer-close,
  .invoice-preview-close,
  #rt-site-bar-dismiss,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  [data-close-modal]:not(.btn)
) > * {
  display: none !important;
}
html body :is(
  .dialog-close-btn,
  .modal-close-btn,
  .modal-close-x,
  .popup-close,
  .retraak-ai-close,
  .modal-close,
  .drawer-close,
  .toast-close,
  .rui-confirm-close,
  .fx-dialog-close,
  .checkout-modal-close,
  .message-drawer-close,
  .client-message-drawer-close,
  .invoice-preview-close,
  #rt-site-bar-dismiss,
  button[data-dialog-close]:not(.btn),
  button[data-modal-close]:not(.btn),
  [data-close-modal]:not(.btn)
):is(:hover, :focus-visible, :active) {
  background-color: rgba(220, 38, 38, 0.12) !important;
  border-color: rgba(220, 38, 38, 0.28) !important;
  border-radius: 999px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23DC2626' stroke-width='2.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
  
}


/* ==========================================================================
   RETRAAK V868 GOOGLE MATERIAL 3 / UI-UX DATA TABLE & NUMERIC FORMULA:
   1. Prevent Numeric IDs (#16, #15), Badges, Currencies, Percentages & Dates from Wrapping Mid-Token (Fixes image_132ef4.png)
   2. Enforce Tabular Numerals (font-variant-numeric: tabular-nums) Across All KPIs, Tables, Charts & Calculators
   3. Clean Scannable Table Cell Hierarchy & Responsive Containment
   ========================================================================== */
html body :is(.admin-content, .app-content) .card {
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

html body table th,
html body table td > code:first-child,
html body table td code,
html body .id-pill,
html body .cc-id-badge,
html body .num-badge,
html body .pill,
html body .badge,
html body .status-pill,
html body .an-pill,
html body .kpi-value,
html body .pilot-kpi-value,
html body .vm-val,
html body .dw-stat-data strong,
html body .pilot-stat strong,
html body .user-summary strong {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  font-variant-numeric: tabular-nums !important;
}

html body table td:not(.pilot-wrap) {
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* ==========================================================================
   RETRAAK V880 MASTER UI/UX & STABILITY FIXES:
   1. Recent Projects & Global Data Table Column Spacing (Zero Text Overlap - Fixes image_68ca4b.png)
   2. Global Row & List Hover Padding (Never Covers or Clips Edges - Fixes image_68ce2a.png)
   3. Demo Nudge & Popup Close (×) Top-Right Positioning (Black Default -> Red Hover - Fixes image_68ce2a.png)
   4. Lead 360° Profile & Right-Side Drawers: Clean 560px Width, Full-Bleed Header/Tabs, Single Scrollbar (Fixes image_68c668.png)
   5. Background-Aware Hover Contrast on Demo Banner, Dark Surfaces & Light Surfaces (Fixes image_6865a7.png & image_686585.png)
   6. Zero Dashboard Jitter / Glitch-Free Static Section Cards & Balanced Columns
   ========================================================================== */

/* 1. Recent Projects & Global Data Table Column Spacing (Fixes image_68ca4b.png) */
html body .dashboard-recent-projects table {
  width: 100% !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
}
html body .dashboard-recent-projects th,
html body .dashboard-recent-projects td {
  padding: 12px 14px !important;
  vertical-align: middle !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}
html body .dashboard-recent-projects th:first-child,
html body .dashboard-recent-projects td[data-label="Project"] {
  width: 36% !important;
  min-width: 180px !important;
  white-space: normal !important;
}
html body .dashboard-recent-projects td[data-label="Project"] a,
html body .dashboard-recent-projects td[data-label="Project"] strong {
  display: inline-block !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  line-height: 1.4 !important;
  color: #0F131E !important;
}
html body .dashboard-recent-projects td[data-label="Project"] a:hover strong {
  color: #1D49E8 !important;
}
html body .dashboard-recent-projects th:nth-child(2),
html body .dashboard-recent-projects td[data-label="Client"] {
  width: 22% !important;
  min-width: 120px !important;
  white-space: normal !important;
  color: #334155 !important;
  font-weight: 600 !important;
}
html body .dashboard-recent-projects td[data-label="Status"],
html body .dashboard-recent-projects td[data-label="Due"],
html body .dashboard-recent-projects td[data-label="Total"] {
  white-space: nowrap !important;
}

/* 2. Global List & Table Row Hovers: Proper Inner Cushion So Hovers Never Cover Edges (Fixes image_68ce2a.png) */
html body .dashboard-client-list {
  display: grid !important;
  gap: 4px !important;
}
html body .dashboard-client-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.65) !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background-color 0.16s ease, border-color 0.16s ease !important;
}
html body .dashboard-client-row:last-child {
  border-bottom-color: transparent !important;
}
html body .dashboard-client-row:hover,
html body .dashboard-client-row:focus-visible {
  background: rgba(29, 73, 232, 0.055) !important;
  border-color: rgba(29, 73, 232, 0.16) !important;
  box-shadow: none !important;
  
}

html body .pilot-mini-list li,
html body .pilot-feed li {
  padding: 10px 12px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  transition: background-color 0.15s ease !important;
}
html body .pilot-mini-list li:hover,
html body .pilot-feed li:hover {
  background: rgba(29, 73, 232, 0.045) !important;
}

html body .setup-list li a {
  padding: 8px 10px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}
html body .setup-list li a:hover {
  background: rgba(29, 73, 232, 0.055) !important;
  color: #1D49E8 !important;
}

html body .admin-shell .pilot-legend li {
  padding: 6px 10px !important;
  margin-inline: 0 !important;
  border-radius: 9px !important;
}

html body table:not([class*="inv"]):not([class*="doc"]) tbody tr {
  transition: none !important;
}
html body table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover > td:not(.inv-total-dark-card) {
  background-color: transparent !important;
}
html body table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover > td:first-child,
html body table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover > td:last-child {
  border-radius: 0 !important;
}

/* 3. Demo Floating Nudge & Popup Close (×) Buttons (Fixes image_68ce2a.png) */
html body #rt-demo-float-nudge #rt-demo-nudge-close {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  margin-left: auto !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  flex: 0 0 28px !important;
}

/* 4. Lead 360° Profile & Right-Side Drawers: Clean 560px Width, Full-Bleed Header/Tabs, Single Scrollbar (Fixes image_68c668.png) */
html body .rui-drawer-backdrop:not(.is-open) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html body .rui-drawer-backdrop.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
html body .rui-drawer-panel {
  width: min(560px, 100vw) !important;
  max-width: 100vw !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border-left: 1px solid #E2E8F0 !important;
  border-radius: 20px 0 0 20px !important;
  box-shadow: -20px 0 50px -12px rgba(15, 23, 42, 0.22) !important;
}
html body .rui-drawer-backdrop[id^="dialog-user-"] .rui-drawer-panel,
html body #invoice-drawer-backdrop .rui-drawer-panel {
  width: min(920px, 100vw) !important;
}
html body .rui-drawer-head {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
  padding: 18px 24px !important;
}
html body #lead-drawer-body,
html body .rui-drawer-body[style*="padding:0"],
html body .rui-drawer-body:has(.lead-drawer-content) {
  padding: 0 !important;
  gap: 0 !important;
  background: #FFFFFF !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
html body .lead-drawer-content {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body .lead-drawer-hero {
  padding: 20px 24px !important;
  margin: 0 !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
  border-radius: 0 !important;
}
html body .lead-drawer-tabs-bar {
  padding: 12px 24px !important;
  margin: 0 !important;
  background: #F8FAFC !important;
  border-bottom: 1px solid #E2E8F0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
html body .lead-drawer-tabs-bar .drawer-tab-btn {
  border-radius: 999px !important;
  padding: 6px 16px !important;
  height: 34px !important;
  min-height: 34px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: #FFFFFF !important;
  color: #475569 !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: none !important;
}
html body .lead-drawer-tabs-bar .drawer-tab-btn:hover:not(.is-active) {
  background: #F1F5F9 !important;
  color: #0F131E !important;
  border-color: #94A3B8 !important;
}
html body .lead-drawer-tabs-bar .drawer-tab-btn.is-active {
  background: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #0F131E !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.18) !important;
}
html body .lead-drawer-panes-wrap {
  padding: 22px 24px 28px !important;
  overflow: visible !important;
  max-height: none !important;
}

/* Subtle Neutral Scrollbars Globally (Eliminates Thick Blue Edge Bar in image_68c668.png) */
html {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(15, 23, 42, 0.22) transparent !important;
}
::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}
::-webkit-scrollbar-track {
  background: transparent !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.20) !important;
  border-radius: 999px !important;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.38) !important;
}

/* Ensure all dialog cards pad direct div children after the heading as well as forms */
html body dialog.admin-edit-dialog .admin-edit-dialog-card > div:not(.admin-edit-dialog-heading):not(.modal-card-head):not(.form-actions):not(.sc-dialog-head) {
  box-sizing: border-box !important;
}
html body #registry-doc-preview-modal .admin-edit-dialog-card {
  padding: 22px 26px !important;
}

/* 5. Background-Aware Hover Contrast on Demo Banner, Dark Surfaces & Light Surfaces (Fixes image_6865a7.png & image_686585.png) */
html body .demo-announcement,
html body .announcement-bar {
  background: #0F131E !important;
  color: #FFFFFF !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}
html body .demo-announcement a,
html body .announcement-bar a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 12px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease !important;
}
html body .demo-announcement a:is(:hover, :focus-visible, :active),
html body .announcement-bar a:is(:hover, :focus-visible, :active),
html body .demo-announcement a:is(:hover, :focus-visible, :active) *,
html body .announcement-bar a:is(:hover, :focus-visible, :active) * {
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  text-decoration: none !important;
  
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.22) !important;
}

/* Links inside any dark card/hero/footer never turn dark-blue or black on hover */
html body :is(.dash-welcome, .pilot-hero, .side-plan, .site-footer, .futuristic-cta-band, .price-card.highlight) a:not(.btn):not(.dw-stat-tile):not(.side-plan-primary-btn):hover {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* 6. Zero Dashboard Jitter, Natural Card Heights (No Stretched Cards), Unified Soft-Indigo Hover Everywhere & Bulletproof Dialog Footers (v881) */
html body:is(.workspace-shell, .admin-shell) .card:not(a):not(button):not(.campaigns-live-preview-card):not(.individual-preview-card):not(.outreach-preview):not(.document-preview-card),
html body:is(.workspace-shell, .admin-shell) .card:not(a):not(button):not(.campaigns-live-preview-card):not(.individual-preview-card):not(.outreach-preview):not(.document-preview-card):hover {
  box-shadow: var(--shadow-sm) !important;
  height: auto !important;
  flex: 0 0 auto !important;
}
html body .js [data-stagger] > * {
  animation: none !important;
}
@media (min-width: 1101px) {
  html body .dashboard-shell,
  html body .admin-shell .pilot-grid-main {
    align-items: start !important;
  }
  html body .dashboard-shell > .dashboard-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    align-items: stretch !important;
  }
  html body .dashboard-shell > .dashboard-stack > .card,
  html body .dashboard-shell > .dashboard-stack > .card:last-of-type,
  html body .admin-shell .pilot-grid-main > .card {
    flex: 0 0 auto !important;
    height: auto !important;
  }
}

/* Unified Clean Soft-Indigo Hover Across ALL Interactive Rows, Cards, Quick Actions, Pipeline Items, Setup Checklist & Admin Lists (Fixes image_5e4e9b.png) */
html body .dashboard-client-row,
html body .quick-action,
html body .pipeline-project,
html body .attention-item,
html body .setup-list li a,
html body .pilot-quick a,
html body .pilot-mini-list li,
html body .pilot-feed li,
html body .pilot-legend li,
html body .pilot-health-list li,
html body .message-conversation,
html body .header-message-item,
html body .notif-entry,
html body .velocity-metric-card,
html body .stat-card,
html body .kpi-card {
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease !important;
  box-shadow: none !important;
  transform: none !important;
}

html body .dashboard-client-row:is(:hover, :focus-visible),
html body .quick-action:is(:hover, :focus-visible),
html body .pipeline-project:is(:hover, :focus-visible),
html body .attention-item:is(:hover, :focus-visible),
html body .setup-list li a:is(:hover, :focus-visible),
html body .pilot-quick a:is(:hover, :focus-visible),
html body .pilot-mini-list li:hover,
html body .pilot-feed li:hover,
html body .pilot-legend li:hover,
html body .pilot-health-list li:hover,
html body .message-conversation:is(:hover, :focus-visible),
html body .header-message-item:is(:hover, :focus-visible),
html body .notif-entry:is(:hover, :focus-visible),
html body .velocity-metric-card:is(:hover, :focus-visible),
html body .stat-card:hover,
html body .kpi-card:hover {
  background: rgba(29, 73, 232, 0.055) !important;
  border-color: rgba(29, 73, 232, 0.18) !important;
  box-shadow: none !important;
  
  
}

html body table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover td:not(.inv-total-dark-card) {
  background: rgba(29, 73, 232, 0.035) !important;
}

/* Global Dialog & Popup Card Action Padding Guarantee (Fixes image_5e4a97.png) */
html body dialog[open] .admin-edit-dialog-card,
html body dialog[open] .modal-card {
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}
html body dialog[open] .admin-edit-dialog-card > form[style*="padding:0"],
html body dialog[open] .admin-edit-dialog-card > form[style*="padding: 0"] {
  padding: 0 28px 24px !important;
  margin-top: 0 !important;
  box-sizing: border-box !important;
}
html body dialog[open] .admin-edit-dialog-card .modal-card-body > form .form-actions:last-child,
html body dialog[open] .admin-edit-dialog-card form > .form-actions:last-child {
  padding: 16px 0 4px !important;
  margin: 16px 0 0 !important;
  border-top: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  box-sizing: border-box !important;
}
html body dialog[open] .admin-edit-dialog-card > .form-actions:last-child,
html body dialog[open] .admin-edit-dialog-card > .modal-card-foot:last-child {
  padding: 16px 28px 22px !important;
  margin: 0 !important;
  border-top: 1px solid var(--border) !important;
  box-sizing: border-box !important;
}


/* === FINAL ANTI-GLITCH & CONTRAST ENFORCEMENT === */


/* Stop GPU backdrop-filter flicker and layout shifts on cursor move */
html body .card,
html body .stat-card,
html body .kpi-card,
html body .pilot-kpi,
html body .dashboard-kpi,
html body .velocity-metric-card,
html body .metric-card,
html body .bento-card,
html body .price-card,
html body .pricing-card,
html body .settings-card,
html body .modal-box,
html body .modal-card {
  transform: none !important;
  will-change: auto !important;
  backface-visibility: visible !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}

html body .app-shell .card:not(.workspace-Lock-Banner):not(.Upgrade-Banner-Pro):not(.plan-Banner-Dark):not([style*="#0F131E"]):not([style*="#0B0F1A"]),
html body .pilot-shell .card:not([style*="#0F131E"]):not([style*="#0B0F1A"]),
html body .velocity-metric-card,
html body .pilot-kpi,
html body .dashboard-kpi,
html body .stat-card,
html body .kpi-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body .card:hover,
html body .stat-card:hover,
html body .kpi-card:hover,
html body .pilot-kpi:hover,
html body .dashboard-kpi:hover,
html body .velocity-metric-card:hover,
html body .metric-card:hover,
html body .bento-card:hover,
html body .price-card:hover,
html body .pricing-card:hover {
  
}

/* Prevent table row hover from mutating cell border-radius and triggering table layout reflow */
html body table tbody tr,
html body table tbody tr > td,
html body table tbody tr:hover > td,
html body table tbody tr:hover > td:first-child,
html body table tbody tr:hover > td:last-child {
  border-radius: 0 !important;
  
  transition: background-color 0.1s ease !important;
}

/* Fix Pro Card ("No credit card required · Instant access") text contrast */
html body .price-card.highlight,
html body .pricing-card.featured {
  background: #FFFFFF !important;
  color: #0F131E !important;
}
html body .price-card.highlight .pricing-trial-note,
html body .price-card.highlight .price-card-foot div:not(.btn),
html body .pricing-card.featured .pricing-trial-note {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fix Promo Code Apply Button (#modal-apply-promo-btn) so it is never black-on-black */
html body #modal-apply-promo-btn,
html body .checkout-promo-input-wrap button,
html body .checkout-promo-input-wrap .btn {
  background: #0F131E !important;
  background-color: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}
html body #modal-apply-promo-btn:hover,
html body .checkout-promo-input-wrap button:hover,
html body .checkout-promo-input-wrap .btn:hover {
  background: #1D49E8 !important;
  background-color: #1D49E8 !important;
  border-color: #1D49E8 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}


/* === V906 MASTER APPLE LIQUID GLASSMORPHISM & ZERO-GLITCH GPU COMPOSITOR ARCHITECTURE === */

/* 0. HIDE UN-ADOPTED SERVER TOASTS IMMEDIATELY (ZERO MILLISECOND FLASH ON HARD REFRESH) */
body :not(.toast-stack):not(#retraak-toast-container) > .toast:not(.toast-inline):not([data-toast-inline]),
.auth-form-card .toast:not(.toast-inline):not([data-toast-inline]),
.app-main .toast:not(.toast-inline):not([data-toast-inline]),
.admin-shell .app-main .toast:not(.toast-inline):not([data-toast-inline]) {
  display: none !important;
}
.toast-stack .toast,
#retraak-toast-container .toast {
  display: grid !important;
}

/* 1. FROSTED GLASS DASHBOARD HEADER (.app-topbar) & MARKETING NAVBAR (.site-header) */
html body .app-topbar,
html body .app-main > .app-topbar,
html body:is(.admin-shell, .workspace-shell, .app-shell) > .app-main > .app-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 500 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.90) 0%, rgba(248, 250, 252, 0.86) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  transform: none !important;
  transition: none !important;
}

[data-theme="dark"] html body .app-topbar,
[data-theme="dark"] html body .app-main > .app-topbar,
[data-theme="dark"] html body:is(.admin-shell, .workspace-shell, .app-shell) > .app-main > .app-topbar {
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html body.site .site-header,
html body.site .navbar {
  background: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88) !important;
  box-shadow: 0 8px 24px -14px rgba(15, 23, 42, 0.06) !important;
  transition: none !important;
}

/* 2. TOP-LEVEL APPLE LIQUID GLASS CARDS ACROSS ADMIN, USER, PORTAL & WEBSITE */
html body:is(.admin-shell, .workspace-shell, .app-shell, .portal-shell) :is(
  .card,
  .stat-card,
  .kpi-card,
  .pilot-kpi,
  .dashboard-kpi,
  .pilot-card,
  .pilot-subnav,
  .ops-strip-item,
  .health-card,
  .panel,
  .glass-card,
  .glass-panel,
  .settings-card,
  .profile-card,
  .billing-card,
  .usage-card,
  .plan-card,
  .table-card,
  .data-card,
  .filter-bar,
  .toolbar-card,
  .Quick-Action-Card,
  .metric-card,
  .metric-checkable-card,
  .chart-card,
  .widget-card,
  .empty-state,
  .portal-card,
  .section-card
):not(.dash-welcome):not(.pilot-hero):not(.side-plan):not(.inv-total-dark-card):not(.price-card.highlight) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(244, 247, 255, 0.68) 100%) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow:
    0 12px 32px -8px rgba(15, 23, 42, 0.06),
    0 2px 6px -1px rgba(15, 23, 42, 0.03),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.96) !important;
  transform: none !important;
  translate: none !important;
  scale: none !important;
  will-change: auto !important;
  transition: border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="dark"] html body:is(.admin-shell, .workspace-shell, .app-shell, .portal-shell) :is(
  .card, .stat-card, .kpi-card, .pilot-kpi, .dashboard-kpi, .pilot-card, .panel, .glass-card, .table-card
):not(.dash-welcome):not(.pilot-hero):not(.side-plan):not(.inv-total-dark-card):not(.price-card.highlight) {
  background: rgba(15, 23, 42, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.35), inset 0 1px 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Marketing Website Glass Cards */
html body.site :is(
  .card,
  .feature-card,
  .pricing-card,
  .price-card:not(.highlight),
  .testimonial-card,
  .faq-item,
  .auth-card,
  .login-card,
  .auth-form-card,
  .glass-card,
  .bento-card,
  .stat-box,
  .comparison-card
):not(.highlight) {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow:
    0 12px 32px -8px rgba(15, 23, 42, 0.06),
    0 2px 6px -1px rgba(15, 23, 42, 0.03),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.96) !important;
  transform: none !important;
  transition: border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Sticky Workflow Cards on Marketing Homepage */
html body.site .workflow-step-card {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  transition: none !important;
}

/* 3. CRITICAL GPU COMPOSITOR FIX: PREVENT NESTED BACKDROP-FILTER RENDER SURFACES */
/* Top-level cards, sidebars, headers, and modals have backdrop-filter: blur().
   Any child element nested INSIDE an already-blurred glass parent must NOT create a second nested
   BackdropFilter surface (which causes Chromium/Safari to flicker/glitch on cursor movement). */
html body :is(
  .card,
  .pilot-card,
  .pilot-hero,
  .dash-welcome,
  .sidebar,
  .admin-sidebar,
  .user-sidebar-v2,
  .app-topbar,
  .site-header,
  .modal-card,
  .admin-edit-dialog-card,
  .client-request-dialog-card,
  .checkout-modal-card,
  .rui-confirm-card,
  .popup-card,
  .auth-form-card
) * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Transparent layout wrappers must never have backdrop-filter */
html body :is(.mx-inbox, .app-main, .app-content, .admin-content, .pilot-shell, .modal-overlay, .popup-overlay, dialog::backdrop) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Modal & Dialog Cards get the frosted glass surface while their backdrop overlay uses clean alpha dim */
html body .modal-overlay,
html body .popup-overlay {
  background: rgba(15, 23, 42, 0.42) !important;
}

html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .popup-card) {
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
  transition: none !important;
}
[data-theme="dark"] html body :is(.modal-card, .admin-edit-dialog-card, .client-request-dialog-card, .checkout-modal-card, .rui-confirm-card, .popup-card) {
  background: #0F172A !important;
  border-color: #1E293B !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5) !important;
}

/* 4. UNIFY ADMIN SHELL & USER SHELL SCROLL & SIDEBAR ARCHITECTURE */
html {
  overflow-x: clip !important;
  overflow-y: scroll !important;
  scroll-behavior: auto !important;
}

html body,
html body.site,
html body.app-shell,
html body.admin-shell,
html body.workspace-shell,
html body.portal-shell {
  overflow-x: clip !important;
  overflow-y: visible !important;
  height: auto !important;
  min-height: 100vh !important;
  transform: none !important;
}

html body:is(.admin-shell, .workspace-shell, .app-shell),
html body:is(.admin-shell, .workspace-shell, .app-shell) > .app-main,
html body .app-content,
html body .admin-content,
html body .pilot-shell {
  overflow: visible !important;
  transform: none !important;
  contain: none !important;
}

@media (min-width: 961px) {
  html body.admin-shell > .sidebar,
  html body.app-shell.admin-shell > .sidebar,
  html body.workspace-shell > .sidebar,
  html body.app-shell.workspace-shell > .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: var(--sidebar-w, 264px) !important;
    min-width: var(--sidebar-w, 264px) !important;
    max-width: var(--sidebar-w, 264px) !important;
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 510 !important;
    box-sizing: border-box !important;
    transform: none !important;
    transition: none !important;
  }

  html body.admin-shell > .app-main,
  html body.app-shell.admin-shell > .app-main,
  html body.workspace-shell > .app-main,
  html body.app-shell.workspace-shell > .app-main {
    margin-left: var(--sidebar-w, 264px) !important;
    width: calc(100% - var(--sidebar-w, 264px)) !important;
    max-width: calc(100% - var(--sidebar-w, 264px)) !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    transform: none !important;
  }
}

/* Dark Obsidian Solid Sidebar for Admin */
html body.admin-shell > .sidebar,
html body.admin-shell .admin-sidebar {
  background: #0B0D14 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

/* Crisp Clean Neutral Light Sidebar for User Workspace */
html body.workspace-shell > .sidebar,
html body.workspace-shell .user-sidebar-v2 {
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-right: 1px solid #E2E8F0 !important;
}

html body:is(.admin-shell, .workspace-shell) .sidebar-nav,
html body:is(.admin-shell, .workspace-shell) .nav-scroll {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
}

/* 5. ZERO GEOMETRY SHIFT ON HOVER / ACTIVE (WHILE PRESERVING 50% CENTERING TRANSFORMS) */
*:hover,
*:focus,
*:active,
.active,
.is-active {
  translate: none !important;
  scale: none !important;
}

html body :is(.card, .stat-card, .kpi-card, .pilot-kpi, .dashboard-kpi, .pilot-card, .ops-strip-item, .health-card, .metric-checkable-card, .Quick-Action-Card, .btn, button, a.btn, .nav-item, .sidebar-link, .nav-group-link, .nav-sub-link, .tab-btn, .pilot-subnav a, tr, tbody tr, td, th):hover,
html body :is(.nav-group-link, .nav-sub-link, .sidebar-link, .pilot-subnav a).active {
  transform: none !important;
}

/* Subtle Glass Border Highlight on Card Hover (Zero box-shadow/blur re-rasterization) */
html body:is(.admin-shell, .workspace-shell, .site) :is(.card, .stat-card, .kpi-card, .pilot-kpi, .dashboard-kpi, .pilot-card, .ops-strip-item, .health-card, .metric-checkable-card, .Quick-Action-Card):not(.dash-welcome):not(.pilot-hero):not(.side-plan):hover {
  border-color: rgba(99, 102, 241, 0.35) !important;
}

/* Prevent Admin Chart & Donut SVG Reflows on Hover */
.pilot-donut-center strong,
.pilot-kpi-value,
[data-live-kpi],
[data-live-count] {
  font-variant-numeric: tabular-nums !important;
}

.pilot-donut-seg,
.pilot-donut-seg:hover,
.pilot-donut-seg.is-active {
  stroke-width: 14px !important;
  transform: rotate(-90deg) !important;
  transform-origin: 70px 70px !important;
  transition: opacity 0.15s ease !important;
}


/* === V907 HOVER DATA VIEWER & STATIC INVOICE DOCUMENT PROTECTION === */
html body #retraak-hover-viewer {
  position: fixed !important;
  top: -9999px;
  left: -9999px;
  z-index: 2147483646 !important;
  pointer-events: none !important;
  min-width: 190px !important;
  max-width: 290px !important;
  padding: 11px 14px !important;
  border-radius: 14px !important;
  background: #0F131E !important;
  background-color: #0F131E !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 16px 36px -8px rgba(15, 19, 30, 0.45) !important;
  color: #FFFFFF !important;
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
  will-change: transform, opacity !important;
  transition: opacity 0.12s ease !important;
}
html body #retraak-hover-viewer.is-active {
  opacity: 1 !important;
  visibility: visible !important;
}
html body #retraak-hover-viewer .rhv-kicker {
  display: block !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #60A5FA !important;
  margin-bottom: 3px !important;
}
html body #retraak-hover-viewer .rhv-val {
  display: block !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #FFFFFF !important;
  line-height: 1.25 !important;
}
html body #retraak-hover-viewer .rhv-sub {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.78) !important;
  margin-top: 3px !important;
  line-height: 1.35 !important;
}

/* Invoice Documents & Previews: 100% Static Paper (Never highlight rows or headers on hover) */
html body :is(.retraak-a4-sheet, .retraak-a4-preview-stage, #live-preview-container, .invoice-rendered-pane, .invoice-preview-viewport, #workspace-rendered-invoice-stage, #client-invoices, .invoice-tpl-mini-card) table.inv-doc-table tbody tr:hover,
html body :is(.retraak-a4-sheet, .retraak-a4-preview-stage, #live-preview-container, .invoice-rendered-pane, .invoice-preview-viewport, #workspace-rendered-invoice-stage, #client-invoices, .invoice-tpl-mini-card) table tbody tr:hover {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
html body :is(.retraak-a4-sheet, .retraak-a4-preview-stage, #live-preview-container, .invoice-rendered-pane, .invoice-preview-viewport, #workspace-rendered-invoice-stage, #client-invoices, .invoice-tpl-mini-card) table tbody tr:hover > td:not([style*="background"]),
html body :is(.retraak-a4-sheet, .retraak-a4-preview-stage, #live-preview-container, .invoice-rendered-pane, .invoice-preview-viewport, #workspace-rendered-invoice-stage, #client-invoices, .invoice-tpl-mini-card) table tbody tr:hover > th:not([style*="background"]) {
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


/* === V908 ZERO UNNECESSARY HOVERS ON STATIC CARDS & UNIFIED TRIAL/UPGRADE BUTTONS === */

/* 1. Static containers, cards, KPI tiles, pricing cards, and panels must NOT change border or shadow on hover */
html body :is(
  .card,
  section.card,
  article.card,
  .price-card,
  .price-card.highlight,
  .stat-card,
  .kpi-card,
  .pilot-kpi,
  .dashboard-kpi,
  .pilot-card,
  .ops-strip-item,
  .health-card,
  .panel,
  .panel-card,
  .glass-card,
  .glass-panel,
  .settings-card,
  .profile-card,
  .billing-card,
  .usage-card,
  .plan-card,
  .table-card,
  .data-card,
  .filter-bar,
  .toolbar-card,
  .metric-card,
  .chart-card,
  .widget-card,
  .empty-state,
  .portal-card,
  .section-card,
  .feature-card,
  .pricing-card,
  .testimonial-card,
  .faq-item,
  .workflow-step-card,
  .auth-form-card,
  .bento-card
):not(a):not(button):not([role="button"]):hover {
  border-color: rgba(255, 255, 255, 0.92) !important;
  box-shadow:
    0 12px 32px -8px rgba(15, 23, 42, 0.06),
    0 2px 6px -1px rgba(15, 23, 42, 0.03),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.96) !important;
  transform: none !important;
}

/* Preserve distinct static border colors on Pro & Team pricing cards without hover shifts */
html body .pricing-grid > article.price-card.highlight:hover,
html body .pricing-grid > article.price-card.rt-billing-plan-pro:hover {
  border: 2px solid #1D49E8 !important;
  box-shadow: 0 24px 52px -14px rgba(29, 73, 232, 0.20), 0 6px 18px -4px rgba(29, 73, 232, 0.12), inset 0 1.5px 0 #FFFFFF !important;
}
html body .pricing-grid > article.price-card.rt-billing-plan-team:hover,
html body .pricing-grid > .price-card.price-card-team:hover {
  border: 1.5px solid rgba(217, 119, 6, 0.45) !important;
  box-shadow: 0 20px 44px -14px rgba(217, 119, 6, 0.18), inset 0 1.5px 0 #FFFFFF !important;
}

/* 2. Disable unnecessary table row hover background changes across all static tables & invoice previews */
html body table tbody tr:hover,
html body table tbody tr:hover > td:not(.inv-total-dark-card):not([style*="background"]),
html body table tbody tr:hover > th:not([style*="background"]),
html body .admin-shell table tbody tr:hover,
html body .admin-shell .admin-content table tbody tr:hover {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* 3. UI/UX Standard: Trial Buttons = Crisp White (#FFFFFF), Upgrade Buttons = Obsidian Black (#0F131E) */
html body .rt-trial-btn-white,
html body a.rt-trial-btn-white,
html body button.rt-trial-btn-white {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
  font-weight: 700 !important;
}
html body .rt-trial-btn-white :is(span, strong, svg) {
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  stroke: currentColor !important;
}
html body .rt-trial-btn-white:hover {
  background: #F8FAFC !important;
  background-color: #F8FAFC !important;
  border-color: #94A3B8 !important;
}

html body .rt-upgrade-btn-black,
html body a.rt-upgrade-btn-black,
html body button.rt-upgrade-btn-black {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1.5px solid #0F131E !important;
  box-shadow: 0 8px 20px -6px rgba(15, 19, 30, 0.24) !important;
  font-weight: 700 !important;
}
html body .rt-upgrade-btn-black :is(span, strong, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}
html body .rt-upgrade-btn-black:hover {
  background: #1E293B !important;
  background-color: #1E293B !important;
  border-color: #1E293B !important;
}

/* Consistent neutral lock icon in .checkout-secure */
html body .checkout-secure,
html body .checkout-secure svg {
  color: #64748B !important;
  stroke: #64748B !important;
}

/* Universal Profile Avatars & Initials Unification (36px Circular #0F131E Obsidian Charcoal) */
html body .avatar:not(.avatar-hover-container):not(.admin-avatar-circle),
html body .user-card-avatar,
html body .user-card-avatar-initials,
html body .user-footer-avatar,
html body .admin-sidebar-profile .avatar,
html body .profile-btn .avatar,
html body .admin-footer-avatar,
html body .admin-user-row-avatar,
html body .admin-user-avatar:not(.admin-avatar-circle) {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
}

html body .avatar:not(img):not(.avatar-hover-container):not(.admin-avatar-circle):not([hidden]),
html body .user-footer-avatar-initials:not([hidden]),
html body .user-card-avatar-initials:not([hidden]),
html body .admin-footer-avatar-initials:not([hidden]),
html body .avatar-fallback-span:not(.admin-avatar-circle):not([hidden]),
html body .admin-avatar-initial:not(.admin-avatar-circle):not([hidden]),
html body .admin-user-row-avatar-fallback:not([hidden]) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}



/* ==========================================================================
   PILOT INVOICE TEMPLATES & CARD HOVER STABILITY
   ========================================================================== */

/* Prominent Active Invoice Template Tab Button */
html body .template-nav-scroll :is(a.active, a.is-active, a[aria-current="page"], a[aria-selected="true"]) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1.5px solid #0F131E !important;
  box-shadow: 0 4px 14px rgba(15, 19, 30, 0.28) !important;
  font-weight: 800 !important;
}

html body .template-nav-scroll :is(a.active, a.is-active, a[aria-current="page"], a[aria-selected="true"]) :is(span, strong, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

[data-theme="dark"] html body .template-nav-scroll :is(a.active, a.is-active, a[aria-current="page"], a[aria-selected="true"]) {
  background: #1D49E8 !important;
  background-color: #1D49E8 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1.5px solid #3B82F6 !important;
  box-shadow: 0 4px 16px rgba(29, 73, 232, 0.45) !important;
}

[data-theme="dark"] html body .template-nav-scroll :is(a.active, a.is-active, a[aria-current="page"], a[aria-selected="true"]) :is(span, strong, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

/* Inactive Invoice Template Tab Buttons */
html body .template-nav-scroll a:not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]) {
  background: rgba(255, 255, 255, 0.85) !important;
  background-color: rgba(255, 255, 255, 0.85) !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border: 1px solid rgba(148, 163, 184, 0.4) !important;
  font-weight: 600 !important;
}

html body .template-nav-scroll a:not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]):hover {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border-color: rgba(15, 19, 30, 0.3) !important;
}

[data-theme="dark"] html body .template-nav-scroll a:not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]) {
  background: rgba(30, 41, 59, 0.6) !important;
  background-color: rgba(30, 41, 59, 0.6) !important;
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  border-color: rgba(51, 65, 85, 0.7) !important;
}

[data-theme="dark"] html body .template-nav-scroll a:not(.active):not(.is-active):not([aria-current="page"]):not([aria-selected="true"]):hover {
  background: rgba(51, 65, 85, 0.8) !important;
  background-color: rgba(51, 65, 85, 0.8) !important;
  color: #F8FAFC !important;
  -webkit-text-fill-color: #F8FAFC !important;
}

/* Prevent Table Cell Hover Geometry Shifts */
.workspace-shell tbody tr:hover td:first-child,
.admin-shell tbody tr:hover td:first-child,
.users-table-card tbody tr:hover td:first-child,
.workspace-shell tbody tr:hover td:last-child,
.admin-shell tbody tr:hover td:last-child,
.users-table-card tbody tr:hover td:last-child,
table tbody tr:hover > td:first-child,
table tbody tr:hover > td:last-child {
  border-radius: 0 !important;
}

/* Donut Chart Segments Smooth Hover State */
.pilot-donut-seg.is-dimmed {
  opacity: 0.45 !important;
}
.pilot-donut-seg.is-active {
  opacity: 1 !important;
}

/* Card & Table Stability on Hover */
html body:is(.admin-shell, .workspace-shell, .app-shell) :is(.card, .stat-card, .kpi-card, .pilot-kpi, .dashboard-kpi, .pilot-card, .ops-strip-item, .health-card, .metric-checkable-card, .Quick-Action-Card, table, tr, td):hover {
  transform: none !important;
  translate: none !important;
  scale: none !important;
}

/* Table Rows Zero Repaints Inside Blurred Cards on Hover */
html body table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover,
html body table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover > td,
html body table:not([class*="inv"]):not([class*="doc"]) tbody tr:hover > th,
html body:is(.admin-shell, .workspace-shell, .app-shell) tbody tr:hover,
html body:is(.admin-shell, .workspace-shell, .app-shell) tbody tr:hover > td,
html body:is(.admin-shell, .workspace-shell, .app-shell) tbody tr:hover > th {
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  transform: none !important;
  transition: none !important;
}

/* Pilot Project Name Link Hover (Zero Inline JS Style Mutations) */
.pilot-project-name-link:hover {
  color: #1D49E8 !important;
}

/* ==========================================================================
   INVOICE TEMPLATES TAB BUTTONS (PROMINENT ACTIVE PILL)
   ========================================================================== */
.template-nav-scroll .template-tab-active,
.template-nav-scroll a.template-tab-active,
.template-nav-scroll a[aria-current="page"],
.template-nav-scroll a.is-active,
.template-nav-scroll a.active {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(15, 19, 30, 0.4) !important;
  box-shadow: 0 4px 14px rgba(15, 19, 30, 0.22) !important;
  font-weight: 700 !important;
}

.template-nav-scroll .template-tab-active svg,
.template-nav-scroll a.template-tab-active svg,
.template-nav-scroll a[aria-current="page"] svg,
.template-nav-scroll a.is-active svg {
  stroke: #FFFFFF !important;
  color: #FFFFFF !important;
}

.template-nav-scroll .template-tab-inactive,
.template-nav-scroll a.template-tab-inactive {
  background: rgba(255, 255, 255, 0.72) !important;
  background-color: rgba(255, 255, 255, 0.72) !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border: 1px solid rgba(15, 19, 30, 0.12) !important;
  box-shadow: none !important;
}

.template-nav-scroll a.template-tab-inactive:hover {
  background: rgba(241, 245, 249, 0.95) !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border-color: rgba(15, 19, 30, 0.22) !important;
}

/* Dark theme active template tab */
[data-theme="dark"] .template-nav-scroll .template-tab-active,
[data-theme="dark"] .template-nav-scroll a.template-tab-active,
[data-theme="dark"] .template-nav-scroll a[aria-current="page"],
[data-theme="dark"] .template-nav-scroll a.is-active,
[data-theme="dark"] .template-nav-scroll a.active {
  background: #1D49E8 !important;
  background-color: #1D49E8 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 14px rgba(29, 73, 232, 0.4) !important;
}

[data-theme="dark"] .template-nav-scroll .template-tab-inactive,
[data-theme="dark"] .template-nav-scroll a.template-tab-inactive {
  background: rgba(255, 255, 255, 0.05) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .template-nav-scroll a.template-tab-inactive:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* ==========================================================================
   PILOT 8 KPI CARDS PERMANENT TOP SIGNATURE ACCENTS (ZERO HOVER DELAY)
   ========================================================================== */
.admin-shell .pilot-kpis .pilot-kpi {
  position: relative !important;
  overflow: hidden !important;
}

.admin-shell .pilot-kpis .pilot-kpi::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3.5px !important;
  border-radius: 16px 16px 0 0 !important;
  opacity: 1 !important;
  display: block !important;
  z-index: 5 !important;
  transition: opacity 0.15s ease !important;
}

/* Individual Signature Gradients */
.admin-shell .pilot-kpis .pilot-kpi.is-mrr::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(1)::before {
  background: linear-gradient(90deg, #6366F1, #8B5CF6) !important;
}
.admin-shell .pilot-kpis .pilot-kpi.is-subs::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(2)::before {
  background: linear-gradient(90deg, #2563EB, #3B82F6) !important;
}
.admin-shell .pilot-kpis .pilot-kpi.is-signups::before,
.admin-shell .pilot-kpis .pilot-kpi.is-cyan::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(3)::before {
  background: linear-gradient(90deg, #0284C7, #0EA5E9) !important;
}
.admin-shell .pilot-kpis .pilot-kpi.is-churn::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(4)::before {
  background: linear-gradient(90deg, #059669, #10B981) !important;
}
.admin-shell .pilot-kpis .pilot-kpi.is-ai::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(5)::before {
  background: linear-gradient(90deg, #7C3AED, #A855F7) !important;
}
.admin-shell .pilot-kpis .pilot-kpi.is-emails::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(6)::before {
  background: linear-gradient(90deg, #E11D48, #F43F5E) !important;
}
.admin-shell .pilot-kpis .pilot-kpi.is-errors::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(7)::before {
  background: linear-gradient(90deg, #DC2626, #EF4444) !important;
}
.admin-shell .pilot-kpis .pilot-kpi.is-inbox::before,
.admin-shell .pilot-kpis .pilot-kpi:nth-child(8)::before {
  background: linear-gradient(90deg, #059669, #10B981) !important;
}

/* ==========================================================================
   WORKSPACE DASHBOARD HERO FULL-WIDTH EXPANSION (WHEN NO ACTIVE ATTENTION)
   ========================================================================== */
.dash-hero.is-full-width,
.dash-hero:not(.has-attention),
.dash-hero:not(:has(.attention-card)),
.dash-hero:not(:has(.attention-list)) {
  grid-template-columns: minmax(0, 1fr) !important;
}

.dash-hero.is-full-width .dash-welcome,
.dash-hero:not(.has-attention) .dash-welcome,
.dash-hero:not(:has(.attention-card)) .dash-welcome,
.dash-hero:not(:has(.attention-list)) .dash-welcome {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* ==========================================================================
   APPLE-GRADE MICRO-ANIMATIONS ON ACTIONS
   ========================================================================== */
button:active:not(:disabled),
.btn:active:not(:disabled),
a.btn:active,
.tab-btn:active,
.pilot-chip:active {
  transform: scale(0.975) !important;
  transition: transform 0.08s ease-out !important;
}

@keyframes rtkModalSpringIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  60% {
    opacity: 1;
    transform: scale(1.006) translateY(-1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-overlay.open .modal-card,
.modal-overlay.is-open .modal-card,
dialog[open] .modal-card,
.popup-card.open {
  animation: rtkModalSpringIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes rtkDropdownSlideFade {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-menu.open,
.menu-popover.open,
.topbar-popover.open {
  animation: rtkDropdownSlideFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes rtkToastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-stack .toast,
#retraak-toast-container .toast {
  animation: rtkToastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}


/* ==========================================================================
   HERO ACTIONS BUTTON SYSTEM (WORKSPACE & PILOT)
   Must maintain strict contrast: Primary = Crisp White; Secondary = Frosted Glass Pill
   ========================================================================== */
html body .dash-welcome .welcome-actions .btn-primary,
html body .dash-welcome .welcome-actions button.btn-primary,
html body .dash-welcome .welcome-actions a.btn-primary,
html body .dash-welcome button.btn-primary,
html body .dash-welcome a.btn-primary {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body .dash-welcome .welcome-actions .btn-primary:hover,
html body .dash-welcome .welcome-actions button.btn-primary:hover,
html body .dash-welcome .welcome-actions a.btn-primary:hover,
html body .dash-welcome button.btn-primary:hover,
html body .dash-welcome a.btn-primary:hover {
  background: #F8FAFC !important;
  background-color: #F8FAFC !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #F8FAFC !important;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

html body .dash-welcome .welcome-actions .btn-primary svg,
html body .dash-welcome .welcome-actions button.btn-primary svg,
html body .dash-welcome .welcome-actions a.btn-primary svg {
  stroke: #0F172A !important;
}

html body .dash-welcome .welcome-actions .btn-primary:hover svg,
html body .dash-welcome .welcome-actions button.btn-primary:hover svg,
html body .dash-welcome .welcome-actions a.btn-primary:hover svg {
  stroke: #1D49E8 !important;
}

html body .dash-welcome .welcome-actions :is(.btn-ghost, .btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)) {
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body .dash-welcome .welcome-actions :is(.btn-ghost, .btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)):hover {
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

html body .dash-welcome .welcome-actions :is(.btn-ghost, .btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)) svg {
  stroke: #FFFFFF !important;
}

/* Admin Hero (.pilot-hero) Primary = Pure White CTA, Secondary = Frosted Pill */
html body.admin-shell .pilot-hero-actions .btn-primary,
html body.admin-shell .pilot-hero .btn-primary,
html body.admin-shell .pilot-hero-actions a.btn-primary,
html body.admin-shell .pilot-hero-actions button.btn-primary {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #0B0C12 !important;
  -webkit-text-fill-color: #0B0C12 !important;
  border: 1px solid #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25) !important;
  font-weight: 700 !important;
  padding: 9px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body.admin-shell .pilot-hero-actions .btn-primary:hover,
html body.admin-shell .pilot-hero .btn-primary:hover,
html body.admin-shell .pilot-hero-actions a.btn-primary:hover,
html body.admin-shell .pilot-hero-actions button.btn-primary:hover {
  background: #F8FAFC !important;
  background-color: #F8FAFC !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.38) !important;
}

html body.admin-shell .pilot-hero-actions .btn-primary svg,
html body.admin-shell .pilot-hero-actions a.btn-primary svg {
  stroke: #0B0C12 !important;
}

html body.admin-shell .pilot-hero-actions .btn-primary:hover svg,
html body.admin-shell .pilot-hero-actions a.btn-primary:hover svg {
  stroke: #1D49E8 !important;
}

html body.admin-shell .pilot-hero-actions :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)),
html body.admin-shell .pilot-hero :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)) {
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  padding: 9px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body.admin-shell .pilot-hero-actions :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)):hover,
html body.admin-shell .pilot-hero :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)):hover {
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

html body.admin-shell .pilot-hero-actions :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)) svg {
  stroke: #FFFFFF !important;
}

/* ==========================================================================
   V930 DEFINITIVE ARCHITECTURAL OVERRIDES (2-ID SPECIFICITY GUARANTEE)
   1. Hover Data Viewer (#retraak-hover-viewer): Smooth Left/Top Positioning (Never Trapped at Top-Left)
   2. Universal 1:1 Circular Profile Pictures & Initials Avatars (Never Stretched into Ovals)
   3. Apple Liquid Glassmorphism on All Cards, Stats, KPIs, Topbars, Sidebars & Notification Rows
   4. Global Search & Filter Bars: Single-Row Desktop Alignment & High-Contrast Primary Search Button
   5. Hero Action Buttons (.pilot-hero-actions & .welcome-actions): Pure White Primary + Frosted Glass Secondary
   6. Icon-Only Delete/Remove Buttons (.pilot-icon-btn, .rt-red-cross-btn) & Destructive Text Buttons
   ========================================================================== */

/* 1. Hover Data Viewer (#retraak-hover-viewer): Never Pinned to (0,0) */
html body:not(#_a):not(#_b) #retraak-hover-viewer {
  position: fixed !important;
  z-index: 2147483646 !important;
  pointer-events: none !important;
  min-width: 195px !important;
  max-width: 295px !important;
  padding: 11px 14px !important;
  border-radius: 14px !important;
  background: rgba(15, 19, 30, 0.96) !important;
  background-color: rgba(15, 19, 30, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 18px 40px -10px rgba(15, 19, 30, 0.45) !important;
  color: #FFFFFF !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: none !important;
  transition: opacity 0.12s ease !important;
}
html body:not(#_a):not(#_b) #retraak-hover-viewer.is-active {
  opacity: 1 !important;
  visibility: visible !important;
}

/* 2. Universal 1:1 Circular Profile Pictures & Initials Avatars Globally */
html body:not(#_a):not(#_b) :is(
  .avatar:not(.avatar-hover-container):not(.admin-avatar-circle):not(.admin-user-avatar):not(.sc-avatar),
  img.avatar:not(.admin-user-avatar):not(.sc-avatar),
  .avatar-img,
  .user-card-avatar,
  .user-card-avatar-initials,
  .user-footer-avatar,
  .user-footer-avatar-initials,
  .admin-sidebar-profile .avatar,
  .profile-btn .avatar,
  .admin-footer-avatar,
  .admin-footer-avatar-initials
) {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  flex: 0 0 36px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Admin Users Directory Row Avatars (pilot/users.php): Strictly 38x38 Circular */
html body:not(#_a):not(#_b) :is(
  .admin-user-row-avatar,
  img.admin-user-row-avatar,
  .admin-user-row-avatar-fallback,
  span.admin-user-row-avatar-fallback
) {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  flex: 0 0 38px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Admin Single User Inspection Profile Header Avatar (pilot/user.php): Strictly 84x84 Circular */
html body:not(#_a):not(#_b) :is(
  .admin-user-avatar,
  img.admin-user-avatar,
  span.admin-user-avatar
) {
  width: 84px !important;
  height: 84px !important;
  min-width: 84px !important;
  min-height: 84px !important;
  max-width: 84px !important;
  max-height: 84px !important;
  flex: 0 0 84px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Workspace Profile Page Avatar (app/profile.php): Strictly 96x96 Circular */
html body:not(#_a):not(#_b) .avatar-hover-container {
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  min-height: 96px !important;
  max-width: 96px !important;
  max-height: 96px !important;
  flex: 0 0 96px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}
html body:not(#_a):not(#_b) :is(.avatar-preview-img, .avatar-fallback-span) {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Admin Profile Page Avatar (pilot/profile.php): Strictly 94x94 Circular */
html body:not(#_a):not(#_b) .admin-avatar-circle {
  width: 94px !important;
  height: 94px !important;
  min-width: 94px !important;
  min-height: 94px !important;
  max-width: 94px !important;
  max-height: 94px !important;
  flex: 0 0 94px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}
html body:not(#_a):not(#_b) :is(.admin-avatar-img, .admin-avatar-initial) {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Public Showcase, Activity Feed, Campaigns CRM, Inbox & Kanban Avatars: Strictly 1:1 Circular */
html body:not(#_a):not(#_b) :is(
  .sc-avatar,
  .activity-avatar-img,
  .activity-avatar-placeholder,
  .crm-avatar,
  .crm-avatar-img,
  .dashboard-client-avatar,
  .kanban-avatar,
  .message-conversation-avatar,
  .message-thread-avatar,
  .mx-avatar,
  .fx-public-avatar,
  .tm-reviewer-avatar
) {
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

/* 3. Apple Liquid Glassmorphism Across All Cards, Stats, KPIs, Topbars, Sidebars & Notification Rows */
html body:not(#_a):not(#_b) :is(.app-topbar, header.site-header) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(248, 250, 252, 0.78) 100%) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.90) !important;
}

html body:not(#_a):not(#_b) .sidebar.user-sidebar-v2 {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(248, 250, 252, 0.80) 100%) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border-right: 1px solid rgba(226, 232, 240, 0.90) !important;
}

html body:not(#_a):not(#_b) :is(
  .card,
  .pilot-card,
  .pilot-kpi,
  .dashboard-kpi,
  .stat-card,
  .kpi-card,
  .task-stat,
  .myday-stat,
  .myday-panel,
  .project-stat,
  .activity-stat-box,
  .sent-kpi-card,
  .export-card,
  .outreach-card,
  .ent-card,
  .int-card,
  .ps-summary-tile,
  .velocity-metric-card,
  .crm-kpi-card,
  .registry-kpi,
  .an-kpi,
  .an-card,
  .an-privacy,
  .admin-filter-card,
  .user-filter-card,
  .notif-row,
  .notif-row.notif-unread,
  .ops-strip-item,
  .health-card,
  .panel,
  .glass,
  .glass-card,
  .glass-panel,
  .glass-effect,
  .glass-strong,
  .futuristic-card,
  .mx-card,
  .settings-card,
  .profile-card,
  .billing-card,
  .usage-card,
  .plan-card,
  .table-card,
  .data-card,
  .toolbar-card,
  .Quick-Action-Card,
  .quick-action,
  .metric-card,
  .metric-checkable-card,
  .chart-card,
  .widget-card,
  .portal-card,
  .section-card,
  .feature-card,
  .pricing-card:not(.featured):not(.highlight),
  .price-card:not(.highlight),
  .testimonial-card,
  .faq-item,
  .bento-card,
  .stat-box,
  .comparison-card,
  .workflow-step-card,
  .auth-card,
  .login-card,
  .auth-form-card,
  .plans-save-bar
):not(:where(.dash-welcome, .pilot-hero, .side-plan, .inv-total-dark-card, .price-card.highlight, [style*="#0F131E"], [style*="#0B0F1A"])) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84) 0%, rgba(244, 247, 255, 0.72) 100%) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03), inset 0 1px 1px 0 rgba(255, 255, 255, 0.96) !important;
  transform: translateZ(0);
}

html body:not(#_a):not(#_b) .notif-row.notif-unread {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.90) 0%, rgba(238, 244, 255, 0.78) 100%) !important;
  border: 1.5px solid rgba(29, 73, 232, 0.24) !important;
}

/* 4. Global Search & Filter Forms: Single-Row Desktop Alignment & High-Contrast Primary Search Button */
@media (min-width: 721px) {
  html body:not(#_a):not(#_b) :is(
    .task-filter,
    .project-search-form,
    .activity-filters-form,
    .crm-search-bar,
    .ent-search,
    .admin-filter-bar,
    .user-filter-form,
    .mx-inbox-filters form[role="search"]
  ) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
  }
  html body:not(#_a):not(#_b) .task-filter select {
    width: 170px !important;
    max-width: 170px !important;
    flex: 0 0 170px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
  }
  html body:not(#_a):not(#_b) .task-filter input[type="search"] {
    width: 260px !important;
    max-width: 320px !important;
    flex: 0 1 280px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
  }
}

html body:not(#_a):not(#_b) :is(
  .task-filter,
  .project-search-form,
  .activity-filters-form,
  .fx-toolbar,
  .crm-search-bar,
  .ent-search,
  .admin-filter-bar,
  .user-filter-form,
  .admin-orders-search,
  .mx-inbox-filters form[role="search"],
  form[method="get"]:not(.registry-search)
) :is(button[type="submit"], input[type="submit"]):not(.btn-danger):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(15, 19, 30, 0.16) !important;
  cursor: pointer !important;
}
html body:not(#_a):not(#_b) :is(
  .task-filter,
  .project-search-form,
  .activity-filters-form,
  .fx-toolbar,
  .crm-search-bar,
  .ent-search,
  .admin-filter-bar,
  .user-filter-form,
  .admin-orders-search,
  .mx-inbox-filters form[role="search"],
  form[method="get"]:not(.registry-search)
) :is(button[type="submit"], input[type="submit"]):not(.btn-danger):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn) :is(span, strong, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}
html body:not(#_a):not(#_b) :is(
  .task-filter,
  .project-search-form,
  .activity-filters-form,
  .fx-toolbar,
  .crm-search-bar,
  .ent-search,
  .admin-filter-bar,
  .user-filter-form,
  .admin-orders-search,
  .mx-inbox-filters form[role="search"],
  form[method="get"]:not(.registry-search)
) :is(button[type="submit"], input[type="submit"]):not(.btn-danger):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn):hover {
  background: #1D49E8 !important;
  background-color: #1D49E8 !important;
  border-color: #1D49E8 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(29, 73, 232, 0.25) !important;
}

/* 5. Hero Buttons: 2-ID Specificity (:not(#_a):not(#_b)) Beats Every Global .btn-primary / .btn Rule */
html body:not(#_a):not(#_b) .dash-welcome .welcome-actions :is(.btn-primary, a.btn-primary, button.btn-primary) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #FFFFFF !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}
html body:not(#_a):not(#_b) .dash-welcome .welcome-actions :is(.btn-primary, a.btn-primary, button.btn-primary) :is(span, strong, svg) {
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  stroke: #0F172A !important;
}
html body:not(#_a):not(#_b) .dash-welcome .welcome-actions :is(.btn-primary, a.btn-primary, button.btn-primary):hover {
  background: #F8FAFC !important;
  background-color: #F8FAFC !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #FFFFFF !important;
}
html body:not(#_a):not(#_b) .dash-welcome .welcome-actions :is(.btn-primary, a.btn-primary, button.btn-primary):hover :is(span, strong, svg) {
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  stroke: #1D49E8 !important;
}

html body:not(#_a):not(#_b) .dash-welcome .welcome-actions :is(.btn:not(.btn-primary), .btn-ghost, a:not(.btn-primary), button:not(.btn-primary)) {
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}
html body:not(#_a):not(#_b) .dash-welcome .welcome-actions :is(.btn:not(.btn-primary), .btn-ghost, a:not(.btn-primary), button:not(.btn-primary)) :is(span, strong, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}
html body:not(#_a):not(#_b) .dash-welcome .welcome-actions :is(.btn:not(.btn-primary), .btn-ghost, a:not(.btn-primary), button:not(.btn-primary)):hover {
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html body.admin-shell:not(#_a):not(#_b) .pilot-hero-actions :is(.btn-primary, a.btn-primary, button.btn-primary),
html body.admin-shell:not(#_a):not(#_b) .pilot-hero :is(.btn-primary, a.btn-primary, button.btn-primary) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0B0C12 !important;
  -webkit-text-fill-color: #0B0C12 !important;
  border: 1px solid #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25) !important;
  font-weight: 700 !important;
  padding: 9px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
}
html body.admin-shell:not(#_a):not(#_b) .pilot-hero-actions :is(.btn-primary, a.btn-primary, button.btn-primary) :is(span, strong, svg),
html body.admin-shell:not(#_a):not(#_b) .pilot-hero :is(.btn-primary, a.btn-primary, button.btn-primary) :is(span, strong, svg) {
  color: #0B0C12 !important;
  -webkit-text-fill-color: #0B0C12 !important;
  stroke: #0B0C12 !important;
}
html body.admin-shell:not(#_a):not(#_b) .pilot-hero-actions :is(.btn-primary, a.btn-primary, button.btn-primary):hover,
html body.admin-shell:not(#_a):not(#_b) .pilot-hero :is(.btn-primary, a.btn-primary, button.btn-primary):hover {
  background: #F8FAFC !important;
  background-color: #F8FAFC !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.38) !important;
}
html body.admin-shell:not(#_a):not(#_b) .pilot-hero-actions :is(.btn-primary, a.btn-primary, button.btn-primary):hover :is(span, strong, svg),
html body.admin-shell:not(#_a):not(#_b) .pilot-hero :is(.btn-primary, a.btn-primary, button.btn-primary):hover :is(span, strong, svg) {
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  stroke: #1D49E8 !important;
}

html body.admin-shell:not(#_a):not(#_b) .pilot-hero-actions :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)),
html body.admin-shell:not(#_a):not(#_b) .pilot-hero :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)) {
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  padding: 9px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
}
html body.admin-shell:not(#_a):not(#_b) .pilot-hero-actions :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)) :is(span, strong, svg),
html body.admin-shell:not(#_a):not(#_b) .pilot-hero :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)) :is(span, strong, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}
html body.admin-shell:not(#_a):not(#_b) .pilot-hero-actions :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)):hover,
html body.admin-shell:not(#_a):not(#_b) .pilot-hero :is(.btn:not(.btn-primary), a:not(.btn-primary), button:not(.btn-primary)):hover {
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* 6. Icon-Only Delete / Remove / Clear Buttons & Destructive Text Buttons */
html body:not(#_a):not(#_b) :is(
  .pilot-icon-btn,
  button.pilot-icon-btn,
  .rt-red-cross-btn,
  button.rt-red-cross-btn,
  .ai-route-actions button[data-move="remove"],
  .notif-actions button[title*="Delete" i],
  button.icon-btn[title*="Delete" i],
  button.icon-btn[title*="Remove" i]
) {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  border-radius: 9px !important;
  background: rgba(254, 226, 226, 0.92) !important;
  background-color: rgba(254, 226, 226, 0.92) !important;
  background-image: none !important;
  border: 1px solid #FCA5A5 !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}

html body:not(#_a):not(#_b) :is(
  .pilot-icon-btn,
  button.pilot-icon-btn,
  .rt-red-cross-btn,
  button.rt-red-cross-btn,
  .ai-route-actions button[data-move="remove"],
  .notif-actions button[title*="Delete" i],
  button.icon-btn[title*="Delete" i],
  button.icon-btn[title*="Remove" i]
) > svg {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  flex: 0 0 15px !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  stroke: #DC2626 !important;
  color: #DC2626 !important;
  fill: none !important;
  pointer-events: none !important;
}

html body:not(#_a):not(#_b) :is(
  .pilot-icon-btn,
  button.pilot-icon-btn,
  .rt-red-cross-btn,
  button.rt-red-cross-btn,
  .ai-route-actions button[data-move="remove"],
  .notif-actions button[title*="Delete" i],
  button.icon-btn[title*="Delete" i],
  button.icon-btn[title*="Remove" i]
):is(:hover, :focus-visible, :active) {
  background: #DC2626 !important;
  background-color: #DC2626 !important;
  border-color: #DC2626 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
}

html body:not(#_a):not(#_b) :is(
  .pilot-icon-btn,
  button.pilot-icon-btn,
  .rt-red-cross-btn,
  button.rt-red-cross-btn,
  .ai-route-actions button[data-move="remove"],
  .notif-actions button[title*="Delete" i],
  button.icon-btn[title*="Delete" i],
  button.icon-btn[title*="Remove" i]
):is(:hover, :focus-visible, :active) > svg {
  stroke: #FFFFFF !important;
  color: #FFFFFF !important;
}

html body:not(#_a):not(#_b) :is(
  .btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn),
  button.btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn),
  a.btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn)
) {
  background: #DC2626 !important;
  background-color: #DC2626 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #DC2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.20) !important;
  font-weight: 700 !important;
}
html body:not(#_a):not(#_b) :is(
  .btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn),
  button.btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn),
  a.btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn)
) :is(span, strong, small, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}
html body:not(#_a):not(#_b) :is(
  .btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn),
  button.btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn),
  a.btn-danger:not(.btn-ghost):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn)
):is(:hover, :focus-visible, :active) {
  background: #B91C1C !important;
  background-color: #B91C1C !important;
  border-color: #B91C1C !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.30) !important;
}

html body:not(#_a):not(#_b) :is(
  .btn-danger-ghost,
  .btn-ghost.lead-delete-btn,
  .lead-delete-btn:not(.btn-danger):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.btn-danger):not(.rui-btn-ok)
) {
  background: #DC2626 !important;
  background-color: #DC2626 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #DC2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.22) !important;
  font-weight: 700 !important;
}
html body:not(#_a):not(#_b) :is(
  .btn-danger-ghost,
  .btn-ghost.lead-delete-btn,
  .lead-delete-btn:not(.btn-danger):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.btn-danger):not(.rui-btn-ok)
) :is(span, strong, small, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}
html body:not(#_a):not(#_b) :is(
  .btn-danger-ghost,
  .btn-ghost.lead-delete-btn,
  .lead-delete-btn:not(.btn-danger):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.btn-danger):not(.rui-btn-ok)
):is(:hover, :focus-visible, :active) {
  background: #DC2626 !important;
  background-color: #DC2626 !important;
  border-color: #DC2626 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24) !important;
}
html body:not(#_a):not(#_b) :is(
  .btn-danger-ghost,
  .btn-ghost.lead-delete-btn,
  .lead-delete-btn:not(.btn-danger):not(.pilot-icon-btn):not(.rt-red-cross-btn):not(.icon-btn):not(.avatar-remove-text-btn),
  button[name="action"][value*="clear" i]:not(.btn-danger):not(.rui-btn-ok)
):is(:hover, :focus-visible, :active) :is(span, strong, small, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}


/* ==========================================================================
   V940 GLOBAL TRACKABLE COLOR PALETTE, GLASSMORPHISM POP & MICRO-ANIMATIONS
   1. Luminous Pearl-Indigo-Emerald Ambient Mesh Backdrop (from client-tracking.php)
   2. High-Pop Status Pills, Semantic KPI Accents & Top Progress Highlights
   3. Smooth Tab Switch, Segmented Control & Button Switch Micro-Animations
   4. Public Header CTA ("Try for free" / "Dashboard") & Rich Mobile Dropdown
   ========================================================================== */

/* 1. Luminous Ambient Mesh Backdrop Across Public Site, Workspace, Portal & Admin */
html body:not(#_a):not(#_b):is(.site, .workspace-shell, .app-shell, .admin-shell, .client-portal-shell) {
  background-color: #F3F6FC !important;
  background-image:
    radial-gradient(circle at 8% 6%, rgba(29, 73, 232, 0.13) 0px, transparent 42%),
    radial-gradient(circle at 92% 10%, rgba(124, 58, 237, 0.11) 0px, transparent 44%),
    radial-gradient(circle at 50% 48%, rgba(14, 165, 233, 0.07) 0px, transparent 52%),
    radial-gradient(circle at 88% 88%, rgba(16, 185, 129, 0.08) 0px, transparent 45%),
    linear-gradient(180deg, #F5F7FE 0%, #EEF2FA 52%, #F4F7FC 100%) !important;
  background-attachment: fixed !important;
}

/* 2. Elevated Glassmorphism Cards with Subtle Royal-Blue Tint & Specular Top Edge */
html body:not(#_a):not(#_b) :is(
  .card,
  .pilot-card,
  .pilot-kpi,
  .dashboard-kpi,
  .stat-card,
  .kpi-card,
  .task-stat,
  .myday-stat,
  .myday-panel,
  .project-stat,
  .activity-stat-box,
  .sent-kpi-card,
  .export-card,
  .outreach-card,
  .ent-card,
  .int-card,
  .ps-summary-tile,
  .velocity-metric-card,
  .crm-kpi-card,
  .registry-kpi,
  .an-kpi,
  .an-card,
  .an-privacy,
  .admin-filter-card,
  .user-filter-card,
  .notif-row,
  .ops-strip-item,
  .health-card,
  .panel,
  .glass,
  .glass-card,
  .glass-panel,
  .mx-card,
  .settings-card,
  .profile-card,
  .billing-card,
  .usage-card,
  .plan-card,
  .table-card,
  .data-card,
  .toolbar-card,
  .Quick-Action-Card,
  .quick-action,
  .metric-card,
  .metric-checkable-card,
  .chart-card,
  .widget-card,
  .portal-card,
  .section-card,
  .rt-clean-feature-card,
  .rt-m3-card,
  .rt-exec-matrix-card
):not(:where(.dash-welcome, .pilot-hero, .side-plan, .inv-total-dark-card, .price-card.highlight, [style*="#0F131E"], [style*="#0B0F1A"])) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(246, 249, 255, 0.76) 100%) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 14px 34px -10px rgba(29, 73, 232, 0.07),
    0 4px 12px -2px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 0 rgba(255, 255, 255, 1),
    0 0 0 1px rgba(29, 73, 232, 0.06) !important;
  transform: translateZ(0);
}

/* Signature Top Accent Bars on User Workspace KPIs & Stat Tiles (Matching Trackable Portal Aesthetic) */
html body:not(#_a):not(#_b) :is(.task-stat, .activity-stat-box, .dashboard-kpi, .sent-kpi-card, .myday-stat, .project-stat) {
  position: relative !important;
  overflow: hidden !important;
}
html body:not(#_a):not(#_b) :is(.task-stat, .activity-stat-box, .dashboard-kpi, .sent-kpi-card, .myday-stat, .project-stat)::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3.5px !important;
  background: linear-gradient(90deg, #1D49E8 0%, #6366F1 50%, #0EA5E9 100%) !important;
  opacity: 0.92 !important;
  pointer-events: none !important;
}
html body:not(#_a):not(#_b) :is(.task-stats, .activity-quick-stats, .dashboard-kpis) > :nth-child(2)::before {
  background: linear-gradient(90deg, #4F46E5 0%, #8B5CF6 100%) !important;
}
html body:not(#_a):not(#_b) :is(.task-stats, .dashboard-kpis) > :nth-child(3)::before {
  background: linear-gradient(90deg, #059669 0%, #10B981 100%) !important;
}
html body:not(#_a):not(#_b) :is(.dashboard-kpis) > :nth-child(4)::before {
  background: linear-gradient(90deg, #0284C7 0%, #38BDF8 100%) !important;
}

/* Crisp Trackable Portal Status Pills Globally (With Explicit -webkit-text-fill-color Guard) */
html body:not(#_a):not(#_b) :is(.pill-teal, .pill-emerald, .pill-success, .badge-teal, .badge-green) {
  background: #ECFDF5 !important;
  background-color: #ECFDF5 !important;
  background-image: none !important;
  color: #047857 !important;
  -webkit-text-fill-color: #047857 !important;
  border: 1px solid #A7F3D0 !important;
  font-weight: 700 !important;
}
html body:not(#_a):not(#_b) :is(.pill-blue, .pill-primary, .badge-blue, .badge-primary):not(.plan-free):not(.plan-pro):not(.plan-team) {
  background: #EFF6FF !important;
  background-color: #EFF6FF !important;
  background-image: none !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border: 1px solid #BFDBFE !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
html body:not(#_a):not(#_b) :is(.pill-violet, .badge-violet):not(.plan-pro):not(.plan-team) {
  background: #EEF2FF !important;
  background-color: #EEF2FF !important;
  background-image: none !important;
  color: #4F46E5 !important;
  -webkit-text-fill-color: #4F46E5 !important;
  border: 1px solid #C7D2FE !important;
  font-weight: 700 !important;
}
html body:not(#_a):not(#_b) :is(.pill-amber, .pill-warning, .badge-amber):not(.plan-team) {
  background: #FFFBEB !important;
  background-color: #FFFBEB !important;
  background-image: none !important;
  color: #B45309 !important;
  -webkit-text-fill-color: #B45309 !important;
  border: 1px solid #FDE68A !important;
  font-weight: 700 !important;
}
html body:not(#_a):not(#_b) :is(.pill-red, .pill-danger, .badge-red) {
  background: #FEF2F2 !important;
  background-color: #FEF2F2 !important;
  background-image: none !important;
  color: #DC2626 !important;
  -webkit-text-fill-color: #DC2626 !important;
  border: 1px solid #FECACA !important;
  font-weight: 700 !important;
}
html body:not(#_a):not(#_b) :is(.pill-gray, .pill-neutral, .badge-gray) {
  background: #F1F5F9 !important;
  background-color: #F1F5F9 !important;
  background-image: none !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border: 1px solid #CBD5E1 !important;
  font-weight: 700 !important;
}
html body:not(#_a):not(#_b) :is(.pill-teal, .pill-emerald, .pill-success, .pill-blue, .pill-primary, .pill-violet, .pill-amber, .pill-warning, .pill-red, .pill-danger, .pill-gray, .pill-neutral):not(.plan-pro):not(.plan-team) * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

/* 3. Smooth Modern Micro-Animations: Tab Switches, Button Switches & Interactive Actions */
@keyframes rtkTabPaneEnter {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.994);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html body:not(#_a):not(#_b) :is(
  .pilot-tab-panel:not([hidden]),
  .rt-fstack-pane.is-active:not([hidden]),
  .workflow-panel.is-active:not([hidden])
) {
  animation: rtkTabPaneEnter 0.26s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

/* Tab Switcher & Segmented Control Smooth Pill Physics */
html body:not(#_a):not(#_b) :is(
  .rt-stack-tab,
  .workflow-step-pill-btn,
  .pilot-tabs a,
  .pilot-tabs button,
  .registry-tabs a,
  .registry-tabs button,
  .fx-tabs a,
  .view-switch a,
  .mx-segment a,
  .template-nav-scroll a,
  .contact-tabs a,
  .contact-tabs button
) {
  transition:
    background-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.18s ease,
    border-color 0.22s ease,
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.14s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body:not(#_a):not(#_b) :is(
  .rt-stack-tab.is-active,
  .workflow-step-pill-btn.is-active,
  .pilot-tabs :is(a.active, a.is-active, a[aria-current="page"], button.active, button.is-active),
  .registry-tabs :is(a.active, a.is-active, a[aria-current="page"]),
  .fx-tabs :is(a.active, a.is-active, a[aria-current="page"]),
  .view-switch :is(a.active, a.is-active, a[aria-current="true"], a[aria-current="page"]),
  .mx-segment :is(a.active, a.is-active, a[aria-current="true"], a[aria-pressed="true"])
) {
  background: linear-gradient(135deg, #0F131E 0%, #1E293B 100%) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #0F131E !important;
  box-shadow: 0 6px 16px -4px rgba(15, 19, 30, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

/* Interactive Button Switch & Action Physics */
html body:not(#_a):not(#_b) :is(.btn, button.btn, a.btn, .pilot-chip, .quick-action) {
  transition:
    background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.12s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body:not(#_a):not(#_b) :is(.btn, button.btn, a.btn, .pilot-chip, .rt-stack-tab, .workflow-step-pill-btn):active:not(:disabled) {
  transform: scale(0.965) !important;
}

/* Smooth Toggle / Checkbox Switch Feel */
html body:not(#_a):not(#_b) input[type="checkbox"] {
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease !important;
}
html body:not(#_a):not(#_b) input[type="checkbox"]:active:not(:disabled) {
  transform: scale(0.90) !important;
}

/* 4. Public Header CTA & Rich Mobile Dropdown Menu Styling */
@media (max-width: 960px) {
  html body:not(#_a):not(#_b).site .site-header .header-actions :is(.header-signin-btn, a.btn-ghost:not(.header-primary-cta)) {
    display: none !important;
  }
  html body:not(#_a):not(#_b).site .site-header .header-actions :is(.header-primary-cta, a.btn-primary) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    background: #0F131E !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    border: 1px solid #0F131E !important;
    box-shadow: 0 4px 12px rgba(15, 19, 30, 0.18) !important;
    white-space: nowrap !important;
  }
  html body:not(#_a):not(#_b).site .site-nav {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(22px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(190%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 18px !important;
    padding: 14px !important;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(29, 73, 232, 0.08) !important;
    animation: rtkDropdownSlideFade 0.22s cubic-bezier(0.22, 1, 0.36, 1) both !important;
  }
  html body:not(#_a):not(#_b).site .site-nav .site-nav-mobile-auth {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
  }
  html body:not(#_a):not(#_b).site .site-nav .site-nav-user-card {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(238, 242, 255, 0.85) 100%) !important;
    border: 1px solid rgba(191, 219, 254, 0.85) !important;
    margin-bottom: 2px !important;
  }
  html body:not(#_a):not(#_b).site .site-nav .site-nav-user-meta {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
  }
  html body:not(#_a):not(#_b).site .site-nav .site-nav-user-meta strong {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body:not(#_a):not(#_b).site .site-nav .site-nav-user-meta span {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #1D49E8 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body:not(#_a):not(#_b).site .site-nav .site-nav-mobile-subgrid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  html body:not(#_a):not(#_b).site .site-nav .site-nav-logout-link {
    color: #DC2626 !important;
    -webkit-text-fill-color: #DC2626 !important;
    border-color: rgba(252, 165, 165, 0.7) !important;
    background: rgba(254, 242, 242, 0.7) !important;
  }
}



/* ==========================================================================
   V950 GLOBAL UI/UX & SENIOR ARCHITECTURE MASTER POLISH
   1. Zero .card + .card Stair-Step Margin Inside All Grid/Flex/Stats Containers (30+ Pages)
   2. Uniform Activity Header Stat Pills & Aligned Clear Activity Action
   3. Sidebar Upsell Card (.side-plan) High-Contrast White Primary & Glass Secondary Buttons
   4. Animated Waving Hand & Luminous Time-of-Day Greeting Pill with Color Emoji Support
   5. Tactile User Dashboard & Workspace Hover Effects (Quick Actions, KPIs, Velocity, Pipeline)
   6. Project Completed Top Status Banner & Celebration Certificate Modal Popup
   ========================================================================== */

/* 1. Eliminate .card + .card 16px Vertical Offset Inside Every Grid, Flex, KPI & Stats Container */
html body:not(#_a):not(#_b) :is(
  .card-grid,
  .grid,
  .stats-grid,
  .task-stats,
  .activity-quick-stats,
  .myday-grid,
  .myday-stats,
  .dashboard-kpis,
  .pilot-kpis,
  .retraak-velocity-grid,
  .sent-emails-kpi-grid,
  .fx-grid,
  .fx-kpis,
  .settings-grid,
  .team-top-grid,
  .client-portal-stats,
  .registry-kpis,
  .admin-kpi-grid,
  .backup-stats-grid,
  .retraak-top-3-glass-grid,
  .admin-orders-stats,
  .mx-brand-grid,
  .mx-grid-2,
  .policy-split-grid,
  .announcement-studio-grid,
  .sb-admin-grid,
  .ai-kpis,
  .ai-provider-grid,
  .ai-usage-grid,
  .an-kpis,
  .an-mid-grid,
  .an-lower-grid,
  .user-bento-pair-grid,
  .sc-stats,
  .project-detail-page,
  .pricing-grid,
  .rt-fstack-grid,
  .rt-m3-metrics-grid,
  [style*="display:grid"],
  [style*="display: grid"],
  [style*="display:flex"],
  [style*="display: flex"]
) > .card + .card,
html body:not(#_a):not(#_b) :is(.activity-quick-stats, .task-stats, .sent-emails-kpi-grid, .client-portal-stats) > .card {
  margin-top: 0 !important;
}

/* 2. Workspace Activity Header Stat Pills: Identical Height, Baseline & Spacing (Fixes image_52b905.png) */
html body:not(#_a):not(#_b) .activity-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
  margin-bottom: 22px !important;
}
html body:not(#_a):not(#_b) .activity-quick-stats {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
}
html body:not(#_a):not(#_b) .activity-quick-stats > .activity-stat-box {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  min-width: 168px !important;
  padding: 0 18px !important;
  margin: 0 !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  text-align: left !important;
}
html body:not(#_a):not(#_b) .activity-quick-stats > .activity-stat-box span {
  display: inline-block !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #475569 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
html body:not(#_a):not(#_b) .activity-quick-stats > .activity-stat-box strong {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  margin: 0 !important;
  font-variant-numeric: tabular-nums !important;
}
html body:not(#_a):not(#_b) .activity-quick-stats .activity-clear-btn {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* 3. Sidebar Upsell Card (.side-plan): Clean Heading, Pure White Primary Button, Translucent Glass Secondary Button */
html body:not(#_a):not(#_b) .side-plan .side-plan-title {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}
html body:not(#_a):not(#_b) .side-plan .side-plan-actions :is(.side-plan-primary-btn, .btn-primary, a.btn-primary) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid #FFFFFF !important;
  border-radius: 10px !important;
  min-height: 36px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan .side-plan-actions :is(.side-plan-primary-btn, .btn-primary, a.btn-primary):hover {
  background: #EEF2FF !important;
  background-color: #EEF2FF !important;
  color: #1D49E8 !important;
  -webkit-text-fill-color: #1D49E8 !important;
  border-color: #C7D2FE !important;
}
html body:not(#_a):not(#_b) .side-plan .side-plan-actions :is(.side-plan-secondary-btn, .btn-ghost, a.btn-ghost) {
  background: rgba(255, 255, 255, 0.10) !important;
  background-color: rgba(255, 255, 255, 0.10) !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 10px !important;
  min-height: 36px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
html body:not(#_a):not(#_b) .side-plan .side-plan-actions :is(.side-plan-secondary-btn, .btn-ghost, a.btn-ghost):hover {
  background: rgba(255, 255, 255, 0.20) !important;
  background-color: rgba(255, 255, 255, 0.20) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* 4. Greeting Emojis & Luminous Time-of-Day Pill Globally (Fixes image_52b582.png) */
html body:not(#_a):not(#_b) .welcome-wave {
  display: inline-block !important;
  transform-origin: 70% 75% !important;
  animation: retraakWaveHand 2.6s ease-in-out infinite !important;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
  font-style: normal !important;
  margin: 0 2px !important;
}
html body:not(#_a):not(#_b) .welcome-sub-greeting {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #F8FAFC !important;
  -webkit-text-fill-color: #F8FAFC !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.07) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
  vertical-align: middle !important;
  margin-left: 8px !important;
  letter-spacing: 0.01em !important;
}
html body:not(#_a):not(#_b) .welcome-sub-greeting .greeting-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
  font-size: 15px !important;
  line-height: 1 !important;
  display: inline-block !important;
}

/* 5. User Dashboard & Workspace Tactile Hover Effects (Fixes image_52b21a.png) */
html body:not(#_a):not(#_b) .quick-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
html body:not(#_a):not(#_b) .quick-actions > .quick-action:last-child:nth-child(odd) {
  grid-column: 1 / -1 !important;
}
html body:not(#_a):not(#_b) .quick-action {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 11px 14px !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 248, 255, 0.82) 100%) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.04), inset 0 1px 0 #FFFFFF !important;
  color: #0F172A !important;
  text-decoration: none !important;
  position: relative !important;
  overflow: hidden !important;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
html body:not(#_a):not(#_b) .quick-action > span:first-child {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: 10px !important;
  background: rgba(29, 73, 232, 0.08) !important;
  border: 1px solid rgba(29, 73, 232, 0.15) !important;
  color: #1D49E8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition:
    background 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease !important;
}
html body:not(#_a):not(#_b) .quick-action > span:first-child svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
}
html body:not(#_a):not(#_b) .quick-action > span:last-child {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  line-height: 1.25 !important;
  transition: color 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
html body:not(#_a):not(#_b) .quick-action:is(:hover, :focus-visible) {
  background: linear-gradient(145deg, #FFFFFF 0%, #EEF4FF 100%) !important;
  border-color: rgba(29, 73, 232, 0.42) !important;
  box-shadow:
    0 14px 28px -8px rgba(29, 73, 232, 0.18),
    0 4px 10px -2px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 #FFFFFF !important;
  transform: translateY(-2.5px) !important;
}
html body:not(#_a):not(#_b) .quick-action:is(:hover, :focus-visible) > span:first-child {
  background: linear-gradient(135deg, #1D49E8 0%, #4F46E5 100%) !important;
  border-color: #1D49E8 !important;
  color: #FFFFFF !important;
  transform: scale(1.06) !important;
  box-shadow: 0 6px 14px -3px rgba(29, 73, 232, 0.35) !important;
}
html body:not(#_a):not(#_b) .quick-action:is(:hover, :focus-visible) > span:first-child svg {
  stroke: #FFFFFF !important;
  color: #FFFFFF !important;
}
html body:not(#_a):not(#_b) .quick-action:is(:hover, :focus-visible) > span:last-child {
  color: #1D49E8 !important;
  transform: translateX(2px) !important;
}

/* Interactive Hover Effects on User Dashboard KPIs, Velocity Cards, Pipeline & Client Rows */
html body:not(#_a):not(#_b) :is(
  .dashboard-kpi,
  .velocity-metric-card,
  .project-stat,
  .task-stat,
  .myday-stat,
  .sent-kpi-card,
  .client-stat-glass-card
) {
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease,
    background 0.22s ease !important;
}
html body:not(#_a):not(#_b) :is(
  .dashboard-kpi,
  .velocity-metric-card,
  .project-stat,
  .task-stat,
  .myday-stat,
  .sent-kpi-card,
  .client-stat-glass-card
):is(:hover, :focus-visible) {
  transform: translateY(-3px) !important;
  border-color: rgba(29, 73, 232, 0.38) !important;
  box-shadow:
    0 18px 38px -10px rgba(29, 73, 232, 0.16),
    0 6px 16px -4px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 #FFFFFF !important;
}
html body:not(#_a):not(#_b) .dw-stat-tile {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}
html body:not(#_a):not(#_b) .dw-stat-tile:hover {
  transform: translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.13) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.28) !important;
}
html body:not(#_a):not(#_b) :is(.pipeline-project, .dashboard-client-row) {
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  border-radius: 12px !important;
}
html body:not(#_a):not(#_b) :is(.pipeline-project, .dashboard-client-row):hover {
  transform: translateY(-1.5px) !important;
  background: rgba(238, 244, 255, 0.75) !important;
  border-color: rgba(29, 73, 232, 0.28) !important;
  box-shadow: 0 8px 20px -6px rgba(29, 73, 232, 0.12) !important;
}

/* 6. Project Completed Top Status Banner & Celebration Popup Modal (Fixes image_52aa1b.png) */
html body:not(#_a):not(#_b) .rt-project-completed-banner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  flex-wrap: wrap !important;
  padding: 18px 24px !important;
  margin-bottom: 18px !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96) 0%, rgba(209, 250, 229, 0.88) 50%, rgba(239, 246, 255, 0.92) 100%) !important;
  border: 1.5px solid #6EE7B7 !important;
  box-shadow:
    0 16px 36px -10px rgba(5, 150, 105, 0.16),
    0 4px 12px -2px rgba(5, 150, 105, 0.08),
    inset 0 1px 0 #FFFFFF !important;
  position: relative !important;
  overflow: hidden !important;
  animation: rtkTabPaneEnter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
html body:not(#_a):not(#_b) .rt-project-completed-banner::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 4px !important;
  background: linear-gradient(90deg, #059669 0%, #10B981 50%, #1D49E8 100%) !important;
}
html body:not(#_a):not(#_b) .rt-pcb-left {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex: 1 1 320px !important;
  min-width: 0 !important;
}
html body:not(#_a):not(#_b) .rt-pcb-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #A7F3D0 !important;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  flex-shrink: 0 !important;
}
html body:not(#_a):not(#_b) .rt-pcb-eyebrow {
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #047857 !important;
  margin-bottom: 2px !important;
}
html body:not(#_a):not(#_b) .rt-pcb-title {
  margin: 0 0 4px !important;
  font-size: 19px !important;
  font-weight: 850 !important;
  color: #064E3B !important;
  letter-spacing: -0.02em !important;
}
html body:not(#_a):not(#_b) .rt-pcb-sub {
  margin: 0 !important;
  font-size: 13.5px !important;
  color: #065F46 !important;
  line-height: 1.45 !important;
}
html body:not(#_a):not(#_b) .rt-pcb-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
html body:not(#_a):not(#_b) .rt-project-completed-banner .rt-pcb-cert-btn {
  background: #059669 !important;
  background-color: #059669 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #047857 !important;
  border-radius: 12px !important;
  padding: 9px 16px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  box-shadow: 0 6px 16px -4px rgba(5, 150, 105, 0.35) !important;
}
html body:not(#_a):not(#_b) .rt-project-completed-banner .rt-pcb-cert-btn:hover {
  background: #047857 !important;
  background-color: #047857 !important;
  transform: translateY(-1.5px) !important;
}
html body:not(#_a):not(#_b) .rt-project-completed-banner .rt-pcb-pdf-btn {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #064E3B !important;
  -webkit-text-fill-color: #064E3B !important;
  border: 1.5px solid #6EE7B7 !important;
  border-radius: 12px !important;
  padding: 9px 16px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}
html body:not(#_a):not(#_b) .rt-project-completed-banner .rt-pcb-pdf-btn:hover {
  background: #F0FDF4 !important;
  border-color: #059669 !important;
}

/* Celebration Modal Backdrop & Card */
html body:not(#_a):not(#_b) .rt-completed-modal-backdrop:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}
html body:not(#_a):not(#_b) .rt-completed-modal-card {
  position: relative !important;
  width: 100% !important;
  max-width: 500px !important;
  background: linear-gradient(165deg, #FFFFFF 0%, #F4FBF7 55%, #F0F6FF 100%) !important;
  border: 1.5px solid #A7F3D0 !important;
  border-radius: 24px !important;
  padding: 32px 28px 26px !important;
  box-shadow: 0 28px 70px -12px rgba(15, 23, 42, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
  text-align: center !important;
  animation: rtkTabPaneEnter 0.32s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
html body:not(#_a):not(#_b) .rt-cm-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 0 !important;
  background: rgba(15, 23, 42, 0.06) !important;
  color: #475569 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
html body:not(#_a):not(#_b) .rt-cm-close:hover {
  background: rgba(15, 23, 42, 0.12) !important;
  color: #0F172A !important;
}
html body:not(#_a):not(#_b) .rt-cm-badge-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}
html body:not(#_a):not(#_b) .rt-cm-seal {
  width: 64px !important;
  height: 64px !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%) !important;
  border: 2px solid #6EE7B7 !important;
  box-shadow: 0 12px 26px -6px rgba(5, 150, 105, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 32px !important;
}
html body:not(#_a):not(#_b) .rt-cm-heading {
  margin: 0 0 8px !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  color: #0F172A !important;
  letter-spacing: -0.025em !important;
}
html body:not(#_a):not(#_b) .rt-cm-desc {
  margin: 0 0 20px !important;
  font-size: 14px !important;
  color: #475569 !important;
  line-height: 1.55 !important;
}
html body:not(#_a):not(#_b) .rt-cm-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  text-align: left !important;
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  margin-bottom: 20px !important;
}
html body:not(#_a):not(#_b) .rt-cm-summary-grid span {
  display: block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748B !important;
  margin-bottom: 2px !important;
}
html body:not(#_a):not(#_b) .rt-cm-summary-grid strong {
  display: block !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  overflow-wrap: anywhere !important;
}
html body:not(#_a):not(#_b) .rt-cm-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}


/* ==========================================================================
   V951 CONTENT-AWARE POPUP & DIALOG SIZING (EXACT FIT: WIDER FOR MULTI-COLUMN /
   LIVE-PREVIEW MODALS, COMPACT FOR SIMPLE 1-COLUMN & CONFIRMATION POPUPS)
   ========================================================================== */

/* A. Extra-Wide Split Preview & Multi-Column Studio Modals (920px - 1020px) */
html body:not(#_a):not(#_b) :is(
  dialog#cardModal.sc-dialog[open],
  dialog.sc-dialog[open],
  dialog#lead-email-dialog[open]
) {
  width: min(920px, calc(100vw - 32px)) !important;
  max-width: 920px !important;
}

/* Fix Create Sidebar Card Modal (image_516045.png) Internal Grid & Zero Horizontal Scrollbar */
html body:not(#_a):not(#_b) dialog.sc-dialog .sc-dialog-form {
  width: 100% !important;
  max-width: 100% !important;
  max-height: min(88vh, 860px) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
html body:not(#_a):not(#_b) dialog.sc-dialog .sc-dialog-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 290px !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}
html body:not(#_a):not(#_b) dialog.sc-dialog .sc-dialog-fields {
  padding: 20px 24px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
html body:not(#_a):not(#_b) dialog.sc-dialog .sc-dialog-fields .form-grid.cols-3 {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: end !important;
}
html body:not(#_a):not(#_b) dialog.sc-dialog .sc-priority-toggles-row {
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: center !important;
  padding-top: 4px !important;
}
html body:not(#_a):not(#_b) dialog.sc-dialog .sc-toggles-col {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 20px !important;
  padding-top: 8px !important;
}
html body:not(#_a):not(#_b) dialog.sc-dialog .sc-check-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  margin: 0 !important;
}
@media (max-width: 820px) {
  html body:not(#_a):not(#_b) dialog.sc-dialog .sc-dialog-body {
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }
  html body:not(#_a):not(#_b) dialog.sc-dialog .sc-dialog-fields .form-grid.cols-3,
  html body:not(#_a):not(#_b) dialog.sc-dialog .sc-priority-toggles-row {
    grid-template-columns: 1fr !important;
  }
}

/* B. Wide Document Preview, Follow-Up Composer, Feature Overrides & Checkout Modals (760px - 860px) */
html body:not(#_a):not(#_b) :is(
  dialog#dialog-lead-followup[open],
  dialog#modal-enlarge-qr[open],
  dialog#registry-doc-preview-modal[open],
  dialog#feature-overrides-dialog[open]
) {
  width: min(840px, calc(100vw - 32px)) !important;
  max-width: 840px !important;
}
html body:not(#_a):not(#_b) :is(
  dialog#template-editor-dialog[open],
  dialog#add-smtp-account-dialog[open],
  dialog#checkout-plan-modal[open],
  dialog#admin-transcript-dialog[open]
) {
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: 760px !important;
}

/* C. Compact Single-Column & Confirmation Popups (480px - 520px — Zero Unnecessary Empty Space) */
html body:not(#_a):not(#_b) :is(
  dialog#downgrade-sub-dialog[open],
  dialog#cancel-sub-dialog[open],
  dialog#modal-create-qr[open],
  dialog#modal-edit-qr[open],
  dialog#rt-demo-behavior-modal[open],
  dialog#consent-telemetry-dialog[open],
  dialog#mark-suspicious-dialog[open],
  dialog#dialog-admin-add-bank[open],
  dialog#dialog-admin-add-lead[open],
  dialog#dialog-admin-add-client[open],
  dialog#dialog-import-clients[open],
  dialog.client-request-dialog[open]
) {
  width: min(510px, calc(100vw - 32px)) !important;
  max-width: 510px !important;
}
html body:not(#_a):not(#_b) .rui-confirm .modal-card {
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: 440px !important;
}

html body:not(#_a):not(#_b) :is(
  .admin-user-row-avatar[hidden],
  .admin-user-row-avatar-fallback[hidden],
  .admin-user-avatar[hidden],
  .user-footer-avatar[hidden],
  .user-footer-avatar-initials[hidden],
  .admin-footer-avatar[hidden],
  .admin-footer-avatar-initials[hidden],
  .avatar-fallback-span[hidden],
  .avatar[hidden]
) {
  display: none !important;
}


/* ==========================================================================
   V952 GLOBAL DATA CARD ALIGNMENT & SIDEBAR BADGE COLOR INTEGRITY
   1. Global Full-Width Table & Data Card Alignment (Eliminates Blank Space on Email Logs & Tables)
   2. High-Contrast Vibrant Sidebar Card Badge Colors (Cyan, Violet, Primary, Success, Amber, Rose)
   3. Distinct Visual Themes for Sidebar Cards (Dark Glass, Indigo, Emerald, Amber, Slate)
   4. High-Contrast Button Styles on Sidebar Cards (Brand Primary, White, Teal Accent, Ghost)
   ========================================================================== */

/* 1. Global Full-Width Table & Data Card Alignment (Zero Collapsed Blank Space) */
html body:not(#_a):not(#_b) :is(
  .email-delivery-log-card,
  .users-table-card,
  .registry-table-card,
  .sent-logs-table-card,
  .table-responsive,
  .table-wrap,
  .data-card,
  .table-card
) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

html body:not(#_a):not(#_b) :is(
  .email-delivery-log-card,
  .users-table-card,
  .registry-table-card,
  .sent-logs-table-card,
  .table-responsive,
  .table-wrap,
  .data-card,
  .table-card
) > table,
html body:not(#_a):not(#_b) :is(.table-responsive, .table-wrap) table {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: collapse !important;
  box-sizing: border-box !important;
}

html body:not(#_a):not(#_b) .email-delivery-log-card th,
html body:not(#_a):not(#_b) .email-delivery-log-card td {
  padding: 12px 14px !important;
  vertical-align: middle !important;
}

/* 2. Vibrant, Working Sidebar Card Badge Colors (Fixes image_433dfd.png) */
html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-cyan,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-card-badge, .plan-color-pill).badge-cyan {
  background: rgba(6, 182, 212, 0.25) !important;
  background-color: rgba(6, 182, 212, 0.25) !important;
  background-image: none !important;
  color: #22D3EE !important;
  -webkit-text-fill-color: #22D3EE !important;
  border: 1.5px solid rgba(34, 211, 238, 0.6) !important;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-cyan :is(span, svg) {
  color: #22D3EE !important;
  -webkit-text-fill-color: #22D3EE !important;
  stroke: #22D3EE !important;
  fill: currentColor !important;
}

html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-violet,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-card-badge, .plan-color-pill).badge-violet {
  background: rgba(139, 92, 246, 0.25) !important;
  background-color: rgba(139, 92, 246, 0.25) !important;
  background-image: none !important;
  color: #C4B5FD !important;
  -webkit-text-fill-color: #C4B5FD !important;
  border: 1.5px solid rgba(167, 139, 250, 0.6) !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-violet :is(span, svg) {
  color: #C4B5FD !important;
  -webkit-text-fill-color: #C4B5FD !important;
  stroke: #C4B5FD !important;
  fill: currentColor !important;
}

html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-primary,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-card-badge, .plan-color-pill).badge-primary {
  background: rgba(29, 73, 232, 0.28) !important;
  background-color: rgba(29, 73, 232, 0.28) !important;
  background-image: none !important;
  color: #93C5FD !important;
  -webkit-text-fill-color: #93C5FD !important;
  border: 1.5px solid rgba(96, 165, 250, 0.6) !important;
  box-shadow: 0 2px 10px rgba(29, 73, 232, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-primary :is(span, svg) {
  color: #93C5FD !important;
  -webkit-text-fill-color: #93C5FD !important;
  stroke: #93C5FD !important;
  fill: currentColor !important;
}

html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-success,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-card-badge, .plan-color-pill).badge-success {
  background: rgba(16, 185, 129, 0.25) !important;
  background-color: rgba(16, 185, 129, 0.25) !important;
  background-image: none !important;
  color: #6EE7B7 !important;
  -webkit-text-fill-color: #6EE7B7 !important;
  border: 1.5px solid rgba(52, 211, 153, 0.6) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-success :is(span, svg) {
  color: #6EE7B7 !important;
  -webkit-text-fill-color: #6EE7B7 !important;
  stroke: #6EE7B7 !important;
  fill: currentColor !important;
}

html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill):is(.badge-warning, .badge-amber),
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-card-badge, .plan-color-pill):is(.badge-warning, .badge-amber) {
  background: rgba(245, 158, 11, 0.26) !important;
  background-color: rgba(245, 158, 11, 0.26) !important;
  background-image: none !important;
  color: #FCD34D !important;
  -webkit-text-fill-color: #FCD34D !important;
  border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill):is(.badge-warning, .badge-amber) :is(span, svg) {
  color: #FCD34D !important;
  -webkit-text-fill-color: #FCD34D !important;
  stroke: #FCD34D !important;
  fill: currentColor !important;
}

html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-rose,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-card-badge, .plan-color-pill).badge-rose {
  background: rgba(244, 63, 94, 0.26) !important;
  background-color: rgba(244, 63, 94, 0.26) !important;
  background-image: none !important;
  color: #FDA4AF !important;
  -webkit-text-fill-color: #FDA4AF !important;
  border: 1.5px solid rgba(251, 113, 133, 0.6) !important;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-card-badge, .plan-color-pill).badge-rose :is(span, svg) {
  color: #FDA4AF !important;
  -webkit-text-fill-color: #FDA4AF !important;
  stroke: #FDA4AF !important;
  fill: currentColor !important;
}

/* 3. Distinct Visual Themes for Sidebar Cards */
html body:not(#_a):not(#_b) .side-plan.side-plan-theme-default,
html body:not(#_a):not(#_b) .sc-mock .side-plan.side-plan-theme-default {
  background: linear-gradient(145deg, #0B0E17 0%, #111726 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
html body:not(#_a):not(#_b) .side-plan.side-plan-theme-dark_glass,
html body:not(#_a):not(#_b) .sc-mock .side-plan.side-plan-theme-dark_glass {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.88) 0%, rgba(30, 41, 59, 0.76) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
html body:not(#_a):not(#_b) .side-plan.side-plan-theme-indigo,
html body:not(#_a):not(#_b) .sc-mock .side-plan.side-plan-theme-indigo {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 55%, #0F172A 100%) !important;
  border: 1.5px solid rgba(129, 140, 248, 0.45) !important;
  box-shadow: 0 12px 30px -6px rgba(79, 70, 229, 0.4) !important;
}
html body:not(#_a):not(#_b) .side-plan.side-plan-theme-emerald,
html body:not(#_a):not(#_b) .sc-mock .side-plan.side-plan-theme-emerald {
  background: linear-gradient(135deg, #064E3B 0%, #065F46 55%, #0F172A 100%) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 12px 30px -6px rgba(5, 150, 105, 0.35) !important;
}
html body:not(#_a):not(#_b) .side-plan.side-plan-theme-amber,
html body:not(#_a):not(#_b) .sc-mock .side-plan.side-plan-theme-amber {
  background: linear-gradient(135deg, #78350F 0%, #92400E 55%, #1C1917 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 12px 30px -6px rgba(217, 119, 6, 0.38) !important;
}
html body:not(#_a):not(#_b) .side-plan.side-plan-theme-slate,
html body:not(#_a):not(#_b) .sc-mock .side-plan.side-plan-theme-slate {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
  border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.35) !important;
}

/* 4. High-Contrast Primary Button Variants for Sidebar Cards */
html body:not(#_a):not(#_b) .side-plan :is(.side-plan-primary-btn, .btn-primary).btn-light,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-plan-primary-btn, .btn-primary).btn-light {
  background: #FFFFFF !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid #FFFFFF !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-plan-primary-btn, .btn-primary).btn-accent,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-plan-primary-btn, .btn-primary).btn-accent {
  background: #059669 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #059669 !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-plan-primary-btn, .btn-primary).btn-ghost,
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-plan-primary-btn, .btn-primary).btn-ghost {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
html body:not(#_a):not(#_b) .side-plan :is(.side-plan-primary-btn, .btn-primary):not(.btn-accent):not(.btn-ghost),
html body:not(#_a):not(#_b) .sc-mock .side-plan :is(.side-plan-primary-btn, .btn-primary):not(.btn-accent):not(.btn-ghost) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}


/* ==========================================================================
   V955 GLOBAL UI/UX ARCHITECTURE & PRECISION ALIGNMENT SUITE
   1. Global Popup & Dialog Internal Padding Integrity (Fixes image_e62789.png)
   2. Strict Black & White Primary Button System & Context-Aware Hover/Active States
   3. Guaranteed Vertical Card-to-Card Rhythm & Table Header Spacing (Fixes image_e61cbe.png & image_e61c62.png)
   4. Clean .empty-state (No Nested Square Border/Hover Glitch) & Quick Actions Grid Fit (Fixes image_e618c1.png)
   ========================================================================== */

/* 1. Global Popup & Dialog Internal Padding Integrity (Fixes image_e62789.png) */
html body:not(#_a):not(#_b) dialog.admin-edit-dialog .admin-edit-dialog-card:not(:has(> .admin-edit-dialog-heading)):not(:has(> .modal-card-head)):not(:has(> .sc-dialog-head)),
html body:not(#_a):not(#_b) dialog.client-request-dialog .client-request-dialog-card:not(:has(> .client-request-dialog-heading)):not(:has(> .modal-card-head)) {
  padding: 24px 28px !important;
  box-sizing: border-box !important;
}

html body:not(#_a):not(#_b) dialog.admin-edit-dialog .admin-edit-dialog-card > .admin-edit-dialog-heading,
html body:not(#_a):not(#_b) dialog.admin-edit-dialog .admin-edit-dialog-card > .modal-card-head {
  padding: 20px 26px 16px !important;
  margin: 0 !important;
  border-bottom: 1px solid #E2E8F0 !important;
  box-sizing: border-box !important;
}

html body:not(#_a):not(#_b) dialog.admin-edit-dialog .admin-edit-dialog-card > .modal-card-body,
html body:not(#_a):not(#_b) dialog.admin-edit-dialog .admin-edit-dialog-card > form {
  padding: 22px 26px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

html body:not(#_a):not(#_b) dialog.admin-edit-dialog .admin-edit-dialog-card > .form-actions,
html body:not(#_a):not(#_b) dialog.admin-edit-dialog .admin-edit-dialog-card > .modal-card-foot {
  padding: 16px 26px !important;
  margin: 0 !important;
  border-top: 1px solid #E2E8F0 !important;
  background: rgba(248, 250, 252, 0.94) !important;
  border-radius: 0 0 22px 22px !important;
  box-sizing: border-box !important;
}

/* 2. Strict Black & White Primary Button System & Context-Aware Hover/Active States */
/* 2A. Light Surfaces: Primary Button is Obsidian Black (#0F131E) + Pure White (#FFFFFF) */
html body:not(#_a):not(#_b) :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  input.btn-primary,
  .btn-brand,
  a.btn-brand,
  button.btn-brand,
  .auth-primary-btn,
  .task-filter button[type="submit"],
  .project-search-form button[type="submit"],
  .activity-filters-form button[type="submit"],
  .fx-toolbar button[type="submit"],
  .crm-search-bar button[type="submit"],
  .ent-search button[type="submit"],
  .admin-filter-bar button[type="submit"],
  .user-filter-form button[type="submit"],
  .admin-orders-search button[type="submit"],
  form[method="get"]:not(.registry-search) button[type="submit"]:not(.btn-ghost):not(.btn-secondary):not(.btn-danger):not(.pilot-icon-btn):not(.icon-btn)
):not(.btn-danger):not(.btn-accent):not(.btn-ai):not(.btn-light) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  box-shadow: 0 2px 6px rgba(15, 19, 30, 0.14) !important;
  font-weight: 700 !important;
}

html body:not(#_a):not(#_b) :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .btn-brand,
  a.btn-brand,
  button.btn-brand,
  .auth-primary-btn,
  .task-filter button[type="submit"],
  .project-search-form button[type="submit"],
  .activity-filters-form button[type="submit"],
  .fx-toolbar button[type="submit"],
  .crm-search-bar button[type="submit"],
  .ent-search button[type="submit"],
  .admin-filter-bar button[type="submit"],
  .user-filter-form button[type="submit"],
  .admin-orders-search button[type="submit"],
  form[method="get"]:not(.registry-search) button[type="submit"]:not(.btn-ghost):not(.btn-secondary):not(.btn-danger):not(.pilot-icon-btn):not(.icon-btn)
):not(.btn-danger):not(.btn-accent):not(.btn-ai):not(.btn-light) :is(span, strong, b, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: currentColor !important;
}

/* Light Surface Primary Button Hover: Charcoal Slate (#1E293B) + Pure White (#FFFFFF) — Never Blue */
html body:not(#_a):not(#_b) :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  input.btn-primary,
  .btn-brand,
  a.btn-brand,
  button.btn-brand,
  .auth-primary-btn,
  #modal-apply-promo-btn,
  .checkout-promo-input-wrap button,
  .task-filter button[type="submit"],
  .project-search-form button[type="submit"],
  .activity-filters-form button[type="submit"],
  .fx-toolbar button[type="submit"],
  .crm-search-bar button[type="submit"],
  .ent-search button[type="submit"],
  .admin-filter-bar button[type="submit"],
  .user-filter-form button[type="submit"],
  .admin-orders-search button[type="submit"],
  form[method="get"]:not(.registry-search) button[type="submit"]:not(.btn-ghost):not(.btn-secondary):not(.btn-danger):not(.pilot-icon-btn):not(.icon-btn)
):not(.btn-danger):not(.btn-accent):not(.btn-ai):not(.btn-light):hover {
  background: #1E293B !important;
  background-color: #1E293B !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #1E293B !important;
  box-shadow: 0 4px 12px rgba(15, 19, 30, 0.22) !important;
}

/* 2B. Light Surfaces: Simple / Secondary / Ghost Buttons & Active States (Strictly Excluding All Destructive & Emotion Buttons) */
html body:not(#_a):not(#_b) :is(
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .btn-ghost,
  a.btn-ghost,
  button.btn-ghost,
  .btn-outline,
  .btn
):not(:where(.btn-primary, .btn-brand, .btn-danger, .btn-danger-ghost, .btn-danger-soft, .lead-delete-btn, .delete-btn, .btn-delete, .inv-delete, .inv-delete-action, .plan-remove-btn, .int-danger, .mx-btn-danger, .text-danger, .notif-clear-pill, .activity-clear-btn, .btn-accent, .btn-success, .btn-teal, .btn-warning, .btn-amber, .btn-ai, .btn-light, .pilot-icon-btn, .icon-btn, .rt-red-cross-btn, .is-active, .active, [aria-current="page"], [aria-selected="true"])) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid #CBD5E1 !important;
}

html body:not(#_a):not(#_b) :is(
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .btn-ghost,
  a.btn-ghost,
  button.btn-ghost,
  .btn-outline,
  .btn
):not(:where(.btn-primary, .btn-brand, .btn-danger, .btn-danger-ghost, .btn-danger-soft, .lead-delete-btn, .delete-btn, .btn-delete, .inv-delete, .inv-delete-action, .plan-remove-btn, .int-danger, .mx-btn-danger, .text-danger, .notif-clear-pill, .activity-clear-btn, .btn-accent, .btn-success, .btn-teal, .btn-warning, .btn-amber, .btn-ai, .btn-light, .pilot-icon-btn, .icon-btn, .rt-red-cross-btn, .is-active, .active, [aria-current="page"], [aria-selected="true"])):hover {
  background: #F1F5F9 !important;
  background-color: #F1F5F9 !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border-color: #94A3B8 !important;
}

/* Active Button / Active Filter Pill / Active Tab / Active Segmented Control on Light Surface */
html body:not(#_a):not(#_b) :is(
  .btn.is-active,
  .btn.active,
  .btn[aria-current="page"],
  .btn[aria-selected="true"],
  .qr-shape-btn.is-active,
  .qr-eye-btn.is-active,
  .template-nav-scroll a.template-tab-active,
  .template-nav-scroll a.is-active,
  .template-nav-scroll a.active,
  .template-nav-scroll a[aria-current="page"],
  .invoice-preview-switcher .preview-tab-btn.active
) {
  background: #0F131E !important;
  background-color: #0F131E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #0F131E !important;
  box-shadow: 0 2px 8px rgba(15, 19, 30, 0.18) !important;
}

/* 2C. Dark Surfaces (.dash-welcome, .pilot-hero, .side-plan, .price-card.highlight):
   Primary Button is Pure White (#FFFFFF) + Obsidian Black (#0F131E) Text */
html body:not(#_a):not(#_b) :is(
  .dash-welcome,
  .pilot-hero,
  .side-plan,
  .sc-mock .side-plan,
  .price-card.highlight,
  .price-card.highlight.card
) :is(.btn-primary, a.btn-primary, button.btn-primary, .side-plan-primary-btn:not(.btn-accent):not(.btn-ghost), .price-cta) {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border: 1px solid #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24) !important;
}

html body:not(#_a):not(#_b) :is(
  .dash-welcome,
  .pilot-hero,
  .side-plan,
  .sc-mock .side-plan,
  .price-card.highlight,
  .price-card.highlight.card
) :is(.btn-primary, a.btn-primary, button.btn-primary, .side-plan-primary-btn:not(.btn-accent):not(.btn-ghost), .price-cta) :is(span, strong, b, svg) {
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  stroke: #0F131E !important;
}

html body:not(#_a):not(#_b) :is(
  .dash-welcome,
  .pilot-hero,
  .side-plan,
  .sc-mock .side-plan,
  .price-card.highlight,
  .price-card.highlight.card
) :is(.btn-primary, a.btn-primary, button.btn-primary, .side-plan-primary-btn:not(.btn-accent):not(.btn-ghost), .price-cta):hover {
  background: #F1F5F9 !important;
  background-color: #F1F5F9 !important;
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  border-color: #E2E8F0 !important;
}

html body:not(#_a):not(#_b) :is(
  .dash-welcome,
  .pilot-hero,
  .side-plan,
  .sc-mock .side-plan,
  .price-card.highlight,
  .price-card.highlight.card
) :is(.btn-primary, a.btn-primary, button.btn-primary, .side-plan-primary-btn:not(.btn-accent):not(.btn-ghost), .price-cta):hover :is(span, strong, b, svg) {
  color: #0F131E !important;
  -webkit-text-fill-color: #0F131E !important;
  stroke: #0F131E !important;
}

/* Dark Surfaces Secondary / Ghost Buttons */
html body:not(#_a):not(#_b) :is(
  .dash-welcome,
  .pilot-hero,
  .side-plan,
  .sc-mock .side-plan
) :is(.btn-ghost, a.btn-ghost, button.btn-ghost, .btn-secondary, .side-plan-secondary-btn, .side-plan-primary-btn.btn-ghost) {
  background: rgba(255, 255, 255, 0.10) !important;
  background-color: rgba(255, 255, 255, 0.10) !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

html body:not(#_a):not(#_b) :is(
  .dash-welcome,
  .pilot-hero,
  .side-plan,
  .sc-mock .side-plan
) :is(.btn-ghost, a.btn-ghost, button.btn-ghost, .btn-secondary, .side-plan-secondary-btn, .side-plan-primary-btn.btn-ghost):hover {
  background: rgba(255, 255, 255, 0.20) !important;
  background-color: rgba(255, 255, 255, 0.20) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.42) !important;
}

/* 3. Guaranteed Vertical Card-to-Card Rhythm & Table Header Spacing (Fixes image_e61cbe.png & image_e61c62.png) */
html body:not(#_a):not(#_b) :is(.admin-content, .app-content, .client-portal-main) > :is(
  .card,
  section.card,
  form.card,
  .card-grid,
  .pilot-grid-main,
  .pilot-grid-3,
  .settings-grid,
  .dashboard-kpis,
  .pilot-kpis,
  .retraak-velocity-grid
):not(:last-child) {
  margin-bottom: 22px !important;
}

html body:not(#_a):not(#_b) .admin-content .card-grid.website-settings-grid.retraak-independent-columns {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 22px !important;
  margin-bottom: 22px !important;
}

html body:not(#_a):not(#_b) :is(
  .email-delivery-log-card,
  .users-table-card,
  .registry-table-card,
  .sent-logs-table-card
) thead th {
  padding: 15px 16px !important;
  background: rgba(248, 250, 252, 0.94) !important;
  border-bottom: 1.5px solid #E2E8F0 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #475569 !important;
  vertical-align: middle !important;
}

/* 4. Clean .empty-state (Fixes Square Box & Hover Glitch in "Recent projects" — image_e618c1.png) */
html body:not(#_a):not(#_b) .empty-state,
html body:not(#_a):not(#_b) .empty-state:hover {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 16px !important;
  padding: 32px 20px !important;
  transform: none !important;
  text-align: center !important;
}

/* Prevent non-interactive outer container cards from jumping or flashing on hover */
html body:not(#_a):not(#_b) :is(
  .dashboard-main > .card,
  .dashboard-stack > .card,
  .email-delivery-log-card,
  .users-table-card,
  .registry-table-card,
  .sent-logs-table-card,
  .website-settings-grid .card,
  .seo-top-card
):hover {
  transform: none !important;
  border-color: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03), inset 0 1px 0 0 #FFFFFF !important;
}

/* 5. Fix Quick Actions 2-Column Grid Right-Edge Overflow (Fixes image_e618c1.png) */
html body:not(#_a):not(#_b) .quick-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

html body:not(#_a):not(#_b) .quick-action {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 10px 11px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  border-radius: 13px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.90) !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03) !important;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease !important;
}

html body:not(#_a):not(#_b) .quick-action > span:first-child {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  flex: 0 0 30px !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #F1F5F9 !important;
  color: #0F131E !important;
  border: 1px solid #E2E8F0 !important;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
}

html body:not(#_a):not(#_b) .quick-action > span:last-child {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #0F131E !important;
  line-height: 1.25 !important;
}

html body:not(#_a):not(#_b) .quick-action:is(:hover, :focus-visible) {
  background: #FFFFFF !important;
  border-color: #0F131E !important;
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.12) !important;
  transform: translateY(-2px) !important;
}

html body:not(#_a):not(#_b) .quick-action:is(:hover, :focus-visible) > span:first-child {
  background: #0F131E !important;
  border-color: #0F131E !important;
  color: #FFFFFF !important;
  transform: none !important;
  box-shadow: 0 4px 10px rgba(15, 19, 30, 0.20) !important;
}


/* ==========================================================================
   V957 GLOBAL SOLID DESTRUCTIVE RED, STICKY PREVIEW & BUTTON ORDER ARCHITECTURE
   1. Every Delete, Clear, Remove, Revoke, Purge & Disconnect Button is SOLID RED (#DC2626 + #FFFFFF)
   2. Strict Button Size Uniformity (Table Row Buttons 100% Identical 30px Height & Padding)
   3. Sticky Live Email & Document Preview Columns Follow Down to Write Section
   4. Global UI/UX Semantic & Emotion Color System (Success, Warning, Accent, AI, Danger)
   ========================================================================== */

/* 1. ALL Delete, Clear, Remove, Revoke, Purge & Disconnect Buttons Globally = SOLID CRIMSON RED (#DC2626 + #FFFFFF) */
html body:not(#_a):not(#_b):not(#_c) :is(
  .btn-danger,
  button.btn-danger,
  a.btn-danger,
  .lead-delete-btn,
  .btn.lead-delete-btn,
  .btn-xs.lead-delete-btn,
  .btn-sm.lead-delete-btn,
  .btn-ghost.lead-delete-btn,
  .btn-secondary.lead-delete-btn,
  .user-row-btn.lead-delete-btn,
  .btn-danger-ghost,
  .btn-danger-soft,
  .delete-btn,
  .btn-delete,
  .inv-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  .int-danger,
  .notif-clear-pill,
  .activity-clear-btn,
  button.text-danger,
  a.text-danger.btn,
  .rui-confirm .rui-btn-ok.btn-danger,
  #bulk-delete-btn,
  #bulk-delete-leads-btn,
  #crm-delete-selected-leads,
  #btn-delete-lead-modal,
  #sig-upload-remove,
  #sow-upload-remove,
  #sig-clear-canvas,
  #sow-clear-canvas,
  button[data-notif-clear-all],
  form:has(input[name="action"][value*="delete" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="remove" i]):not(:has(input[value="remove_avatar"])) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="clear" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="purge" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="revoke" i]) button[type="submit"]:not(.rui-btn-ok),
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok),
  button[name="action"][value*="revoke" i]:not(.rui-btn-ok),
  button[title*="Delete" i]:not(.rui-btn-ok),
  button[title*="Remove" i]:not(.rui-btn-ok)
):not(.avatar-remove-text-btn):not(.pilot-icon-btn):not(.icon-btn):not(.rt-red-cross-btn):not(.message-delete-btn):not(.dialog-close-btn):not(.modal-close-btn) {
  background: #DC2626 !important;
  background-color: #DC2626 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #DC2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.22) !important;
  font-weight: 700 !important;
}

html body:not(#_a):not(#_b):not(#_c) :is(
  .btn-danger,
  button.btn-danger,
  a.btn-danger,
  .lead-delete-btn,
  .btn.lead-delete-btn,
  .btn-xs.lead-delete-btn,
  .btn-sm.lead-delete-btn,
  .btn-ghost.lead-delete-btn,
  .btn-secondary.lead-delete-btn,
  .user-row-btn.lead-delete-btn,
  .btn-danger-ghost,
  .btn-danger-soft,
  .delete-btn,
  .btn-delete,
  .inv-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  .int-danger,
  .notif-clear-pill,
  .activity-clear-btn,
  button.text-danger,
  a.text-danger.btn
):not(.avatar-remove-text-btn):not(.pilot-icon-btn):not(.icon-btn):not(.rt-red-cross-btn):not(.message-delete-btn) :is(span, strong, small, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

/* Hover / Focus / Active State on All Destructive Red Buttons -> Deep Crimson (#B91C1C) + Pure White (#FFFFFF) */
html body:not(#_a):not(#_b):not(#_c) :is(
  .btn-danger,
  button.btn-danger,
  a.btn-danger,
  .lead-delete-btn,
  .btn.lead-delete-btn,
  .btn-xs.lead-delete-btn,
  .btn-sm.lead-delete-btn,
  .btn-ghost.lead-delete-btn,
  .btn-secondary.lead-delete-btn,
  .user-row-btn.lead-delete-btn,
  .btn-danger-ghost,
  .btn-danger-soft,
  .delete-btn,
  .btn-delete,
  .inv-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  .int-danger,
  .notif-clear-pill,
  .activity-clear-btn,
  button.text-danger,
  a.text-danger.btn,
  .rui-confirm .rui-btn-ok.btn-danger,
  #bulk-delete-btn,
  #bulk-delete-leads-btn,
  #crm-delete-selected-leads,
  #btn-delete-lead-modal,
  #sig-upload-remove,
  #sow-upload-remove,
  #sig-clear-canvas,
  #sow-clear-canvas,
  button[data-notif-clear-all],
  form:has(input[name="action"][value*="delete" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="remove" i]):not(:has(input[value="remove_avatar"])) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="clear" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="purge" i]) button[type="submit"]:not(.rui-btn-ok),
  form:has(input[name="action"][value*="revoke" i]) button[type="submit"]:not(.rui-btn-ok),
  button[name="action"][value*="delete" i]:not(.rui-btn-ok),
  button[name="action"][value*="remove" i]:not(.rui-btn-ok),
  button[name="action"][value*="clear" i]:not(.rui-btn-ok),
  button[name="action"][value*="purge" i]:not(.rui-btn-ok),
  button[name="action"][value*="revoke" i]:not(.rui-btn-ok),
  button[title*="Delete" i]:not(.rui-btn-ok),
  button[title*="Remove" i]:not(.rui-btn-ok)
):not(.avatar-remove-text-btn):not(.pilot-icon-btn):not(.icon-btn):not(.rt-red-cross-btn):not(.message-delete-btn):not(.dialog-close-btn):not(.modal-close-btn):is(:hover, :focus-visible, :active) {
  background: #B91C1C !important;
  background-color: #B91C1C !important;
  background-image: none !important;
  border-color: #B91C1C !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.30) !important;
}

html body:not(#_a):not(#_b):not(#_c) :is(
  .btn-danger,
  button.btn-danger,
  a.btn-danger,
  .lead-delete-btn,
  .btn.lead-delete-btn,
  .btn-xs.lead-delete-btn,
  .btn-sm.lead-delete-btn,
  .btn-ghost.lead-delete-btn,
  .btn-secondary.lead-delete-btn,
  .user-row-btn.lead-delete-btn,
  .btn-danger-ghost,
  .btn-danger-soft,
  .delete-btn,
  .btn-delete,
  .inv-delete,
  .inv-delete-action,
  .plan-remove-btn,
  .invoice-custom-remove,
  .mx-btn-danger,
  .int-danger,
  .notif-clear-pill,
  .activity-clear-btn,
  button.text-danger,
  a.text-danger.btn
):not(.avatar-remove-text-btn):not(.pilot-icon-btn):not(.icon-btn):not(.rt-red-cross-btn):not(.message-delete-btn):is(:hover, :focus-visible, :active) :is(span, strong, small, svg) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

/* 2. Strict Global UI/UX Button Sizing Scale (Fixes Size Mismatch in image_e537df.png & image_e45ac1.png) */
/* 2A. All Table Row Action Buttons Inside <td> Have Identical 30px Height, 0 12px Padding, 12px Font & 8px Radius */
html body:not(#_a):not(#_b) td :is(
  .btn,
  a.btn,
  button.btn,
  .btn-xs,
  .btn-sm,
  .lead-delete-btn,
  .user-row-btn,
  .mx-btn
):not(.pilot-icon-btn):not(.icon-btn):not(.rt-red-cross-btn):not(.message-delete-btn) {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

/* 2B. Outside Table Cells: Strict 3-Tier Size Scale (.btn-xs = 28px, .btn-sm = 34px, .btn = 38px) */
html body:not(#_a):not(#_b) :is(.btn-xs, a.btn-xs, button.btn-xs):not(td *):not(.pilot-icon-btn):not(.icon-btn):not(.rt-red-cross-btn):not(.notif-clear-pill) {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  box-sizing: border-box !important;
}

html body:not(#_a):not(#_b) :is(.btn-sm, a.btn-sm, button.btn-sm):not(td *):not(.btn-xs):not(.activity-clear-btn):not(.pilot-icon-btn):not(.icon-btn):not(.rt-red-cross-btn):not(.contact-tabs *):not(.pilot-tabs *):not(.fx-tabs *):not(.registry-tabs *) {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}

/* Filter & Search Bar Buttons Match 38px Search Input Height */
html body:not(#_a):not(#_b) :is(
  .task-filter,
  .project-search-form,
  .activity-filters-form,
  .fx-toolbar,
  .crm-search-bar,
  .ent-search,
  .admin-filter-bar,
  .user-filter-form,
  .admin-orders-search,
  form[method="get"]:not(.registry-search)
) :is(.btn, a.btn, button.btn, button[type="submit"], .lead-delete-btn):not(td *):not(.pilot-icon-btn):not(.icon-btn):not(.cc-search-clear):not(.crm-search-clear) {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* 3. Sticky Live Email & Document Preview Column Architecture (Fixes image_e459aa.png & image_e456e0.png) */
@media (min-width: 1041px) {
  html body:not(#_a):not(#_b) :is(.crm-studio-split, .individual-message-layout, .outreach-layout) {
    align-items: stretch !important;
    position: relative !important;
  }
  html body:not(#_a):not(#_b) :is(.crm-studio-right-col, .outreach-right-col) {
    position: relative !important;
    min-width: 0 !important;
    align-self: stretch !important;
    display: block !important;
  }
  html body:not(#_a):not(#_b) :is(.crm-sticky-preview-holder, .outreach-sticky-holder) {
    position: sticky !important;
    top: 84px !important;
    z-index: 18 !important;
    height: auto !important;
  }
  html body:not(#_a):not(#_b) :is(
    .campaigns-live-preview-card,
    .individual-preview-card,
    .outreach-preview,
    .document-preview-card
  ) {
    position: sticky !important;
    top: 84px !important;
    align-self: start !important;
    height: auto !important;
    max-height: none !important;
    z-index: 18 !important;
  }
}

/* 4. Global UI/UX Semantic & Emotion Color System (Success, Warning, Accent, AI) */
/* Positive / Success Emotion Buttons (.btn-success, .btn-teal) */
html body:not(#_a):not(#_b) :is(.btn-success, .btn-teal, button.btn-teal, a.btn-teal):not(.lead-delete-btn):not(.btn-danger) {
  background: #059669 !important;
  background-color: #059669 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #059669 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.20) !important;
}
html body:not(#_a):not(#_b) :is(.btn-success, .btn-teal, button.btn-teal, a.btn-teal):not(.lead-delete-btn):not(.btn-danger):hover {
  background: #047857 !important;
  background-color: #047857 !important;
  border-color: #047857 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* Warning / Caution Emotion Buttons (.btn-warning, .btn-amber) */
html body:not(#_a):not(#_b) :is(.btn-warning, .btn-amber, button.btn-amber, a.btn-amber):not(.lead-delete-btn):not(.btn-danger) {
  background: #FFFBEB !important;
  background-color: #FFFBEB !important;
  color: #B45309 !important;
  -webkit-text-fill-color: #B45309 !important;
  border: 1px solid #FCD34D !important;
}
html body:not(#_a):not(#_b) :is(.btn-warning, .btn-amber, button.btn-amber, a.btn-amber):not(.lead-delete-btn):not(.btn-danger):hover {
  background: #D97706 !important;
  background-color: #D97706 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #D97706 !important;
}

/* Brand Accent / Interactive Info Buttons (.btn-accent, .btn-info) */
html body:not(#_a):not(#_b) :is(.btn-accent, .btn-info):not(.side-plan *):not(.lead-delete-btn):not(.btn-danger) {
  background: #1D49E8 !important;
  background-color: #1D49E8 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #1D49E8 !important;
  box-shadow: 0 2px 8px rgba(29, 73, 232, 0.22) !important;
}
html body:not(#_a):not(#_b) :is(.btn-accent, .btn-info):not(.side-plan *):not(.lead-delete-btn):not(.btn-danger):hover {
  background: #1839B8 !important;
  background-color: #1839B8 !important;
  border-color: #1839B8 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}
