/* =====================================================================
   Zoho CRM look & feel — system-wide skin.
   Loaded LAST (end of <body>) by the admin, iframe and auth layouts so it
   wins over AdminLTE, Bootstrap, Syncfusion and each page's own <style>.
   Theme only: no ids, events or data are touched here. Behaviour that a
   stylesheet cannot do (tooltips, KPI cards, loading bar, menus) lives in
   wwwroot/FrontEnd/Shared/zoho-ux.js.
   ===================================================================== */

:root {
    --z-primary: #226DB4;
    --z-primary-hover: #1B5A96;
    --z-primary-soft: #E9F1FB;
    --z-primary-ring: rgba(34, 109, 180, .18);
    --z-green: #12A06C;
    --z-green-soft: #E5F6EF;
    --z-orange: #E8861A;
    --z-orange-soft: #FDF1E3;
    --z-red: #E0473B;
    --z-red-soft: #FCEBEA;
    --z-purple: #7A5AF8;
    --z-purple-soft: #F0ECFE;
    --z-teal: #0E9AA7;
    --z-teal-soft: #E3F5F6;

    --z-bg: #F3F5F8;
    --z-surface: #FFFFFF;
    --z-surface-2: #F8F9FB;
    --z-border: #E2E6EC;
    --z-border-strong: #CDD4DE;
    --z-text: #1F2A37;
    --z-text-2: #4A5565;
    --z-muted: #7B8594;

    --z-nav: #1D2433;
    --z-nav-2: #262E40;
    --z-nav-text: #B8C1D1;
    --z-nav-active: #3D8BFD;

    --z-radius: 6px;
    --z-radius-lg: 10px;
    --z-shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
    --z-shadow-2: 0 4px 14px rgba(16, 24, 40, .08);
    --z-shadow-3: 0 16px 40px rgba(16, 24, 40, .16);
    --z-ease: cubic-bezier(.2, .8, .2, 1);
    --z-font: 'Lato', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Keep the older token names pointing at the new palette. */
    --primary: var(--z-primary);
    --bs-primary: var(--z-primary);
    --bs-blue: var(--z-primary);
    --bs-link-color: var(--z-primary);
    --zoho-primary: var(--z-primary);
    --zoho-primary-dark: var(--z-primary-hover);
    --zoho-accent: var(--z-green);
    --zoho-sidebar: var(--z-nav);
    --zoho-sidebar-active: var(--z-nav-2);
    --zoho-bg: var(--z-bg);
    --zoho-border: var(--z-border);
    --zoho-text: var(--z-text);
    --zoho-muted: var(--z-muted);
    --zoho-radius: var(--z-radius);
}

/* --------------------------------------------- Bootstrap 5 class polyfill
   The admin shell ships Bootstrap 4 CSS (AdminLTE) but most pages are written with
   Bootstrap 5 classes (me-2, g-3, gap-2, fw-bold, form-select, btn-close …). These
   rules give those classes their Bootstrap 5 meaning so spacing and controls render
   as the page author intended. Same values as Bootstrap 5, so pages that also load
   Bootstrap 5 CSS are unaffected. */
