/* ============================================================================
 * Modern UI 2 — client portal (customers area, knowledge base, public docs)
 * Same design language as the admin, always light: customers never inherit a
 * staff member's dark-mode choice. Scoped to html.mvx-ui + body.customers.
 * ========================================================================== */
html.mvx-ui {
  --ui-accent: #4f46e5; --ui-accent-2: #7c3aed; --ui-accent-rgb: 79, 70, 229;
  --ui-accent-soft: rgba(var(--ui-accent-rgb), .08); --ui-accent-ring: rgba(var(--ui-accent-rgb), .18);
  --ui-accent-hover: color-mix(in srgb, var(--ui-accent) 88%, #000);
  --ui-bg: #fafafa; --ui-card: #fff; --ui-card-2: #fafafa; --ui-ink: #09090b; --ui-ink-2: #3f3f46; --ui-muted: #71717a; --ui-faint: #a1a1aa;
  --ui-line: #e4e4e7; --ui-line-2: #d4d4d8; --ui-hover: #f4f4f5;
  --ui-success: #16a34a; --ui-warning: #d97706; --ui-danger: #dc2626; --ui-info: #0284c7;
  --ui-radius: 12px; --ui-radius-sm: 8px;
  --ui-shadow-xs: 0 1px 2px rgba(9, 9, 11, .05);
  --ui-shadow-sm: 0 1px 2px rgba(9, 9, 11, .04), 0 1px 3px rgba(9, 9, 11, .03);
  --ui-shadow-lg: 0 16px 40px -8px rgba(9, 9, 11, .16), 0 4px 10px -4px rgba(9, 9, 11, .06);
  --ui-font: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ui-mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --ui-ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
html.mvx-ui body.customers { font-family: var(--ui-font); font-size: 14px; color: var(--ui-ink-2); background: var(--ui-bg); -webkit-font-smoothing: antialiased; }
html.mvx-ui body.customers h1, html.mvx-ui body.customers h2, html.mvx-ui body.customers h3, html.mvx-ui body.customers h4, html.mvx-ui body.customers h5 { color: var(--ui-ink); letter-spacing: -.02em; font-family: var(--ui-font); }
html.mvx-ui body.customers a { color: var(--ui-accent); transition: color .15s; }
html.mvx-ui body.customers a:hover { color: var(--ui-accent-hover); text-decoration: none; }
html.mvx-ui body.customers ::selection { background: rgba(var(--ui-accent-rgb), .2); }
html.mvx-ui body.customers :focus-visible { outline: 2px solid rgba(var(--ui-accent-rgb), .55); outline-offset: 2px; }
html.mvx-ui body.customers .table, html.mvx-ui body.customers .total, html.mvx-ui body.customers .amount { font-variant-numeric: tabular-nums; }
html.mvx-ui body.customers .text-muted { color: var(--ui-muted) !important; }

/* ── Navigation bar ───────────────────────────────────────────────────────── */
html.mvx-ui body.customers .navbar.header {
  position: sticky; top: 0; z-index: 50; min-height: 60px; margin: 0; border: 0; border-bottom: 1px solid var(--ui-line); border-radius: 0;
  background: color-mix(in srgb, #fff 92%, transparent); box-shadow: none;
}
@supports (backdrop-filter: blur(8px)) { html.mvx-ui body.customers .navbar.header { backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); } }
html.mvx-ui body.customers .navbar.header .navbar-brand { height: 60px; padding: 12px 15px; display: flex; align-items: center; }
html.mvx-ui body.customers .navbar.header .navbar-brand img { max-height: 46px; width: auto; }
@media (min-width: 768px) {
  html.mvx-ui body.customers .navbar.header .navbar-collapse { display: flex !important; justify-content: flex-end; align-items: center; min-height: 60px; }
  html.mvx-ui body.customers .navbar.header .navbar-nav { display: flex; align-items: center; gap: 2px; float: none; margin: 0 -15px 0 0; }
  html.mvx-ui body.customers .navbar.header .navbar-nav > li { float: none; }
}
html.mvx-ui body.customers .navbar-default .navbar-nav > li > a {
  color: var(--ui-ink-2); font-size: 13.5px; font-weight: 500; padding: 7px 12px !important; margin: 0 !important; border-radius: 8px; line-height: 20px; transition: background .15s, color .15s;
}
html.mvx-ui body.customers .navbar-default .navbar-nav > li > a:hover, html.mvx-ui body.customers .navbar-default .navbar-nav > li > a:focus { background: var(--ui-hover); color: var(--ui-ink); }
html.mvx-ui body.customers .navbar-default .navbar-nav > .active > a, html.mvx-ui body.customers .navbar-default .navbar-nav > .active > a:hover { background: var(--ui-accent-soft); color: var(--ui-accent); }
html.mvx-ui body.customers .navbar-default .navbar-nav > li > a i { color: var(--ui-faint); margin-right: 4px; }
html.mvx-ui body.customers .navbar-default .navbar-nav > .open > a, html.mvx-ui body.customers .navbar-default .navbar-nav > .open > a:hover { background: var(--ui-hover); color: var(--ui-ink); }
html.mvx-ui body.customers .customers-nav-item-profile > a { padding: 4px !important; margin-left: 6px !important; }
html.mvx-ui body.customers .kb-search-jumbotron + .container, html.mvx-ui body.customers .kb-search-jumbotron ~ .container { margin-top: 28px; }
html.mvx-ui body.customers .client-profile-image-small { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px var(--ui-line); }
/* "Login" / "Register" entries read as buttons */
html.mvx-ui body.customers .customers-nav-item-login > a { background: var(--ui-accent) !important; color: #fff !important; box-shadow: var(--ui-shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .15); }
html.mvx-ui body.customers .customers-nav-item-login > a:hover { background: var(--ui-accent-hover) !important; }
html.mvx-ui body.customers .customers-nav-item-register > a { border: 1px solid var(--ui-line-2); background: #fff; }
html.mvx-ui body.customers .navbar-toggle { border-color: var(--ui-line); border-radius: 8px; margin-top: 13px; }
html.mvx-ui body.customers .navbar-toggle .icon-bar { background: var(--ui-ink-2); }
html.mvx-ui body.customers .navbar-collapse { border-color: var(--ui-line); box-shadow: none; }

/* Sub-menu (Files / Calendar) as a segmented strip */
html.mvx-ui body.customers .submenu.customer-top-submenu {
  display: inline-flex; gap: 2px; padding: 3px; margin: 24px 15px 4px; border-radius: 10px; background: var(--ui-hover); border: 1px solid var(--ui-line); list-style: none; float: none;
}
html.mvx-ui body.customers .submenu.customer-top-submenu li { float: none; margin: 0; }
html.mvx-ui body.customers .submenu.customer-top-submenu li a { padding: 6px 12px; border-radius: 7px; color: var(--ui-muted); font-size: 13px; font-weight: 500; }
html.mvx-ui body.customers .submenu.customer-top-submenu li a:hover { background: #fff; color: var(--ui-ink); box-shadow: var(--ui-shadow-sm); }
html.mvx-ui body.customers .submenu.customer-top-submenu li a svg { width: 16px; height: 16px; color: var(--ui-faint); }

/* ── Content ──────────────────────────────────────────────────────────────── */
html.mvx-ui body.customers #wrapper, html.mvx-ui body.customers #content { background: transparent; }
html.mvx-ui body.customers #content { padding-bottom: 40px; }
html.mvx-ui body.customers .section-client-dashboard { padding-top: 28px; }
html.mvx-ui body.customers #greeting { font-size: 26px; font-weight: 650; letter-spacing: -.03em; }
html.mvx-ui body.customers .tw-text-lg.tw-font-medium { font-size: 15px; font-weight: 600; color: var(--ui-ink) !important; }
html.mvx-ui body.customers .panel_s, html.mvx-ui body.customers .panel {
  background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow-sm);
}
html.mvx-ui body.customers .panel_s > .panel-body { padding: 20px; }
html.mvx-ui body.customers .panel-heading { background: transparent !important; border-bottom: 1px solid var(--ui-line) !important; border-radius: var(--ui-radius) var(--ui-radius) 0 0; font-weight: 600; color: var(--ui-ink); }
html.mvx-ui body.customers .panel-footer { background: var(--ui-card-2); border-top: 1px solid var(--ui-line); border-radius: 0 0 var(--ui-radius) var(--ui-radius); }
html.mvx-ui body.customers hr { border-color: var(--ui-line); }
html.mvx-ui body.customers .well { background: var(--ui-card-2); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); box-shadow: none; }
html.mvx-ui body.customers .tw-rounded-lg.tw-border, html.mvx-ui body.customers .tw-rounded-md.tw-border { border-color: var(--ui-line) !important; }
html.mvx-ui body.customers .progress { background: var(--ui-hover); border-radius: 999px; box-shadow: none; height: 6px; }
html.mvx-ui body.customers .progress-bar { background-color: var(--ui-accent); background-image: none; box-shadow: none; }
html.mvx-ui body.customers .progress-bar-success { background-color: var(--ui-success); }
html.mvx-ui body.customers .progress-bar-danger { background-color: var(--ui-danger); }
html.mvx-ui body.customers .progress-bar-warning { background-color: var(--ui-warning); }

/* ── Buttons & forms ──────────────────────────────────────────────────────── */
html.mvx-ui body.customers .btn { border-radius: var(--ui-radius-sm); font-weight: 500; font-size: 13.5px; padding: 7px 14px; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
html.mvx-ui body.customers .btn-primary, html.mvx-ui body.customers .btn-info {
  background: var(--ui-accent); border: 1px solid color-mix(in srgb, var(--ui-accent) 80%, #000); color: #fff;
  box-shadow: 0 1px 2px rgba(9, 9, 11, .14), inset 0 1px 0 rgba(255, 255, 255, .14);
}
html.mvx-ui body.customers .btn-primary:hover, html.mvx-ui body.customers .btn-primary:focus, html.mvx-ui body.customers .btn-info:hover { background: var(--ui-accent-hover); color: #fff; }
html.mvx-ui body.customers .btn-default { background: #fff; border: 1px solid var(--ui-line-2); color: var(--ui-ink); box-shadow: var(--ui-shadow-xs); }
html.mvx-ui body.customers .btn-default:hover { background: var(--ui-hover); color: var(--ui-ink); }
html.mvx-ui body.customers .btn-success { background: var(--ui-success); border-color: color-mix(in srgb, var(--ui-success) 80%, #000); color: #fff; }
html.mvx-ui body.customers .btn-danger { background: var(--ui-danger); border-color: color-mix(in srgb, var(--ui-danger) 80%, #000); color: #fff; }
html.mvx-ui body.customers .btn-sm { padding: 4px 10px; font-size: 12.5px; }
html.mvx-ui body.customers .form-control, html.mvx-ui body.customers .bootstrap-select > .dropdown-toggle {
  border-radius: var(--ui-radius-sm); border: 1px solid var(--ui-line-2); background: #fff; color: var(--ui-ink); box-shadow: var(--ui-shadow-xs); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
html.mvx-ui body.customers input.form-control, html.mvx-ui body.customers select.form-control { height: 40px; }
html.mvx-ui body.customers .form-control:focus, html.mvx-ui body.customers .bootstrap-select.open > .dropdown-toggle { border-color: var(--ui-accent) !important; box-shadow: 0 0 0 3px var(--ui-accent-ring) !important; outline: 0; }
html.mvx-ui body.customers .form-control::placeholder { color: var(--ui-faint); }
html.mvx-ui body.customers label, html.mvx-ui body.customers .control-label { color: var(--ui-ink-2); font-weight: 500; font-size: 13px; }
html.mvx-ui body.customers .input-group-addon { background: var(--ui-card-2); border-color: var(--ui-line-2); color: var(--ui-muted); }
html.mvx-ui body.customers .checkbox input[type=checkbox]:checked + label::before { background: var(--ui-accent); border-color: var(--ui-accent); }

/* ── Tables ───────────────────────────────────────────────────────────────── */
html.mvx-ui body.customers .table { font-size: 13.5px; color: var(--ui-ink); }
html.mvx-ui body.customers .table > thead > tr > th {
  background: var(--ui-card-2); color: var(--ui-muted); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0;
  border-bottom: 1px solid var(--ui-line) !important; border-top: 0 !important; padding: 9px 14px; white-space: nowrap;
}
html.mvx-ui body.customers .table > tbody > tr > td { border-top: 1px solid var(--ui-line); padding: 11px 14px; vertical-align: middle; }
html.mvx-ui body.customers .table-hover > tbody > tr:hover, html.mvx-ui body.customers table.dataTable tbody tr:hover { background: var(--ui-hover); }
html.mvx-ui body.customers .table td a:not(.btn):not(.label) { color: var(--ui-ink); font-weight: 500; }
html.mvx-ui body.customers .table td a:not(.btn):not(.label):hover { color: var(--ui-accent); }
html.mvx-ui body.customers .dataTables_wrapper .dataTables_filter input, html.mvx-ui body.customers .dataTables_wrapper .dataTables_length select { border-radius: var(--ui-radius-sm); border: 1px solid var(--ui-line-2); height: 34px; }
html.mvx-ui body.customers .dataTables_info { color: var(--ui-muted); font-size: 12.5px; }
html.mvx-ui body.customers .pagination > li > a, html.mvx-ui body.customers .pagination > li > span { border: 1px solid transparent; border-radius: 7px !important; color: var(--ui-ink-2); margin: 0 1px; font-size: 12.5px; }
html.mvx-ui body.customers .pagination > .active > a, html.mvx-ui body.customers .pagination > .active > span { background: #fff; border-color: var(--ui-line-2); color: var(--ui-ink); box-shadow: var(--ui-shadow-xs); }

/* ── Status pills ─────────────────────────────────────────────────────────── */
html.mvx-ui body.customers .label { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; border: 1px solid transparent; }
html.mvx-ui body.customers .label-default { background: var(--ui-hover); color: var(--ui-ink-2); border-color: var(--ui-line); }
html.mvx-ui body.customers .label-success { background: color-mix(in srgb, var(--ui-success) 11%, #fff); color: #15803d; border-color: color-mix(in srgb, var(--ui-success) 22%, transparent); }
html.mvx-ui body.customers .label-danger { background: color-mix(in srgb, var(--ui-danger) 9%, #fff); color: #b91c1c; border-color: color-mix(in srgb, var(--ui-danger) 20%, transparent); }
html.mvx-ui body.customers .label-warning { background: color-mix(in srgb, var(--ui-warning) 11%, #fff); color: #b45309; border-color: color-mix(in srgb, var(--ui-warning) 24%, transparent); }
html.mvx-ui body.customers .label-info { background: color-mix(in srgb, var(--ui-info) 10%, #fff); color: #0369a1; border-color: color-mix(in srgb, var(--ui-info) 22%, transparent); }
html.mvx-ui body.customers .label-primary { background: var(--ui-accent-soft); color: var(--ui-accent); border-color: var(--ui-accent-ring); }
html.mvx-ui body.customers .label[style*="color"] { background: color-mix(in srgb, currentColor 9%, transparent) !important; border-color: color-mix(in srgb, currentColor 24%, transparent) !important; }
html.mvx-ui body.customers .badge { border-radius: 6px; font-weight: 600; font-size: 11px; }

/* ── Dropdowns, tabs, modals, alerts ──────────────────────────────────────── */
html.mvx-ui body.customers .dropdown-menu { border: 1px solid var(--ui-line); border-radius: 10px; box-shadow: var(--ui-shadow-lg); padding: 4px; font-size: 13.5px; }
html.mvx-ui body.customers .dropdown-menu > li > a { border-radius: 6px; padding: 7px 10px; color: var(--ui-ink-2); }
html.mvx-ui body.customers .dropdown-menu > li > a:hover { background: var(--ui-hover); color: var(--ui-ink); }
html.mvx-ui body.customers .dropdown-menu > .active > a { background: var(--ui-accent-soft); color: var(--ui-accent); }
html.mvx-ui body.customers .dropdown-menu .divider { background: var(--ui-line); margin: 4px -4px; }
html.mvx-ui body.customers .nav-tabs { border-bottom: 1px solid var(--ui-line); }
html.mvx-ui body.customers .nav-tabs > li > a { border: 0 !important; background: transparent !important; color: var(--ui-muted); font-weight: 500; padding: 10px 2px; margin-right: 14px; border-radius: 0; }
html.mvx-ui body.customers .nav-tabs > li > a:hover { color: var(--ui-ink); box-shadow: inset 0 -2px 0 var(--ui-line-2); }
html.mvx-ui body.customers .nav-tabs > li.active > a { color: var(--ui-ink) !important; box-shadow: inset 0 -2px 0 var(--ui-accent); font-weight: 600; }
html.mvx-ui body.customers .modal-content { border: 1px solid var(--ui-line); border-radius: 14px; box-shadow: 0 32px 80px -16px rgba(9, 9, 11, .32); overflow: hidden; }
html.mvx-ui body.customers .modal-header { border-bottom: 1px solid var(--ui-line); padding: 16px 20px; }
html.mvx-ui body.customers .modal-title { font-weight: 600; font-size: 16px; }
html.mvx-ui body.customers .modal-footer { border-top: 1px solid var(--ui-line); background: var(--ui-card-2); }
html.mvx-ui body.customers .alert { border-radius: 10px; font-size: 13.5px; }
html.mvx-ui body.customers .alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
html.mvx-ui body.customers .alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
html.mvx-ui body.customers .alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
html.mvx-ui body.customers .alert-info { background: #f0f9ff; border-color: #bae6fd; color: #075985; }
html.mvx-ui body.customers .float-alert { background: #fff !important; color: var(--ui-ink) !important; border: 1px solid var(--ui-line) !important; border-radius: 12px !important; box-shadow: var(--ui-shadow-lg) !important; }

/* ── Sign-in / register / forgot password ─────────────────────────────────── */
html.mvx-ui body.customers .login-heading, html.mvx-ui body.customers .register-heading { font-size: 28px; font-weight: 650; letter-spacing: -.03em; margin-top: 24px; }
html.mvx-ui body.customers .login-form .panel_s, html.mvx-ui body.customers form .panel_s:only-child { box-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 12px 32px -12px rgba(9, 9, 11, .12); border-radius: 14px; }
html.mvx-ui body.customers .login-form .panel-body { padding: 26px 26px 22px !important; }
html.mvx-ui body.customers .login-form .btn-primary { width: 100%; height: 42px; }

/* ── Knowledge base hero ──────────────────────────────────────────────────── */
html.mvx-ui body.customers .kb-search-jumbotron {
  margin: 0; padding: 64px 0 56px; border-radius: 0; color: #fafafa; position: relative; overflow: hidden; isolation: isolate;
  background: #0b0b0f;
}
html.mvx-ui body.customers .kb-search-jumbotron::before {
  content: ""; position: absolute; inset: -40% 10% auto; height: 120%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--ui-accent-rgb), .5), transparent 70%); filter: blur(30px);
}
html.mvx-ui body.customers .kb-search-jumbotron .kb-search-heading { color: #fafafa; font-size: 34px; font-weight: 650; letter-spacing: -.035em; }
html.mvx-ui body.customers .kb-search-jumbotron .kb-search-input { height: 48px; border-radius: 12px 0 0 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; font-size: 15px; box-shadow: none; padding-left: 16px; }
html.mvx-ui body.customers .kb-search-jumbotron .kb-search-input::placeholder { color: rgba(255, 255, 255, .45); }
html.mvx-ui body.customers .kb-search-jumbotron .kb-search-input:focus { border-color: rgba(255, 255, 255, .35) !important; box-shadow: 0 0 0 3px rgba(var(--ui-accent-rgb), .35) !important; background: rgba(255, 255, 255, .1); }
html.mvx-ui body.customers .kb-search-jumbotron .kb-search-button { height: 48px; border-radius: 0 12px 12px 0; padding: 0 22px; }
html.mvx-ui body.customers .kb-search-jumbotron .form-control-feedback { display: none; }
html.mvx-ui body.customers .article-heading, html.mvx-ui body.customers .kb-article-single-heading { letter-spacing: -.025em; font-weight: 650; }
html.mvx-ui body.customers .article_group_wrapper, html.mvx-ui body.customers .kb-article-group { border-radius: var(--ui-radius); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
html.mvx-ui body.customers footer.footer { background: transparent; border-top: 1px solid var(--ui-line); color: var(--ui-faint); font-size: 12.5px; padding: 22px 0; margin-top: 32px; }
html.mvx-ui body.customers footer.footer a { color: var(--ui-muted); }

/* ── Public documents (invoice / estimate / proposal / contract HTML views) ─ */
html.mvx-ui body.customers.viewinvoice #content, html.mvx-ui body.customers.viewestimate #content,
html.mvx-ui body.customers.viewproposal #content, html.mvx-ui body.customers.viewcontract #content { padding-top: 24px; }
html.mvx-ui body.customers .invoice-html-status, html.mvx-ui body.customers .estimate-html-status { border-radius: 6px; }

/* ── Motion ───────────────────────────────────────────────────────────────── */
html.mvx-ui.mvx-anim body.customers #content > .container { animation: mvx-p-in .4s var(--ui-ease) backwards; }
html.mvx-ui.mvx-anim body.customers .dropdown.open > .dropdown-menu { animation: mvx-p-drop .16s var(--ui-ease); }
@keyframes mvx-p-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes mvx-p-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  html.mvx-ui body.customers *, html.mvx-ui body.customers *::before { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
@media (max-width: 767px) {
  html.mvx-ui body.customers .navbar-default .navbar-nav > li > a { margin: 2px 0; }
  html.mvx-ui body.customers .kb-search-jumbotron .kb-search-heading { font-size: 26px; }
}

/* ============================================================================
 * v2.2 — bento portal: softer surfaces, tile-style summaries on every page,
 * sliding nav indicator, page transitions and staggered reveals (mvx-portal.js).
 * Reveal classes animate with `backwards` fill only, so nothing keeps a transform
 * once settled (a transformed ancestor would trap Bootstrap modals).
 * ========================================================================== */
html.mvx-ui body.customers { --mpx-r: 18px; --mpx-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 18px 40px -22px rgba(9, 9, 11, .14); --mpx-shadow-hover: 0 2px 4px rgba(9, 9, 11, .04), 0 24px 48px -22px rgba(9, 9, 11, .22); }
html.mvx-ui body.customers::before {
  content: ""; position: fixed; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 15% 0, rgba(var(--ui-accent-rgb), .07), transparent 70%), radial-gradient(40% 80% at 90% 0, rgba(var(--ui-accent-rgb), .045), transparent 70%);
}
html.mvx-ui body.customers #wrapper { background: transparent; }

/* Surfaces */
html.mvx-ui body.customers .panel_s, html.mvx-ui body.customers .panel { border-radius: var(--mpx-r); border-color: color-mix(in srgb, var(--ui-line) 75%, transparent); box-shadow: var(--mpx-shadow); }
html.mvx-ui body.customers .panel_s > .panel-body { padding: 22px 24px; }
html.mvx-ui body.customers .panel-heading { border-radius: var(--mpx-r) var(--mpx-r) 0 0; padding: 14px 22px; }
html.mvx-ui body.customers .panel-footer { border-radius: 0 0 var(--mpx-r) var(--mpx-r); }
html.mvx-ui body.customers .section-heading, html.mvx-ui body.customers .tickets-summary-heading, html.mvx-ui body.customers .projects-summary-heading, html.mvx-ui body.customers .invoices-quick-info-heading {
  font-size: 20px !important; font-weight: 650 !important; letter-spacing: -.025em; color: var(--ui-ink) !important;
}

/* Summary strips become bento tiles: projects / tickets status cards */
html.mvx-ui body.customers dl.tw-grid > a {
  position: relative; display: block; background: #fff !important; border: 1px solid color-mix(in srgb, var(--ui-line) 75%, transparent) !important; border-radius: 16px !important;
  box-shadow: var(--mpx-shadow); transition: transform .35s var(--ui-ease), box-shadow .35s var(--ui-ease), border-color .2s; overflow: hidden;
}
html.mvx-ui body.customers dl.tw-grid > a > div { padding: 16px 18px !important; }
html.mvx-ui body.customers dl.tw-grid > a dd > div { font-size: 26px !important; font-weight: 700; letter-spacing: -.03em; color: var(--ui-ink) !important; font-variant-numeric: tabular-nums; }
html.mvx-ui body.customers dl.tw-grid > a dt { font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
html.mvx-ui body.customers dl.tw-grid > a dt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
html.mvx-ui body.customers dl.tw-grid > a:hover { transform: translateY(-2px); box-shadow: var(--mpx-shadow-hover); border-color: rgba(var(--ui-accent-rgb), .3) !important; }
html.mvx-ui body.customers dl.tw-grid > a:active { transform: translateY(0) scale(.985); }

/* Invoice / estimate quick stats: each column is a tile */
html.mvx-ui body.customers .invoice-quick-info, html.mvx-ui body.customers .estimates-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 6px; }
html.mvx-ui body.customers .invoice-quick-info::before, html.mvx-ui body.customers .invoice-quick-info::after,
html.mvx-ui body.customers .estimates-stats::before, html.mvx-ui body.customers .estimates-stats::after { display: none; }
html.mvx-ui body.customers .invoice-quick-info > [class*="col-"], html.mvx-ui body.customers .estimates-stats > [class*="col-"] {
  width: auto; float: none; padding: 14px 16px; border-radius: 14px; background: var(--ui-card-2); border: 1px solid var(--ui-line); transition: border-color .2s, background .2s;
}
html.mvx-ui body.customers .invoice-quick-info > [class*="col-"]:hover, html.mvx-ui body.customers .estimates-stats > [class*="col-"]:hover { background: #fff; border-color: rgba(var(--ui-accent-rgb), .3); }
html.mvx-ui body.customers .invoice-quick-info .progress, html.mvx-ui body.customers .estimates-stats .progress { margin: 10px 0 0; height: 5px; }
html.mvx-ui.mvx-anim body.customers .progress-bar { transition: width 1s var(--ui-ease) .2s; }

/* Tables: row hover rail */
html.mvx-ui body.customers .table > tbody > tr { transition: background .15s; }
html.mvx-ui body.customers .table > tbody > tr > td:first-child { box-shadow: inset 2px 0 0 transparent; transition: box-shadow .2s; }
html.mvx-ui body.customers .table > tbody > tr:hover > td:first-child { box-shadow: inset 2px 0 0 var(--ui-accent); }

/* Tactile buttons */
html.mvx-ui body.customers .btn { transition: background .15s, border-color .15s, color .15s, box-shadow .2s, transform .2s var(--ui-ease); }
html.mvx-ui body.customers .btn:active, html.mvx-ui body.customers .mdb-btn:active { transform: scale(.97); }
html.mvx-ui body.customers .btn-primary:hover { box-shadow: 0 8px 20px -10px rgba(var(--ui-accent-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .14); }

/* Sliding nav indicator (JS inserts .mpx-nav-pill into the right-hand nav) */
@media (min-width: 768px) {
  html.mvx-ui body.customers .navbar.header .navbar-nav { position: relative; }
  html.mvx-ui body.customers .mpx-nav-pill {
    position: absolute; left: 0; top: 50%; height: 34px; margin-top: -17px; border-radius: 9px; background: var(--ui-hover); pointer-events: none; z-index: 0;
    opacity: 0; transition: transform .45s cubic-bezier(.2, .9, .25, 1.15), width .45s cubic-bezier(.2, .9, .25, 1.15), opacity .2s, background .2s;
  }
  html.mvx-ui body.customers .mpx-nav-pill.is-on { opacity: 1; }
  html.mvx-ui body.customers .mpx-nav-pill.is-active { background: var(--ui-accent-soft); }
  html.mvx-ui body.customers .navbar.header .navbar-nav > li { position: relative; z-index: 1; }
  html.mvx-ui body.customers.mpx-has-pill .navbar-default .navbar-nav > li:not(.customers-nav-item-login):not(.customers-nav-item-register) > a,
  html.mvx-ui body.customers.mpx-has-pill .navbar-default .navbar-nav > li:not(.customers-nav-item-login):not(.customers-nav-item-register) > a:hover,
  html.mvx-ui body.customers.mpx-has-pill .navbar-default .navbar-nav > .active > a { background: transparent !important; }
}
html.mvx-ui body.customers .navbar.header { transition: box-shadow .25s; }
html.mvx-ui body.customers .navbar.header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(9, 9, 11, .25); }

/* Top progress bar while the next page loads */
.mpx-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 1100; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0); opacity: 0;
  background: linear-gradient(90deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 55%, #fff)); }
.mpx-progress.is-run { opacity: 1; transform: scaleX(.82); transition: transform 2.4s cubic-bezier(.1, .7, .2, 1), opacity .1s; }

/* Staggered reveals for every portal page */
html.mvx-ui.mvx-anim body.customers .mpx-r { animation: mpx-up .6s var(--ui-ease) backwards; animation-delay: calc(var(--mpx-i, 0) * 70ms); }
html.mvx-ui.mvx-anim body.customers .mpx-r-wait { opacity: 0; }
html.mvx-ui.mvx-anim body.customers tr.mpx-row-in { animation: mpx-fade-r .45s var(--ui-ease) backwards; animation-delay: calc(120ms + var(--mpx-i, 0) * 28ms); }
@keyframes mpx-up { from { opacity: 0; transform: translateY(14px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes mpx-fade-r { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
html.mvx-ui.mvx-anim body.customers #content > .container { animation: none; }

/* Page-to-page transitions (cross-document View Transitions, Chromium / Safari 18+) */
html.mvx-ui body.customers .navbar.header { view-transition-name: mpx-nav; }
html.mvx-ui body.customers #content { view-transition-name: mpx-main; }
::view-transition-old(mpx-main) { animation: mpx-vt-out .18s ease-in both; }
::view-transition-new(mpx-main) { animation: mpx-vt-in .42s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes mpx-vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes mpx-vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ── Portal home (bento) ─────────────────────────────────────────────────── */
html.mvx-ui body.customers .mpx-home { padding-top: 28px; }
.mpx-home .mdb-tile { border-radius: 22px; box-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 20px 40px -24px rgba(9, 9, 11, .16); }
.mpx-sub { margin: 6px 0 0; color: var(--mdb-muted); font-size: 14px; max-width: 62ch; }
.mpx-head .mdb-title { font-size: 30px; }

.mpx-hero { position: relative; display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 20px; overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, color-mix(in srgb, var(--mdb-accent) 9%, #fff) 0%, #fff 55%) !important; border-color: rgba(var(--mdb-accent-rgb), .18) !important; min-height: 200px; padding: 26px 28px !important; }
.mpx-hero.is-overdue { background: linear-gradient(140deg, rgba(220, 38, 38, .07) 0%, #fff 55%) !important; border-color: rgba(220, 38, 38, .2) !important; }
.mpx-hero.is-clear { background: linear-gradient(140deg, rgba(22, 163, 74, .08) 0%, #fff 55%) !important; border-color: rgba(22, 163, 74, .2) !important; }
.mpx-hero-main { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; position: relative; z-index: 1; }
.mpx-hero-figure { display: flex; flex-direction: column; gap: 12px; }
.mpx-hero-label { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--mdb-ink-2); }
.mpx-hero-value { font-size: clamp(32px, 4.6vw, 48px); line-height: 1; font-weight: 700; letter-spacing: -.045em; color: var(--mdb-ink); font-variant-numeric: tabular-nums; font-family: var(--ui-font); }
.mpx-hero-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.mpx-hero-side { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 10px; position: relative; z-index: 1; }
.mpx-cta { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 22px; border-radius: 999px; background: var(--mdb-ink); color: #fff !important; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 12px 24px -12px rgba(9, 9, 11, .55), inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .3s var(--mdb-ease), box-shadow .3s var(--mdb-ease); }
.mpx-cta i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); font-size: 11px; transition: transform .3s var(--mdb-ease); }
.mpx-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(9, 9, 11, .6); }
.mpx-cta:hover i { transform: translateX(3px); }
.mpx-cta:active { transform: scale(.97); }
.mpx-cta-ghost { font-size: 13px; font-weight: 500; color: var(--mdb-ink-2) !important; }
.mpx-cta-ghost:hover { color: var(--mdb-accent) !important; }
.mpx-hero-foot { color: var(--mdb-muted); font-size: 12px; }
.mpx-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--mdb-amber); position: relative; }
.is-overdue .mpx-pulse { background: var(--mdb-red); }
.is-clear .mpx-pulse { background: var(--mdb-green); }
.mpx-pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; }
html.mvx-anim .mpx-pulse::after { animation: mpx-ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes mpx-ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.mpx-hero-art { position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; z-index: 0; pointer-events: none; }
.mpx-hero-art i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--mdb-accent-rgb), .14); }
.mpx-hero-art i:nth-child(2) { inset: 40px; border-color: rgba(var(--mdb-accent-rgb), .11); }
.mpx-hero-art i:nth-child(3) { inset: 80px; background: radial-gradient(circle, rgba(var(--mdb-accent-rgb), .1), transparent 70%); border-color: rgba(var(--mdb-accent-rgb), .09); }
html.mvx-anim .mpx-hero-art i { animation: mpx-breathe 7s ease-in-out infinite; }
html.mvx-anim .mpx-hero-art i:nth-child(2) { animation-delay: -2.3s; }
html.mvx-anim .mpx-hero-art i:nth-child(3) { animation-delay: -4.6s; }
@keyframes mpx-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .6; } }

.mpx-home .mpx-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mpx-quick a { flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 10px !important; padding: 9px 10px !important; min-height: 0 !important; text-align: left !important; }
.mpx-quick a .mdb-icon { width: 28px; height: 28px; flex: none; font-size: 12px; }
.mpx-quick a > span:last-child { -webkit-line-clamp: 1 !important; font-size: 12.5px; }
.mpx-att-amt { font-size: 12.5px !important; font-weight: 600 !important; white-space: nowrap; }

.mpx-status-row { list-style: none; margin: 12px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.mpx-status-row a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mdb-muted) !important; }
.mpx-status-row a:hover { color: var(--mdb-ink) !important; }
.mpx-status-row b { color: var(--mdb-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.mpx-proj-meta { display: block; margin-top: 6px; font-size: 11.5px; color: var(--mdb-faint); }

.mpx-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mpx-rows a { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 12px; color: inherit !important; transition: background .15s; }
.mpx-rows a:hover { background: var(--mdb-hover); }
.mpx-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mpx-row-main strong { font-size: 13.5px; font-weight: 600; color: var(--mdb-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpx-row-main small { font-size: 12px; color: var(--mdb-muted); }
.mpx-rows b { font-size: 13.5px; font-weight: 600; color: var(--mdb-ink); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 92px; text-align: right; }
html.mvx-anim .mdb-tile.is-in:not(.is-settled) .mpx-rows li, html.mvx-anim .mdb-tile.is-in:not(.is-settled) .mpx-news li, html.mvx-anim .mdb-tile.is-in:not(.is-settled) .mdb-projects li {
  animation: mdb-rise .5s var(--mdb-ease) both; animation-delay: calc(var(--d, 0ms) + 120ms + var(--n, 0) * 45ms);
}

.mpx-pill { --c: var(--mdb-slate); display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 11%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.mpx-pill-green { --c: var(--mdb-green); } .mpx-pill-amber { --c: var(--mdb-amber); } .mpx-pill-red { --c: var(--mdb-red); } .mpx-pill-blue { --c: var(--mdb-blue); } .mpx-pill-slate { --c: var(--mdb-slate); }

.mpx-news { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mpx-news a { display: grid; gap: 2px; padding: 10px 12px; margin: 0 -12px; border-radius: 12px; color: inherit !important; transition: background .15s; }
.mpx-news a:hover { background: var(--mdb-hover); }
.mpx-news time { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mdb-faint); }
.mpx-news strong { font-size: 13.5px; color: var(--mdb-ink); }
.mpx-news span { font-size: 12.5px; color: var(--mdb-muted); line-height: 1.5; }

/* The portal container tops out at 1170px, so keep the 12-column bento down to tablet width
   (mvx-dashboard.css drops to 6 columns below 1400px for the wider admin). */
@media (min-width: 992px) {
  .mpx-home .mdb-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .mpx-home .mdb-w3 { grid-column: span 3; } .mpx-home .mdb-w4 { grid-column: span 4; } .mpx-home .mdb-w6 { grid-column: span 6; }
  .mpx-home .mdb-w8 { grid-column: span 8; } .mpx-home .mdb-w12, .mpx-home .mdb-hook { grid-column: span 12; }
}
@media (max-width: 767px) {
  .mpx-home .mdb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mpx-home .mdb-tile, .mpx-home .mdb-hook { grid-column: 1 / -1; }
  .mpx-home .mdb-tile.mdb-kpi { grid-column: span 1; padding: 14px; }
  .mpx-home .mdb-kpi .mdb-kpi-value { font-size: 22px; }
  .mpx-home .mdb-kpi .mdb-kpi-spark { display: none; }
}
@media (max-width: 991px) {
  .mpx-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .mpx-hero-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 767px) {
  html.mvx-ui body.customers .mpx-home { padding-top: 16px; }
  .mpx-head .mdb-title { font-size: 24px; }
  .mpx-hero-art { opacity: .5; }
  .mpx-rows b { min-width: 0; }
  .mpx-rows .mpx-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(mpx-main), ::view-transition-new(mpx-main) { animation: none; }
  .mpx-progress { display: none; }
}

/* ============================================================================
 * Full-width portal: nav, content and footer span the whole window (Bootstrap's
 * fixed 750 / 970 / 1170px .container is released) with a fluid side gutter.
 * Customer-facing documents (invoice, estimate, proposal, contract, subscription
 * HTML views) keep a readable maximum width, like a printed page.
 * ========================================================================== */
html.mvx-ui body.customers { --mpx-gutter: clamp(16px, 2.6vw, 40px); }
html.mvx-ui body.customers .container {
  width: auto !important; max-width: none !important; padding-left: var(--mpx-gutter); padding-right: var(--mpx-gutter);
}
/* One left / right edge for everything: logo, sub-menu, headings, panels and the profile avatar. */
html.mvx-ui body.customers .navbar.header .navbar-header { margin-left: 0; margin-right: 0; }
html.mvx-ui body.customers .navbar.header .navbar-brand { padding-left: 0; margin-left: 0 !important; }
@media (min-width: 768px) {
  html.mvx-ui body.customers .navbar.header .navbar-nav { margin-right: 0 !important; }
  html.mvx-ui body.customers .navbar.header .navbar-collapse { padding-left: 0; padding-right: 0; }
}
html.mvx-ui body.customers #content > .container > .row { margin-left: 0; margin-right: 0; }
html.mvx-ui body.customers #content > .container > .row > .col-md-12,
html.mvx-ui body.customers #content > .container > .row > .col-xs-12 { padding-left: 0; padding-right: 0; }
html.mvx-ui body.customers .submenu.customer-top-submenu { margin-left: 0; margin-right: 0; }
html.mvx-ui body.customers.viewinvoice #content > .container,
html.mvx-ui body.customers.viewestimate #content > .container,
html.mvx-ui body.customers.proposal-view #content > .container,
html.mvx-ui body.customers.contract-view #content > .container,
html.mvx-ui body.customers.subscriptionhtml #content > .container { max-width: 1240px !important; margin-left: auto; margin-right: auto; }
/* Sign-in screens already run edge to edge without a gutter. */
html.mpx-auth body.customers #content > .container { padding: 0; }
/* Wide screens: give the bento home more columns of breathing room. */
@media (min-width: 1600px) {
  .mpx-home .mdb-grid { gap: 20px; }
}