.me-0 { margin-right: 0 !important; } .me-1 { margin-right: .25rem !important; } .me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; } .me-4 { margin-right: 1.5rem !important; } .me-5 { margin-right: 3rem !important; } .me-auto { margin-right: auto !important; }
.ms-0 { margin-left: 0 !important; } .ms-1 { margin-left: .25rem !important; } .ms-2 { margin-left: .5rem !important; }
.ms-3 { margin-left: 1rem !important; } .ms-4 { margin-left: 1.5rem !important; } .ms-5 { margin-left: 3rem !important; } .ms-auto { margin-left: auto !important; }
.pe-0 { padding-right: 0 !important; } .pe-1 { padding-right: .25rem !important; } .pe-2 { padding-right: .5rem !important; } .pe-3 { padding-right: 1rem !important; } .pe-4 { padding-right: 1.5rem !important; }
.ps-0 { padding-left: 0 !important; } .ps-1 { padding-left: .25rem !important; } .ps-2 { padding-left: .5rem !important; } .ps-3 { padding-left: 1rem !important; } .ps-4 { padding-left: 1.5rem !important; }
.gap-0 { gap: 0 !important; } .gap-1 { gap: .25rem !important; } .gap-2 { gap: .5rem !important; } .gap-3 { gap: 1rem !important; } .gap-4 { gap: 1.5rem !important; } .gap-5 { gap: 3rem !important; }
.row.g-0, .row.gx-0 { margin-left: 0; margin-right: 0; } .row.g-0 > *, .row.gx-0 > * { padding-left: 0; padding-right: 0; }
.row.g-1 { margin: -.25rem -.125rem 0; } .row.g-1 > * { padding: 0 .125rem; margin-top: .25rem; }
.row.g-2 { margin: -.5rem -.25rem 0; } .row.g-2 > * { padding: 0 .25rem; margin-top: .5rem; }
.row.g-3 { margin: -1rem -.5rem 0; } .row.g-3 > * { padding: 0 .5rem; margin-top: 1rem; }
.row.g-4 { margin: -1.5rem -.75rem 0; } .row.g-4 > * { padding: 0 .75rem; margin-top: 1.5rem; }
.fw-light { font-weight: 300 !important; } .fw-normal { font-weight: 400 !important; } .fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; } .fw-bold { font-weight: 700 !important; } .fw-bolder { font-weight: 800 !important; }
.fs-1 { font-size: 2.2rem !important; } .fs-2 { font-size: 1.8rem !important; } .fs-3 { font-size: 1.5rem !important; }
.fs-4 { font-size: 1.25rem !important; } .fs-5 { font-size: 1.1rem !important; } .fs-6 { font-size: 1rem !important; }
.text-end { text-align: right !important; } .text-start { text-align: left !important; }
.float-end { float: right !important; } .float-start { float: left !important; }
.d-grid { display: grid !important; } .d-grid.gap-2 { gap: .5rem !important; }
.visually-hidden, .visually-hidden-focusable:not(:focus) {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.rounded-3 { border-radius: .5rem !important; } .rounded-4 { border-radius: 1rem !important; }
.form-select {
    display: block; width: 100%; padding: .375rem 2.1rem .375rem .75rem; line-height: 1.5;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%237B8594' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>") no-repeat right .7rem center / 12px 10px;
}
.form-select-sm { padding-top: .2rem; padding-bottom: .2rem; }
.form-select[multiple], .form-select[size]:not([size="1"]) { background-image: none; padding-right: .75rem; }
.btn-close {
    box-sizing: content-box; width: 1em; height: 1em; padding: .35em; border: 0; border-radius: 4px; opacity: .55; cursor: pointer;
    background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path stroke='%231F2A37' stroke-width='2' stroke-linecap='round' d='M3 3l10 10M13 3L3 13'/></svg>") center / 12px auto no-repeat;
    transition: opacity .15s ease, background-color .15s ease;
}
.btn-close:hover { opacity: 1; background-color: var(--z-surface-2, #F8F9FB); }
.btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }
.text-bg-primary { background: var(--z-primary-soft, #E9F1FB) !important; color: var(--z-primary, #226DB4) !important; }
.text-bg-success { background: var(--z-green-soft, #E5F6EF) !important; color: #0B7A51 !important; }
.text-bg-danger { background: var(--z-red-soft, #FCEBEA) !important; color: #B4302A !important; }
.text-bg-warning { background: var(--z-orange-soft, #FDF1E3) !important; color: #A55A06 !important; }
.text-bg-info { background: var(--z-teal-soft, #E3F5F6) !important; color: #08727B !important; }
.text-bg-secondary, .text-bg-light { background: #EEF1F5 !important; color: #4A5565 !important; }

/* ---------------------------------------------------------------- base */
html { scroll-behavior: smooth; }
body {
    font-family: var(--z-font) !important;
    font-size: 14px;
    color: var(--z-text);
    background: var(--z-bg);
    -webkit-font-smoothing: antialiased;
}
.content-wrapper { background: var(--z-bg) !important; }
/* No colour here: headings inherit it, so white titles on the coloured dashboard banners stay white. */
h1, h2, h3, h4, h5, h6, .h4, .h5 { font-family: var(--z-font); font-weight: 700; letter-spacing: -.005em; }
a { color: var(--z-primary); transition: color .15s ease; }
a:hover { color: var(--z-primary-hover); }
.text-muted { color: var(--z-muted) !important; }
.text-primary { color: var(--z-primary) !important; }
.bg-primary { background-color: var(--z-primary) !important; }
::selection { background: var(--z-primary-soft); }
:focus-visible { outline: 2px solid var(--z-primary); outline-offset: 2px; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD2DC; border-radius: 10px; border: 3px solid var(--z-bg); }
::-webkit-scrollbar-thumb:hover { background: #A9B3C1; }

/* ------------------------------------------------------------- top bar */
.main-header.navbar {
    min-height: 56px;
    background: var(--z-surface) !important;
    border-bottom: 1px solid var(--z-border) !important;
    box-shadow: none !important;
    padding: 0 12px;
    gap: 6px;
}
.main-header .nav-link { color: var(--z-text-2) !important; }
.z-iconbtn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: transparent; color: var(--z-text-2);
    font-size: 16px; cursor: pointer; text-decoration: none;
    transition: background .15s ease, color .15s ease, transform .15s var(--z-ease);
}
.z-iconbtn:hover { background: var(--z-surface-2); color: var(--z-primary); }
.z-iconbtn:active { transform: scale(.92); }
.z-iconbtn .z-dot {
    position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
    background: var(--z-red); box-shadow: 0 0 0 2px #fff;
}
.z-create-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 14px; border-radius: 17px; border: 0;
    background: var(--z-primary); color: #fff; font-weight: 700; font-size: 13px;
    box-shadow: 0 2px 6px rgba(34, 109, 180, .3);
    transition: background .15s ease, transform .15s var(--z-ease), box-shadow .15s ease;
}
.z-create-btn:hover { background: var(--z-primary-hover); box-shadow: 0 4px 12px rgba(34, 109, 180, .35); }
.z-create-btn:active { transform: scale(.96); }
/* Create = capture a policy; the caret opens the Create menu */
.z-create-split { display: inline-flex; align-items: center; }
.z-create-split .z-create-main { border-radius: 17px 0 0 17px; padding-right: 12px; text-decoration: none; }
.z-create-split .z-create-main:hover, .z-create-split .z-create-main:focus { color: #fff; text-decoration: none; }
.z-create-split .z-create-caret { border-radius: 0 17px 17px 0; padding: 0 10px; margin-left: 1px; font-size: 10px; }
.z-menu.z-open .z-create-caret i { transform: rotate(180deg); }
.z-create-caret i { transition: transform .2s var(--z-ease); }

/* global search: Zoho's rounded grey pill */
.z-search { position: relative; flex: 1 1 auto; max-width: 640px; margin-left: 8px; }
.z-search .z-search-pill {
    display: flex; align-items: center; height: 38px;
    background: var(--z-surface-2); border: 1px solid var(--z-border); border-radius: 19px;
    padding: 0 6px 0 14px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.z-search .z-search-pill:focus-within { background: #fff; border-color: var(--z-primary); box-shadow: 0 0 0 3px var(--z-primary-ring); }
.z-search .z-search-pill > i { color: var(--z-muted); margin-right: 8px; }
.z-search input[type=search] {
    flex: 1 1 auto; min-width: 120px; border: 0 !important; background: transparent !important; box-shadow: none !important;
    height: 36px; padding: 0; font-size: 14px; color: var(--z-text); outline: none;
}
.z-search select {
    border: 0 !important; background: transparent !important; box-shadow: none !important;
    font-size: 12px; color: var(--z-text-2); height: 28px; padding: 0 4px; cursor: pointer;
    border-left: 1px solid var(--z-border) !important; border-radius: 0 !important; max-width: 118px;
}
.z-search kbd {
    font-family: var(--z-font); font-size: 11px; color: var(--z-muted); background: #fff;
    border: 1px solid var(--z-border); border-radius: 4px; padding: 1px 6px; margin-left: 4px; box-shadow: none;
}
#globalSearchResults {
    border-radius: var(--z-radius-lg) !important; padding: 6px !important; margin-top: 6px;
    box-shadow: var(--z-shadow-3) !important; border: 1px solid var(--z-border) !important;
}
#globalSearchResults .dropdown-header { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--z-muted); padding: 8px 10px 4px; }
#globalSearchResults .dropdown-item { border-radius: var(--z-radius); padding: 8px 10px; }
#globalSearchResults .dropdown-item:hover { background: var(--z-primary-soft); }

/* dropdown panels opened by zoho-ux.js (quick create, avatar) */
.z-menu { position: relative; }
.z-menu-panel {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 1060; min-width: 230px;
    background: #fff; border: 1px solid var(--z-border); border-radius: var(--z-radius-lg);
    box-shadow: var(--z-shadow-3); padding: 6px;
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right;
    transition: opacity .16s ease, transform .18s var(--z-ease), visibility 0s linear .18s;
}
.z-menu.z-open .z-menu-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.z-menu-panel .z-menu-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--z-muted); padding: 8px 10px 4px; }
.z-menu-panel a, .z-menu-panel button.z-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    padding: 8px 10px; border-radius: var(--z-radius); border: 0; background: transparent;
    color: var(--z-text); font-size: 13.5px; text-decoration: none; cursor: pointer;
}
.z-menu-panel a:hover, .z-menu-panel button.z-menu-item:hover { background: var(--z-surface-2); color: var(--z-primary); }
.z-menu-panel .z-ico {
    width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; flex: 0 0 30px;
}
.z-menu-sep { height: 1px; background: var(--z-border); margin: 6px 4px; }
.z-user-card { display: flex; gap: 12px; align-items: center; padding: 10px; }
.z-user-card img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--z-border); }
.z-user-card .z-user-mail { font-weight: 700; font-size: 13.5px; word-break: break-all; color: var(--z-text); }
.z-user-card .z-user-meta { font-size: 12px; color: var(--z-muted); }
.z-avatar-btn { padding: 0; border: 0; background: transparent; border-radius: 50%; cursor: pointer; }
.z-avatar-btn img {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--z-border); transition: box-shadow .15s ease;
}
.z-avatar-btn:hover img { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--z-primary); }
#superAdminTenantWrap select { border-radius: 16px; height: 32px; font-size: 12.5px; }

/* --------------------------------------------------------------- sidebar */
.main-sidebar, .main-sidebar.sidebar-blue-theme, [class*=sidebar-blue-theme] {
    background: var(--z-nav) !important;
    box-shadow: none !important;
    border-right: 1px solid rgba(255, 255, 255, .04);
}
.main-sidebar .brand-link {
    height: 56px; display: flex !important; align-items: center; justify-content: flex-start !important; gap: 10px;
    padding: 0 16px !important; border-bottom: 1px solid rgba(255, 255, 255, .06) !important; color: #fff !important;
}
.main-sidebar .brand-link .brand-text { font-weight: 700 !important; font-size: 17px; letter-spacing: .01em; color: #fff; }
.z-brand-mark {
    width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px;
    display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 14px;
    background: linear-gradient(135deg, #3D8BFD, #226DB4); box-shadow: 0 4px 10px rgba(61, 139, 253, .35);
}
.main-sidebar .sidebar { padding: 8px 0 !important; }
.main-sidebar .user-panel { display: none !important; } /* moved to the top-bar avatar menu */
#navbarnav { background: transparent; }
#navbarnav::-webkit-scrollbar-track { background: transparent !important; }
#navbarnav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14) !important; border-color: var(--z-nav) !important; }

#mainMenu.e-treeview, #mainMenu .e-treeview { background: transparent; }
#mainMenu .e-list-item { padding: 0 !important; }
#mainMenu .e-list-item .e-text-content { padding-left: 14px; }
#mainMenu .e-list-item .e-list-item .e-text-content { padding-left: 30px; }
#mainMenu .e-list-text, #mainMenu .e-list-text a, #mainMenu a.e-list-text {
    color: var(--z-nav-text) !important; font-size: 13.5px !important; font-weight: 400; text-decoration: none;
    transition: color .15s ease;
}
#mainMenu > .e-ul > .e-list-item > .e-text-content .e-list-text { font-weight: 700 !important; color: #DCE2EC !important; }
#mainMenu .e-icons { color: #7D879A !important; }
#mainMenu .e-list-icon.z-nav-ico, #mainMenu .z-nav-ico {
    width: 26px; height: 26px; margin: 0 8px 0 0 !important; border-radius: 7px; font-size: 12.5px !important;
    display: inline-flex !important; align-items: center; justify-content: center; vertical-align: middle;
    color: #fff !important; background: rgba(255, 255, 255, .07); line-height: 1 !important;
    transition: background .2s ease, transform .2s var(--z-ease);
}
#mainMenu .e-list-item > .e-fullrow { border-radius: 8px; margin: 0 8px; width: calc(100% - 16px) !important; left: 0; border: 0 !important; transition: background .15s ease; }
#mainMenu .e-list-item.e-hover > .e-fullrow { background: rgba(255, 255, 255, .06) !important; }
#mainMenu .e-list-item.e-hover > .e-text-content .e-list-text { color: #fff !important; }
#mainMenu .e-list-item.e-hover > .e-text-content .z-nav-ico { transform: scale(1.06); }
#mainMenu .e-list-item.e-active > .e-fullrow,
#mainMenu .e-list-item.e-active.e-hover > .e-fullrow,
#mainMenu .e-list-item.e-active.e-animation-active > .e-fullrow {
    background: rgba(61, 139, 253, .16) !important;
    box-shadow: inset 3px 0 0 var(--z-nav-active);
}
#mainMenu .e-list-item.e-active > .e-text-content { background: transparent !important; }
#mainMenu .e-list-item.e-active > .e-text-content .e-list-text { color: #fff !important; font-weight: 700 !important; }
#mainMenu .e-list-item.e-active > .e-text-content .z-nav-ico { background: var(--z-nav-active); }
.nav-sidebar .nav-item > .nav-link.active { background: rgba(61, 139, 253, .16) !important; box-shadow: inset 3px 0 0 var(--z-nav-active) !important; }

/* ---------------------------------------------------------- page header */
.content-wrapper > .content, .content-wrapper > div > .content { padding: 16px 20px 28px; }
.content-header { padding: 18px 20px 6px; }
.content-header h1, .content-header .h1 { font-size: 20px !important; font-weight: 700; }
.breadcrumb { background: transparent; padding: 0; margin: 0; font-size: 12.5px; }
.breadcrumb-item a, .breadcrumb-item { color: var(--z-muted); }

/* A module title such as  <h4><i class="bi bi-file-earmark-text me-2"></i>Invoices</h4>
   gets Zoho's coloured module tile in front of it. */
.content-wrapper h3 > i:first-child,
.content-wrapper h4 > i:first-child,
.content-wrapper h5.z-title > i:first-child {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin-right: 10px !important; border-radius: 9px;
    background: var(--z-primary-soft); color: var(--z-primary); font-size: 16px; vertical-align: middle;
}

/* ---------------------------------------------------------------- cards */
.card {
    background: var(--z-surface);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    box-shadow: var(--z-shadow-1);
    transition: box-shadow .2s ease, transform .2s var(--z-ease), border-color .2s ease;
}
.card.shadow, .card.shadow-sm, .card.shadow-lg { box-shadow: var(--z-shadow-1) !important; }
a.card:hover, .card.z-clickable:hover, .card[role=button]:hover, .card.cursor-pointer:hover {
    box-shadow: var(--z-shadow-2) !important; transform: translateY(-2px); border-color: var(--z-border-strong) !important;
}
.card-header {
    background: var(--z-surface); border-bottom: 1px solid var(--z-border);
    padding: 12px 16px; font-weight: 700; color: var(--z-text);
    border-top-left-radius: var(--z-radius-lg); border-top-right-radius: var(--z-radius-lg);
}
.card-header h5, .card-header h6, .card-header .card-title { font-size: 15px !important; font-weight: 700; margin: 0; color: var(--z-text); }
.card-body { padding: 16px; }
.card-footer { background: var(--z-surface-2); border-top: 1px solid var(--z-border); }
fieldset, .form-card { border-color: var(--z-border) !important; border-radius: var(--z-radius-lg); background: #fff; box-shadow: var(--z-shadow-1); }
legend { font-size: 14px; font-weight: 700; color: var(--z-text); }
.small-box, .info-box { border-radius: var(--z-radius-lg); box-shadow: var(--z-shadow-1); border: 1px solid var(--z-border); }

/* KPI tiles: zoho-ux.js turns gradient "stat" cards into Zoho's white KPI card and
   sets --z-kpi to the card's own colour. */
.z-kpi {
    background: #fff !important; color: var(--z-text) !important;
    border: 1px solid var(--z-border) !important; border-radius: var(--z-radius-lg) !important;
    box-shadow: var(--z-shadow-1) !important; position: relative; overflow: hidden;
}
.z-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--z-kpi, var(--z-primary)); }
.z-kpi:hover { box-shadow: var(--z-shadow-2) !important; transform: translateY(-2px); }
.z-kpi, .z-kpi * { text-shadow: none !important; }
.z-kpi :not(i):not(.z-kpi-ico) { color: inherit; }
.z-kpi [class*=lbl], .z-kpi [class*=label], .z-kpi small, .z-kpi .small, .z-kpi .text-white-50 {
    color: var(--z-muted) !important; opacity: 1 !important; font-weight: 700; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
}
.z-kpi [class*=val], .z-kpi h2, .z-kpi h3, .z-kpi h4, .z-kpi .h3, .z-kpi .h4 { color: var(--z-text) !important; font-weight: 800; }
.z-kpi .val, .z-kpi [class$=-val], .z-kpi .kpi-value { font-size: max(1.45rem, 1em); line-height: 1.2; margin-top: 4px; }
.z-kpi i { color: var(--z-kpi, var(--z-primary)) !important; opacity: 1 !important; }
.z-kpi .text-white, .z-kpi.text-white { color: var(--z-text) !important; }

/* -------------------------------------------------------------- buttons */
.btn {
    font-weight: 600; font-size: 13.5px; border-radius: 4px; padding: 6px 14px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s var(--z-ease);
}
.btn:active { transform: scale(.97); }
.btn-sm { font-size: 12.5px; padding: 4px 10px; }
.btn-lg { font-size: 15px; padding: 9px 20px; }
.btn-primary { background: var(--z-primary) !important; border-color: var(--z-primary) !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:focus { background: var(--z-primary-hover) !important; border-color: var(--z-primary-hover) !important; box-shadow: 0 2px 8px rgba(34, 109, 180, .3) !important; }
.btn-success { background: var(--z-green) !important; border-color: var(--z-green) !important; color: #fff !important; }
.btn-danger { background: var(--z-red) !important; border-color: var(--z-red) !important; color: #fff !important; }
.btn-warning { background: var(--z-orange) !important; border-color: var(--z-orange) !important; color: #fff !important; }
.btn-info { background: var(--z-teal) !important; border-color: var(--z-teal) !important; color: #fff !important; }
.btn-secondary, .btn-light, .btn-default {
    background: #fff !important; border: 1px solid var(--z-border-strong) !important; color: var(--z-text) !important;
}
.btn-secondary:hover, .btn-light:hover, .btn-default:hover { background: var(--z-surface-2) !important; border-color: #B5BFCC !important; }
.btn-outline-primary { color: var(--z-primary) !important; border-color: var(--z-primary) !important; background: #fff !important; }
.btn-outline-primary:hover { background: var(--z-primary-soft) !important; }
.btn-outline-secondary { color: var(--z-text-2) !important; border-color: var(--z-border-strong) !important; background: #fff !important; }
.btn-outline-secondary:hover { background: var(--z-surface-2) !important; color: var(--z-text) !important; }
.btn-outline-danger { color: var(--z-red) !important; border-color: #F1B5B0 !important; background: #fff !important; }
.btn-outline-danger:hover { background: var(--z-red-soft) !important; }
.btn-outline-success { color: var(--z-green) !important; border-color: #A6DEC8 !important; background: #fff !important; }
.btn-outline-success:hover { background: var(--z-green-soft) !important; }
.btn-link { color: var(--z-primary) !important; }
.btn-group > .btn { border-radius: 0 !important; }
.btn-group > .btn:first-child { border-radius: 4px 0 0 4px !important; }
.btn-group > .btn:last-child { border-radius: 0 4px 4px 0 !important; }

/* --------------------------------------------------------------- forms */
.form-control, .form-select, .custom-select,
form input.form-control, form select.form-control {
    border: 1px solid var(--z-border-strong) !important; border-radius: 4px !important; font-size: 13.5px !important;
    color: var(--z-text); background-color: #fff; min-height: 34px; box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:hover, .form-select:hover { border-color: #AEB8C6 !important; }
.form-control:focus, .form-select:focus {
    border-color: var(--z-primary) !important; box-shadow: 0 0 0 3px var(--z-primary-ring) !important;
}
.form-control:disabled, .form-control[readonly], .form-select:disabled { background: var(--z-surface-2) !important; color: var(--z-text-2); }
.form-label, label.col-form-label, .policy-field-label {
    font-size: 12.5px !important; font-weight: 600 !important; color: var(--z-text-2) !important; margin-bottom: 4px;
}
.form-check-input { border-color: var(--z-border-strong); }
.form-check-input:checked { background-color: var(--z-primary); border-color: var(--z-primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--z-primary-ring); }
.form-switch .form-check-input { cursor: pointer; }
.input-group-text { background: var(--z-surface-2); border-color: var(--z-border-strong); color: var(--z-muted); }
.invalid-feedback { font-size: 12px; }
.is-invalid, .form-control.is-invalid, form input.form-control.is-invalid, .form-select.is-invalid { border-color: var(--z-red) !important; }
.is-invalid:focus, .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(224, 71, 59, .18) !important; }
.form-control.border-0, form input.form-control.border-0 { border: 0 !important; }
.form-control-sm, .form-select-sm, form input.form-control-sm { min-height: 30px; font-size: 12.5px !important; }
.rounded-pill.btn, .btn.rounded-pill { border-radius: 50rem; }
.rounded-circle.btn, .btn.rounded-circle { border-radius: 50%; }

/* Syncfusion inputs, dropdowns, date pickers */
.e-input-group, .e-input-group.e-control-wrapper, .e-float-input.e-control-wrapper {
    border-radius: 4px !important; border-color: var(--z-border-strong) !important; min-height: 34px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.e-input-group.e-input-focus, .e-input-group.e-control-wrapper.e-input-focus {
    border-color: var(--z-primary) !important; box-shadow: 0 0 0 3px var(--z-primary-ring) !important;
}
.e-input-group input.e-input, .e-input-group.e-control-wrapper input.e-input { font-size: 13.5px !important; color: var(--z-text); }
.e-dropdownbase .e-list-item { font-size: 13.5px; }
.e-dropdownbase .e-list-item.e-hover { background: var(--z-surface-2) !important; color: var(--z-text) !important; }
.e-dropdownbase .e-list-item.e-active, .e-dropdownbase .e-list-item.e-item-focus,
.e-dropdownbase .e-list-item.e-active.e-hover { background: var(--z-primary-soft) !important; color: var(--z-primary) !important; }
.e-popup.e-popup-open { border-radius: var(--z-radius) !important; box-shadow: var(--z-shadow-3) !important; border-color: var(--z-border) !important; }
.e-checkbox-wrapper .e-frame.e-check, .e-checkbox-wrapper .e-frame.e-stop,
.e-css.e-checkbox-wrapper .e-frame.e-check, .e-css.e-checkbox-wrapper .e-frame.e-stop {
    background: var(--z-primary) !important; border-color: var(--z-primary) !important;
}
.e-calendar .e-content td.e-selected span.e-day, .e-calendar .e-content td.e-today.e-selected span.e-day { background: var(--z-primary) !important; }
.e-calendar .e-content td.e-today span.e-day { color: var(--z-primary) !important; border-color: var(--z-primary) !important; }

/* Select2 */
.select2-container--bootstrap-5 .select2-selection { border-color: var(--z-border-strong) !important; border-radius: 4px !important; }
.select2-container--bootstrap-5.select2-container--focus .select2-selection { border-color: var(--z-primary) !important; box-shadow: 0 0 0 3px var(--z-primary-ring) !important; }
.select2-container--bootstrap-5 .select2-results__option--highlighted { background: var(--z-primary-soft) !important; color: var(--z-primary) !important; }

/* ------------------------------------------------- Syncfusion grid (list views) */
.e-grid {
    font-family: var(--z-font) !important;
    border: 1px solid var(--z-border) !important; border-radius: var(--z-radius-lg) !important;
    overflow: hidden; box-shadow: var(--z-shadow-1) !important; background: #fff;
}
.card .e-grid { box-shadow: none !important; }
.e-grid .e-gridheader { border-top: 0 !important; border-bottom: 1px solid var(--z-border) !important; padding-right: 0; }
.e-grid .e-headercell, .e-grid .e-detailheadercell, .e-grid .e-gridheader .e-headercell {
    background: #F6F8FB !important; height: 40px;
}
.e-grid .e-headercelldiv, .e-grid .e-headertext, .e-grid .e-headercell .e-headertext {
    font-size: 12.5px !important; font-weight: 700 !important; color: var(--z-text-2) !important;
    text-transform: none !important; letter-spacing: 0 !important;
}
.e-grid .e-headercell:hover { background: #EEF2F7 !important; }
.e-grid td.e-rowcell {
    font-size: 13.5px !important; color: var(--z-text) !important; border-color: #EDF0F4 !important;
    padding-top: 9px !important; padding-bottom: 9px !important; transition: background-color .12s ease;
}
.e-grid .e-altrow .e-rowcell, .e-grid .e-row.e-altrow, .grid-container .e-grid .e-altrow .e-rowcell { background: #fff !important; }
.e-grid .e-row:hover .e-rowcell, .e-grid .e-row.e-rowhover .e-rowcell,
.e-grid:not(.e-row-responsive) .e-row:hover .e-rowcell, .grid-container .e-grid .e-row:hover .e-rowcell { background: #F3F8FE !important; }
.e-grid td.e-active, .e-grid .e-row .e-rowcell.e-active, .e-grid .e-row.e-active .e-rowcell { background: #E7F0FC !important; color: var(--z-text) !important; }
.e-grid .e-rowcell a { font-weight: 600; }
.e-grid .e-filterbarcell { background: #fff !important; }
.e-grid .e-filterbarcell input, .e-grid .e-filterbarcell .e-input-group { border-radius: 4px !important; font-size: 12.5px !important; }
.e-grid .e-sortnumber { background: var(--z-primary) !important; color: #fff !important; }
.e-grid .e-filtered::before, .grid-container .e-grid .e-filtered::before { color: var(--z-primary) !important; }
.e-grid .e-groupdroparea { background: var(--z-surface-2) !important; color: var(--z-muted) !important; border-bottom: 1px dashed var(--z-border) !important; }

/* grid toolbar: Zoho list-view action bar */
.e-grid .e-toolbar, .grid-container .e-toolbar {
    background: #fff !important; border: 0 !important; border-bottom: 1px solid var(--z-border) !important; min-height: 50px;
}
.e-grid .e-toolbar .e-toolbar-items { background: transparent !important; }
.e-grid .e-toolbar .e-tbar-btn, .e-toolbar .e-tbar-btn.e-btn {
    border-radius: 4px !important; border: 1px solid var(--z-border-strong) !important; background: #fff !important;
    color: var(--z-text) !important; font-weight: 600 !important; height: 32px; margin: 0 2px; box-shadow: none !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.e-grid .e-toolbar .e-tbar-btn:hover, .e-toolbar .e-tbar-btn.e-btn:hover { background: var(--z-surface-2) !important; border-color: #B5BFCC !important; color: var(--z-primary) !important; }
.e-grid .e-toolbar .e-tbar-btn .e-icons, .e-toolbar .e-tbar-btn .e-btn-icon { color: inherit !important; }
.e-grid .e-toolbar .e-tbar-btn .e-tbar-btn-text { font-size: 13px !important; }
.e-grid .e-toolbar .e-search, .e-grid .e-toolbar .e-input-group.e-search {
    border-radius: 16px !important; background: var(--z-surface-2) !important; border: 1px solid var(--z-border) !important; height: 32px;
}
.e-grid .e-toolbar .e-search.e-input-focus { background: #fff !important; border-color: var(--z-primary) !important; box-shadow: 0 0 0 3px var(--z-primary-ring) !important; }

/* pager: Zoho's "1 – 10 of 245" footer */
.e-grid .e-gridpager, .e-pager, .grid-container .e-grid .e-pager {
    background: #fff !important; border-top: 1px solid var(--z-border) !important; border-radius: 0 !important; padding: 8px 12px !important;
}
.e-pager .e-numericitem, .e-pager .e-pagercontainer .e-numericitem, .e-grid .e-gridpager .e-numericitem {
    border-radius: 4px !important; min-width: 30px; color: var(--z-text-2) !important; border: 0 !important; transition: background .15s ease;
}
.e-pager .e-numericitem:hover { background: var(--z-surface-2) !important; color: var(--z-primary) !important; }
.e-pager .e-currentitem, .e-pager .e-currentitem:hover, .e-grid .e-gridpager .e-currentitem, .grid-container .e-grid .e-pager .e-currentitem {
    background: var(--z-primary) !important; color: #fff !important; border-radius: 4px !important;
}
.e-pager .e-pagercontainer { border-radius: 6px; border-color: var(--z-border) !important; }
.e-pager .e-parentmsgbar { color: var(--z-muted); font-size: 12.5px; }

/* empty grid: illustration + friendly text instead of a bare line */
.e-grid .e-emptyrow td, .e-grid tr.e-emptyrow td {
    height: 220px; text-align: center !important; vertical-align: bottom !important; padding-bottom: 32px !important;
    color: var(--z-muted) !important; font-size: 14px !important;
    background: #fff no-repeat center 34px / 132px auto url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 110'><ellipse cx='80' cy='100' rx='58' ry='6' fill='%23E9EDF3'/><rect x='34' y='18' width='92' height='70' rx='8' fill='%23ffffff' stroke='%23CDD6E2' stroke-width='2'/><rect x='34' y='18' width='92' height='16' rx='8' fill='%23E9F1FB'/><rect x='46' y='44' width='44' height='6' rx='3' fill='%23DCE3EC'/><rect x='46' y='56' width='66' height='6' rx='3' fill='%23E6EBF1'/><rect x='46' y='68' width='34' height='6' rx='3' fill='%23E6EBF1'/><circle cx='118' cy='72' r='17' fill='%23ffffff' stroke='%23226DB4' stroke-width='3'/><path d='M130 84l12 12' stroke='%23226DB4' stroke-width='5' stroke-linecap='round'/><circle cx='118' cy='72' r='7' fill='%23E9F1FB'/></svg>") !important;
}

/* loading: Syncfusion spinner becomes Zoho's blue ring */
.e-spinner-pane .e-spinner-inner .e-spin-bootstrap5, .e-spinner-pane .e-spinner-inner .e-spin-bootstrap5 .e-path-circle { stroke: var(--z-primary) !important; }
.e-spinner-pane.e-spin-show { background: rgba(255, 255, 255, .55) !important; backdrop-filter: blur(1px); }

/* other Syncfusion widgets */
.e-btn.e-primary, .e-css.e-btn.e-primary, .e-footer-content .e-btn.e-primary.e-flat:not([disabled]) {
    background: var(--z-primary) !important; border-color: var(--z-primary) !important; color: #fff !important; border-radius: 4px !important;
}
.e-btn { border-radius: 4px !important; font-family: var(--z-font) !important; font-weight: 600; }
.e-dialog { border-radius: var(--z-radius-lg) !important; box-shadow: var(--z-shadow-3) !important; border: 0 !important; overflow: hidden; }
.e-dialog .e-dlg-header-content { border-bottom: 1px solid var(--z-border) !important; padding: 14px 18px !important; }
.e-dialog .e-dlg-header, .e-dialog .e-dlg-header * { font-weight: 700 !important; font-size: 16px; color: var(--z-text) !important; }
.e-dialog .e-footer-content { border-top: 1px solid var(--z-border) !important; background: var(--z-surface-2); }
.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-text { color: var(--z-primary) !important; font-weight: 700; }
.e-tab .e-tab-header .e-indicator { background: var(--z-primary) !important; height: 2px; }
.e-contextmenu-wrapper ul, .e-contextmenu-container ul { border-radius: var(--z-radius) !important; box-shadow: var(--z-shadow-3) !important; border: 1px solid var(--z-border) !important; }
.e-contextmenu-wrapper ul .e-menu-item.e-focused, .e-contextmenu-wrapper ul .e-menu-item.e-selected { background: var(--z-primary-soft) !important; color: var(--z-primary) !important; }
.e-toast-container .e-toast { border-radius: var(--z-radius-lg) !important; box-shadow: var(--z-shadow-3) !important; }
.e-tooltip-wrap.e-popup { background: #2B3443 !important; border: 0 !important; border-radius: 6px !important; box-shadow: var(--z-shadow-2) !important; }
.e-tooltip-wrap .e-tip-content { color: #fff !important; font-size: 12.5px !important; font-family: var(--z-font) !important; padding: 6px 10px !important; }
.e-tooltip-wrap .e-arrow-tip-outer, .e-tooltip-wrap .e-arrow-tip-inner { border-top-color: #2B3443 !important; border-bottom-color: #2B3443 !important; }

/* --------------------------------------------- Bootstrap tables, tabs, badges */
.table { color: var(--z-text); font-size: 13.5px; }
.table > thead > tr > th, .table thead th {
    background: #F6F8FB !important; color: var(--z-text-2) !important; font-size: 12.5px !important; font-weight: 700 !important;
    text-transform: none !important; letter-spacing: 0 !important; border-bottom: 1px solid var(--z-border) !important; padding: 10px 12px;
}
.table > tbody > tr > td { border-top: 1px solid #EDF0F4; padding: 9px 12px; vertical-align: middle; }
.table-hover > tbody > tr { transition: background-color .12s ease; }
.table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > * { background: #F3F8FE !important; --bs-table-accent-bg: transparent; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #FAFBFD; }

.nav-tabs { border-bottom: 1px solid var(--z-border) !important; gap: 4px; }
.nav-tabs .nav-link {
    border: 0 !important; border-bottom: 2px solid transparent !important; color: var(--z-text-2) !important;
    font-weight: 600; font-size: 13.5px !important; padding: 10px 14px !important; background: transparent !important;
    transition: color .15s ease, border-color .2s ease;
}
.nav-tabs .nav-link:hover { color: var(--z-primary) !important; }
.nav-tabs .nav-link.active { color: var(--z-primary) !important; border-bottom-color: var(--z-primary) !important; }
.nav-pills .nav-link { border-radius: 16px; font-weight: 600; color: var(--z-text-2); }
.nav-pills .nav-link.active { background: var(--z-primary) !important; color: #fff !important; }

.badge { font-weight: 700; font-size: 11.5px; border-radius: 12px; padding: 4px 9px; letter-spacing: .01em; }
.badge.bg-success, .badge.badge-success, .badge.text-bg-success { background: var(--z-green-soft) !important; color: #0B7A51 !important; }
.badge.bg-danger, .badge.badge-danger, .badge.text-bg-danger { background: var(--z-red-soft) !important; color: #B4302A !important; }
.badge.bg-warning, .badge.badge-warning, .badge.text-bg-warning { background: var(--z-orange-soft) !important; color: #A55A06 !important; }
.badge.bg-info, .badge.badge-info, .badge.text-bg-info { background: var(--z-teal-soft) !important; color: #08727B !important; }
.badge.bg-primary, .badge.badge-primary, .badge.text-bg-primary { background: var(--z-primary-soft) !important; color: var(--z-primary) !important; }
.badge.bg-secondary, .badge.badge-secondary, .badge.text-bg-secondary, .badge.bg-light { background: #EEF1F5 !important; color: var(--z-text-2) !important; }
.badge.bg-dark { background: #2B3443 !important; color: #fff !important; }

.alert { border: 1px solid transparent; border-radius: var(--z-radius-lg); font-size: 13.5px; }
.alert-info { background: var(--z-primary-soft); border-color: #CFE0F5; color: #1B4F80; }
.alert-success { background: var(--z-green-soft); border-color: #BFE7D6; color: #0B6A47; }
.alert-warning { background: var(--z-orange-soft); border-color: #F6D9B5; color: #8A4B05; }
.alert-danger { background: var(--z-red-soft); border-color: #F4C7C3; color: #9A2A24; }

.dropdown-menu {
    border: 1px solid var(--z-border) !important; border-radius: var(--z-radius-lg) !important;
    box-shadow: var(--z-shadow-3) !important; padding: 6px !important; font-size: 13.5px;
}
.dropdown-item { border-radius: var(--z-radius); padding: 7px 10px; color: var(--z-text); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--z-surface-2); color: var(--z-primary); }
.dropdown-item.active, .dropdown-item:active { background: var(--z-primary-soft); color: var(--z-primary); }
.page-link { color: var(--z-primary); border-color: var(--z-border); }
.page-item.active .page-link { background: var(--z-primary); border-color: var(--z-primary); }
.list-group-item { border-color: var(--z-border); }
.list-group-item-action:hover { background: var(--z-surface-2); }
.progress { background: #E9EDF3; border-radius: 10px; }
.progress-bar { background: var(--z-primary); }

/* --------------------------------------------------------------- modals */
.modal-content { border: 0 !important; border-radius: var(--z-radius-lg) !important; box-shadow: var(--z-shadow-3) !important; overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--z-border) !important; padding: 14px 18px; background: #fff; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-footer { border-top: 1px solid var(--z-border) !important; background: var(--z-surface-2); padding: 10px 18px; }
.modal-backdrop.show { opacity: .42; background: #0F1724; }

/* SweetAlert2 */
.swal2-popup { font-family: var(--z-font) !important; border-radius: 12px !important; padding: 22px 22px 18px !important; box-shadow: var(--z-shadow-3) !important; }
.swal2-title { font-size: 19px !important; font-weight: 700 !important; color: var(--z-text) !important; }
.swal2-html-container { font-size: 14px !important; color: var(--z-text-2) !important; }
.swal2-styled { border-radius: 4px !important; font-weight: 600 !important; font-size: 13.5px !important; padding: 8px 18px !important; box-shadow: none !important; }
.swal2-styled.swal2-confirm { background: var(--z-primary) !important; }
.swal2-styled.swal2-confirm:hover { background: var(--z-primary-hover) !important; }
.swal2-styled.swal2-cancel { background: #fff !important; color: var(--z-text) !important; border: 1px solid var(--z-border-strong) !important; }
.swal2-styled.swal2-deny { background: var(--z-red) !important; }
.swal2-icon { transform: scale(.82); margin-top: 8px !important; }
.swal2-input, .swal2-textarea, .swal2-select { border-radius: 4px !important; font-size: 14px !important; border-color: var(--z-border-strong) !important; box-shadow: none !important; }
.swal2-input:focus, .swal2-textarea:focus { border-color: var(--z-primary) !important; box-shadow: 0 0 0 3px var(--z-primary-ring) !important; }
.swal2-toast { border-radius: 10px !important; box-shadow: var(--z-shadow-3) !important; }

/* ------------------------------------------------------------- tooltips */
.z-tip {
    position: fixed; z-index: 2147483000; pointer-events: none; max-width: 280px;
    background: #2B3443; color: #fff; font: 500 12.5px/1.45 var(--z-font);
    padding: 6px 10px; border-radius: 6px; box-shadow: 0 6px 18px rgba(16, 24, 40, .22);
    opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .14s ease, transform .16s var(--z-ease);
    white-space: pre-line; word-wrap: break-word;
}
.z-tip.z-tip-below { transform: translateY(-4px) scale(.98); }
.z-tip.z-show { opacity: 1; transform: none; }
.z-tip::after {
    content: ""; position: absolute; left: var(--z-tip-x, 50%); width: 8px; height: 8px; background: #2B3443;
    transform: translateX(-50%) rotate(45deg); bottom: -4px; border-radius: 1px;
}
.z-tip.z-tip-below::after { bottom: auto; top: -4px; }
.tooltip .tooltip-inner { background: #2B3443; border-radius: 6px; font-size: 12.5px; padding: 6px 10px; max-width: 280px; text-align: left; }
.field-help-icon { background: var(--z-primary-soft) !important; color: var(--z-primary) !important; }
.field-help-icon:hover { background: var(--z-primary) !important; color: #fff !important; }

/* --------------------------------------------- page loading bar + toasts */
#zLoadBar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2147483001; pointer-events: none;
    background: linear-gradient(90deg, #3D8BFD, var(--z-primary), #12A06C);
    box-shadow: 0 0 8px rgba(61, 139, 253, .6); opacity: 0;
    transition: width .35s var(--z-ease), opacity .3s ease;
}
#zLoadBar.z-on { opacity: 1; }
.z-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 2147482000; display: flex; flex-direction: column; gap: 8px; }
.z-toast {
    display: flex; gap: 10px; align-items: flex-start; min-width: 260px; max-width: 380px;
    background: #fff; border: 1px solid var(--z-border); border-left: 4px solid var(--z-primary); border-radius: 8px;
    box-shadow: var(--z-shadow-3); padding: 10px 14px; font-size: 13.5px; color: var(--z-text);
    animation: zToastIn .28s var(--z-ease) both;
}
.z-toast.z-success { border-left-color: var(--z-green); }
.z-toast.z-error { border-left-color: var(--z-red); }
.z-toast.z-warning { border-left-color: var(--z-orange); }
.z-toast.z-out { animation: zToastOut .22s ease both; }

/* ------------------------------------------------------------ animations */
@keyframes zFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes zFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zPop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes zToastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes zToastOut { to { opacity: 0; transform: translateX(16px); } }
@keyframes zShimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes zPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 71, 59, .45); } 50% { box-shadow: 0 0 0 5px rgba(224, 71, 59, 0); } }

@media (prefers-reduced-motion: no-preference) {
    /* 'backwards', not 'both': an animation still holding transform / opacity after it ends turns the
       element into the containing block for position:fixed children, so Bootstrap modals inside the
       page were placed and clipped inside it (and sat under the backdrop). */
    .content-wrapper > * { animation: zFadeUp .35s var(--z-ease) backwards; }
    .content-wrapper .card, .content-wrapper .z-kpi { animation: zFadeUp .4s var(--z-ease) backwards; }
    .content-wrapper .row > [class*=col]:nth-child(1) > .card { animation-delay: .03s; }
    .content-wrapper .row > [class*=col]:nth-child(2) > .card { animation-delay: .07s; }
    .content-wrapper .row > [class*=col]:nth-child(3) > .card { animation-delay: .11s; }
    .content-wrapper .row > [class*=col]:nth-child(4) > .card { animation-delay: .15s; }
    .content-wrapper .row > [class*=col]:nth-child(5) > .card { animation-delay: .19s; }
    .content-wrapper .row > [class*=col]:nth-child(6) > .card { animation-delay: .23s; }
    .e-grid .e-content .e-row { animation: zFadeIn .25s ease backwards; }
    .modal.fade .modal-dialog { transform: translateY(-14px) scale(.98) !important; transition: transform .24s var(--z-ease), opacity .2s ease !important; }
    .modal.show .modal-dialog { transform: none !important; }
    .dropdown-menu.show, .e-popup.e-popup-open, .e-dialog.e-popup-open { animation: zPop .16s var(--z-ease) both; }
    .swal2-show { animation: zPop .22s var(--z-ease) both !important; }
    .z-iconbtn .z-dot { animation: zPulse 2s ease-in-out infinite; }
    .z-skeleton {
        background: linear-gradient(90deg, #EEF1F5 0, #F7F9FB 40px, #EEF1F5 80px) #EEF1F5;
        background-size: 800px 100%; animation: zShimmer 1.2s linear infinite; border-radius: 4px; color: transparent !important;
    }
}

/* ----------------------------------------------------- field help "?" */
.z-help {
    display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px;
    border-radius: 50%; background: var(--z-primary-soft); color: var(--z-primary); font: 700 10px/1 var(--z-font);
    cursor: help; vertical-align: middle; transition: background .15s ease, color .15s ease, transform .15s var(--z-ease);
}
.z-help:hover, .z-help:focus-visible { background: var(--z-primary); color: #fff; transform: scale(1.12); outline: none; }

/* ------------------------------------------- capture flow progress stepper */
/* The capture-flow step bar was removed by request; hidden as well in case an old cached script adds it. */
.modal .z-stepper { display: none !important; }
.z-stepper { position: relative; padding: 24px 20px 10px; background: linear-gradient(180deg, #F7FAFE, #fff); border-bottom: 1px solid var(--z-border); }
.z-stepper ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; z-index: 1; }
.z-stepper-track { position: absolute; left: 38px; right: 38px; top: 39px; height: 3px; background: #E3E8EF; border-radius: 3px; }
.z-stepper-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--z-green), var(--z-primary)); transition: width .7s var(--z-ease); }
.z-step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 52px; cursor: default; }
.z-step-dot {
    width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
    background: #fff; color: #A9B2BF; border: 2px solid #D9DFE7; transition: all .3s var(--z-ease);
}
.z-step-label { font-size: 11.5px; font-weight: 700; color: var(--z-muted); letter-spacing: .01em; }
.z-step.done .z-step-dot { background: var(--z-green); border-color: var(--z-green); color: #fff; }
.z-step.done .z-step-label { color: #0B7A51; }
.z-step.current .z-step-dot {
    background: var(--z-primary); border-color: var(--z-primary); color: #fff;
    box-shadow: 0 0 0 5px var(--z-primary-ring); animation: zStepPulse 2s ease-in-out infinite;
}
.z-step.current .z-step-label { color: var(--z-primary); }
.z-stepper-count { position: absolute; right: 20px; top: 5px; line-height: 14px; font-size: 10.5px; font-weight: 700; color: var(--z-muted); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 575.98px) { .z-step-label { display: none; } .z-step { min-width: 0; } }
.modal-title .z-step-ico {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 9px;
    background: var(--z-primary-soft); color: var(--z-primary); font-size: 14px; vertical-align: middle; animation: zPop .35s var(--z-ease) both;
}
/* capture pop-ups: roomier, friendlier forms */
.modal .modal-body .row > [class*=col] { transition: transform .15s ease; }
.modal .modal-body .form-control:focus, .modal .modal-body .form-select:focus { transform: translateY(-1px); }
.modal .modal-body .alert { animation: zFadeUp .3s var(--z-ease) both; }

/* ------------------------------------------------ micro-interactions */
.btn:hover > i:first-child:not(:only-child) { transform: translateX(-1px) scale(1.08); }
.btn > i { transition: transform .15s var(--z-ease); display: inline-block; }
.z-toast .z-toast-ico { animation: zTick .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.content-wrapper h3 > i:first-child, .content-wrapper h4 > i:first-child { animation: zPop .4s var(--z-ease) backwards; }
.e-grid .e-headercell .e-sortfilterdiv, .e-grid .e-headercell .e-filtermenudiv { transition: transform .15s ease, color .15s ease; }
.e-grid .e-headercell:hover .e-filtermenudiv { transform: scale(1.15); color: var(--z-primary) !important; }
.badge { transition: transform .15s var(--z-ease); }
tr:hover .badge, .e-row:hover .badge { transform: scale(1.04); }

@keyframes zStepPulse { 0%, 100% { box-shadow: 0 0 0 4px var(--z-primary-ring); } 50% { box-shadow: 0 0 0 8px rgba(34, 109, 180, .08); } }
@keyframes zTick { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .z-step.current .z-step-dot, .z-toast .z-toast-ico, .modal-title .z-step-ico { animation: none !important; }
    .z-stepper-fill { transition: none; }
}

/* ------------------------------------------------------------- auth page */
body.login-page, body.register-page {
    background: radial-gradient(1200px 600px at 10% -10%, #DCEAFB 0, transparent 60%),
                radial-gradient(900px 500px at 110% 110%, #DDF3EA 0, transparent 55%), var(--z-bg) !important;
}
.login-box .card, .register-box .card { border-radius: 14px !important; box-shadow: var(--z-shadow-3) !important; border: 0 !important; animation: zFadeUp .45s var(--z-ease) both; }
.login-logo a, .register-logo a { color: var(--z-text) !important; font-weight: 800 !important; letter-spacing: -.01em; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
    .z-search { max-width: none; }
    .z-search select, .z-search kbd { display: none; }
    .z-hide-md { display: none !important; }
}
@media (max-width: 575.98px) {
    .z-create-btn span { display: none; }
    .z-create-btn { width: 34px; padding: 0; justify-content: center; }
}
@media print {
    .main-header, .main-sidebar, #zLoadBar, .z-toasts, .z-tip { display: none !important; }
    .content-wrapper { margin: 0 !important; }
    .content-wrapper > *, .card { animation: none !important; box-shadow: none !important; }
}

/* ── Zoho-style "Filter by fields" panel (grid-filter-panel.js) ─────────────────────────── */
.bpfp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; min-height: 30px; }
.bpfp-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--z-border-strong); border-radius: var(--z-radius); background: var(--z-surface); color: var(--z-text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s var(--z-ease); }
.bpfp-btn:hover { border-color: var(--z-primary); color: var(--z-primary); }
.bpfp-btn.on { background: var(--z-primary-soft); border-color: var(--z-primary); color: var(--z-primary); }
.bpfp-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--z-primary); color: #fff; font-size: 11px; }
.bpfp-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 340px; height: 26px; padding: 0 4px 0 10px; border-radius: 13px; background: var(--z-primary-soft); color: var(--z-primary-hover); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: bpfpIn .2s var(--z-ease); }
.bpfp-chip:hover { background: #dbe8f8; }
.bpfp-chip-x { border: 0; background: transparent; color: inherit; width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; cursor: pointer; }
.bpfp-chip-x:hover { background: rgba(34, 109, 180, .18); }
.bpfp-clear { border: 0; background: transparent; color: var(--z-red); font-size: 12px; font-weight: 600; cursor: pointer; }
.bpfp-clear:hover { text-decoration: underline; }
@keyframes bpfpIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.bpfp-overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, .28); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1060; }
.bpfp-overlay.open { opacity: 1; pointer-events: auto; }
/* Opens inside the module's content area (top / left are set from the content area when opened). */
.bpfp-overlay { right: 0; bottom: 0; }
.bpfp-panel { position: fixed; top: 0; left: 0; bottom: 0; width: 340px; max-width: 92vw; display: flex; flex-direction: column; background: var(--z-surface); box-shadow: var(--z-shadow-3); border-right: 1px solid var(--z-border); opacity: 0; visibility: hidden; transform: translateX(-16px); transition: transform .22s var(--z-ease), opacity .18s ease, visibility 0s linear .22s; z-index: 1061; font-family: var(--z-font); }
.bpfp-panel.open { opacity: 1; visibility: visible; transform: none; transition: transform .22s var(--z-ease), opacity .18s ease, visibility 0s; }
.bpfp-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 10px; border-bottom: 1px solid var(--z-border); }
.bpfp-title { font-size: 15px; font-weight: 700; color: var(--z-text); }
.bpfp-sub { font-size: 12px; color: var(--z-muted); margin-top: 2px; }
.bpfp-close { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--z-muted); cursor: pointer; }
.bpfp-close:hover { color: var(--z-text); }
.bpfp-search { position: relative; padding: 10px 16px; border-bottom: 1px solid var(--z-border); }
.bpfp-search i { position: absolute; left: 27px; top: 50%; transform: translateY(-50%); color: var(--z-muted); font-size: 12px; }
.bpfp-search input { width: 100%; height: 32px; padding: 0 10px 0 30px; border: 1px solid var(--z-border-strong); border-radius: var(--z-radius); font-size: 13px; }
.bpfp-search input:focus { outline: 0; border-color: var(--z-primary); box-shadow: 0 0 0 3px var(--z-primary-ring); }
.bpfp-body { flex: 1; overflow-y: auto; padding: 4px 0 12px; }
.bpfp-section { position: sticky; top: 0; z-index: 1; padding: 10px 16px 6px; background: var(--z-surface); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--z-muted); }
.bpfp-section span { font-weight: 600; color: var(--z-border-strong); }
.bpfp-field { padding: 2px 16px; }
.bpfp-field.on { background: var(--z-surface-2); border-left: 3px solid var(--z-primary); padding-left: 13px; padding-bottom: 10px; }
.bpfp-check { display: flex; align-items: center; gap: 7px; margin: 0; padding: 6px 0; font-size: 13px; font-weight: 500; color: var(--z-text); cursor: pointer; }
.bpfp-check input { width: 15px; height: 15px; accent-color: var(--z-primary); }
.bpfp-check em { font-style: normal; font-size: 10px; color: var(--z-muted); background: var(--z-bg); border-radius: 8px; padding: 1px 6px; }
.bpfp-ti { width: 14px; text-align: center; font-size: 11px; color: var(--z-muted); }
.bpfp-crit { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 0 22px; animation: bpfpIn .18s var(--z-ease); }
.bpfp-and { font-size: 11px; color: var(--z-muted); text-align: center; }
.bpfp-vals { display: flex; flex-direction: column; gap: 4px; }
.bpfp-vtools { font-size: 11px; color: var(--z-muted); }
.bpfp-vtools a { color: var(--z-primary); }
.bpfp-vcount { float: right; font-weight: 600; }
.bpfp-vlist { max-height: 210px; overflow-y: auto; border: 1px solid var(--z-border); border-radius: var(--z-radius); background: var(--z-surface); padding: 4px 0; }
.bpfp-v { display: flex; align-items: center; gap: 7px; margin: 0; padding: 4px 10px; font-size: 12.5px; font-weight: 400; cursor: pointer; }
.bpfp-v:hover { background: var(--z-primary-soft); }
.bpfp-v span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpfp-v b { font-weight: 600; font-size: 11px; color: var(--z-muted); }
.bpfp-v input { accent-color: var(--z-primary); }
.bpfp-none { padding: 24px 16px; text-align: center; color: var(--z-muted); font-size: 13px; }
.bpfp-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--z-border); background: var(--z-surface-2); }

/* ── Searchable dropdowns (settings-ux.js) ────────────────────────────────────────────── */
select.zsel-searchable { cursor: pointer; }
.zsel-pop { position: fixed; z-index: 2100; display: flex; flex-direction: column; max-height: 320px; background: var(--z-surface); border: 1px solid var(--z-border-strong); border-radius: var(--z-radius-lg); box-shadow: var(--z-shadow-3); overflow: hidden; animation: zselIn .14s var(--z-ease); font-family: var(--z-font); }
.zsel-pop.up { animation-name: zselUp; }
@keyframes zselIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes zselUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.zsel-search { position: relative; padding: 8px; border-bottom: 1px solid var(--z-border); }
.zsel-search i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--z-muted); }
.zsel-search input { width: 100%; height: 30px; padding: 0 64px 0 28px; border: 1px solid var(--z-border-strong); border-radius: var(--z-radius); font-size: 13px; }
.zsel-search input:focus { outline: 0; border-color: var(--z-primary); box-shadow: 0 0 0 3px var(--z-primary-ring); }
.zsel-count { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--z-muted); }
.zsel-list { overflow-y: auto; padding: 4px 0; }
.zsel-group { padding: 6px 12px 2px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--z-muted); }
.zsel-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; font-size: 13px; color: var(--z-text); cursor: pointer; }
.zsel-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zsel-opt.act { background: var(--z-primary-soft); }
.zsel-opt.sel { font-weight: 700; color: var(--z-primary); }
.zsel-opt.sel i { font-size: 11px; }
.zsel-opt.dis { color: var(--z-muted); cursor: not-allowed; }
.zsel-opt mark, .zfind mark { background: #FFE9A8; color: inherit; padding: 0; border-radius: 2px; }
.zsel-none { padding: 14px; text-align: center; font-size: 12.5px; color: var(--z-muted); }

/* ── Find a setting on this page (settings-ux.js) ──────────────────────────────────────── */
.zfind { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: rgba(243, 245, 248, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--z-border); }
.zfind-box { position: relative; flex: 1; max-width: 640px; display: flex; align-items: center; }
.zfind-box > i { position: absolute; left: 12px; color: var(--z-muted); font-size: 12px; }
.zfind-box input { flex: 1; height: 34px; padding: 0 140px 0 32px; border: 1px solid var(--z-border-strong); border-radius: 17px; background: var(--z-surface); font-size: 13px; }
.zfind-box input:focus { outline: 0; border-color: var(--z-primary); box-shadow: 0 0 0 3px var(--z-primary-ring); }
.zfind.none .zfind-box input { border-color: var(--z-red); }
.zfind-n { position: absolute; right: 64px; font-size: 11.5px; color: var(--z-muted); }
.zfind-box button { position: absolute; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--z-text-2); font-size: 11px; }
.zfind-box button:hover { background: var(--z-primary-soft); color: var(--z-primary); }
.zfind-prev { right: 34px; } .zfind-next { right: 6px; }
.zfind-jump { position: relative; }
.zfind-jump-btn { height: 34px; padding: 0 14px; border: 1px solid var(--z-border-strong); border-radius: 17px; background: var(--z-surface); font-size: 13px; font-weight: 600; color: var(--z-text-2); }
.zfind-jump-btn:hover { border-color: var(--z-primary); color: var(--z-primary); }
.zfind-menu { display: none; position: absolute; top: 40px; left: 0; min-width: 240px; max-height: 360px; overflow-y: auto; padding: 6px 0; background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-radius-lg); box-shadow: var(--z-shadow-3); }
.zfind-jump.open .zfind-menu { display: block; animation: zselIn .14s var(--z-ease); }
.zfind-menu a { display: block; padding: 7px 14px; font-size: 13px; color: var(--z-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zfind-menu a:hover { background: var(--z-primary-soft); color: var(--z-primary); }
.zfind-menu a.tab::before { content: "Tab · "; color: var(--z-muted); font-size: 11px; }
.zfind-empty { padding: 10px 14px; font-size: 12.5px; color: var(--z-muted); }
.zfind-hit { background: #FFF6D6 !important; box-shadow: 0 0 0 2px #FFE9A8; border-radius: 3px; }
.zfind-cur { background: #FFE9A8 !important; box-shadow: 0 0 0 2px #F5B400; }
.zfind-flash { animation: zfindFlash 1.2s ease; }
@keyframes zfindFlash { 0% { box-shadow: 0 0 0 3px rgba(34, 109, 180, .45); } 100% { box-shadow: 0 0 0 0 rgba(34, 109, 180, 0); } }
