/* Look of the CRM (v2): emerald rail, second menu panel, white work area, rounded cards, green table headings. */
:root { --vx-rail: #047857; --vx-brand: #10b981; --vx-brand-dark: #0ea371; --vx-ink: #0a0a0a; --vx-on-brand: #06231a; --vx-line: #e5e5e5; --vx-muted: #6b6b6b; --vx-soft: #ecfdf5; }
.fi-body { background: #fff; color: var(--vx-ink); }

/* ---------- side menu ---------- */
.fi-sidebar.fi-main-sidebar.vx-side { display: flex; flex-direction: row; width: 72px; background: #fff; gap: 0; }
.fi-sidebar.fi-main-sidebar.vx-side.vx-side-wide { width: 292px; }
.vx-rail { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; flex: none; height: 100%; padding: 12px 0; overflow-y: auto; background: var(--vx-rail); color: #fff; }
.vx-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 999px; background: rgb(0 0 0 / .2); border: 2px solid rgb(255 255 255 / .3); font-size: 12px; font-weight: 700; }
.vx-rail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 71px; flex: none; border-radius: 14px; }
.vx-rail-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 18px; border: 1px solid transparent; }
.vx-rail-icon svg { width: 21px; height: 21px; }
.vx-rail-item:hover .vx-rail-icon { background: rgb(255 255 255 / .12); }
.vx-rail-item.vx-on .vx-rail-icon { background: rgb(255 255 255 / .25); border-color: rgb(255 255 255 / .4); box-shadow: 0 10px 25px -15px rgb(255 255 255 / .7); }
.vx-rail-label { font-size: 11px; font-weight: 600; line-height: 13px; letter-spacing: -.005em; }
.vx-rail-bottom { margin-top: auto; }
.vx-rail a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vx-panel { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; height: 100%; overflow-y: auto; padding: 0 10px 16px; border-right: 1px solid var(--vx-line); background: linear-gradient(90deg, #f3fbf7, #fff); }
.vx-panel-head { display: flex; align-items: center; gap: 10px; height: 64px; flex: none; margin-bottom: 8px; padding: 0 4px; border-bottom: 1px solid var(--vx-line); font-size: 16px; font-weight: 700; }
.vx-panel-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: #d1fae5; color: var(--vx-rail); }
.vx-panel-dot svg { width: 15px; height: 15px; }
.vx-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: #525252; }
.vx-link svg { width: 17px; height: 17px; flex: none; }
.vx-link:hover { background: var(--vx-soft); color: var(--vx-ink); }
.vx-link.vx-on { background: #d1fae5; color: #065f46; font-weight: 600; }

/* ---------- top bar ---------- */
.fi-topbar { min-height: 64px; background: rgb(255 255 255 / .96); box-shadow: none; border-bottom: 1px solid var(--vx-line); }
.fi-topbar .fi-topbar-end { flex: 1; }
.fi-topbar .fi-global-search-ctn { flex: 1; display: flex; justify-content: center; }
.fi-topbar .fi-global-search { width: 100%; max-width: 460px; }
.fi-global-search-field .fi-input-wrp { border-radius: 999px; }

@media (min-width: 1024px) {
    .fi-main-sidebar.vx-side { position: fixed; inset-block: 0; inset-inline-start: 0; height: 100dvh; z-index: 40; translate: none; transform: none; }
    body:has(.vx-side) .fi-topbar-ctn, body:has(.vx-side) .fi-layout { padding-inline-start: 72px; }
    body:has(.vx-side-wide) .fi-topbar-ctn, body:has(.vx-side-wide) .fi-layout { padding-inline-start: 292px; }
    body:has(.vx-side) .fi-topbar-start, body:has(.vx-side) .fi-topbar-open-sidebar-btn, body:has(.vx-side) .fi-topbar-close-sidebar-btn { display: none; }
}

/* ---------- headings, cards, buttons, fields ---------- */
.fi-header-heading { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; }
.fi-section:not(.fi-section-not-contained), .fi-wi-stats-overview-stat { border-radius: 18px; box-shadow: 0 1px 3px rgb(0 0 0 / .08), 0 1px 2px -1px rgb(0 0 0 / .08); border: 1px solid var(--vx-line); --tw-ring-shadow: 0 0 #0000; }
.fi-section-header-heading { font-weight: 700; }
.fi-btn { border-radius: 10px; font-weight: 600; }
.fi-btn.fi-color.fi-color-primary { background-color: var(--vx-brand); color: var(--vx-on-brand); }
.fi-btn.fi-color.fi-color-primary:hover { background-color: var(--vx-brand-dark); }
.fi-btn.fi-color.fi-color-primary svg { color: var(--vx-on-brand); }
.fi-input-wrp { border-radius: 10px; }
.fi-modal-window { border-radius: 18px; }

/* ---------- tables ---------- */
.fi-ta-ctn { border-radius: 18px; box-shadow: none; border: 1px solid var(--vx-line); --tw-ring-shadow: 0 0 #0000; }
.fi-ta-search-field .fi-input-wrp { border-radius: 999px; }
.fi-ta-table thead tr, .fi-ta-table thead th { background: var(--vx-brand); }
.fi-ta-table thead th, .fi-ta-table thead th * { color: var(--vx-on-brand); }
.fi-ta-table thead th { font-size: 12px; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.fi-ta-table thead th span { font-size: 12px; font-weight: 700; }
.fi-ta-table thead input[type=checkbox] { background-color: #fff; }
.fi-ta-table thead th { padding-inline: .5rem; }
.fi-ta-table thead th:first-of-type { padding-inline-start: 1rem; }
.fi-ta-table td .fi-ta-text { padding-inline: .5rem; }
.fi-ta-table td:first-of-type .fi-ta-text { padding-inline-start: 1rem; }
.fi-ta-table td .fi-ta-text, .fi-ta-table td .fi-ta-text-item { font-size: 13px; }
.fi-ta-table tbody tr:nth-child(even) { background: #fafafa; }
.fi-ta-table tbody tr:hover { background: var(--vx-soft); }

/* Tabs look like the CRM's switch: the open one is black. */
.fi-tabs .fi-tabs-item { border-radius: 8px; }
.fi-tabs .fi-tabs-item.fi-active { background: var(--vx-ink); }
.fi-tabs .fi-tabs-item.fi-active, .fi-tabs .fi-tabs-item.fi-active * { color: #fff; }

/* ---------- home ---------- */
.vx-hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.vx-date { color: var(--vx-muted); font-size: 14px; }
.vx-hello h1 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.vx-hello h1 span { color: var(--vx-brand-dark); }
.vx-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); border: 1px solid var(--vx-line); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.vx-stat { display: block; padding: 14px 20px; border-inline-end: 1px solid var(--vx-line); }
.vx-stat:hover { background: var(--vx-soft); }
.vx-stat small { display: block; color: var(--vx-muted); font-size: 12px; font-weight: 600; }
.vx-stat b { font-size: 24px; font-weight: 800; }
.vx-columns { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .vx-columns { grid-template-columns: minmax(0, 1fr); } }
.vx-next { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--vx-line); }
.vx-next:first-child { border-top: 0; }
.vx-next-badge { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 999px; background: var(--vx-soft); color: var(--vx-rail); }
.vx-next-badge svg { width: 17px; height: 17px; }
.vx-next-text { flex: 1; min-width: 0; }
.vx-next-text b { display: block; font-size: 14px; }
.vx-next-text small { color: var(--vx-muted); font-size: 12.5px; }
.vx-next-when { font-size: 12px; font-weight: 600; color: #b91c1c; white-space: nowrap; }
.vx-app { display: block; padding: 10px 0; border-top: 1px solid var(--vx-line); }
.vx-app:first-child { border-top: 0; }
.vx-app b { display: block; font-size: 14px; }
.vx-app small { color: var(--vx-muted); font-size: 12.5px; }
.vx-app:hover b { color: var(--vx-rail); }

/* ---------- detail pages ---------- */
.vx-muted { color: var(--vx-muted); }
.vx-pos { color: #047857; }
.vx-neg { color: #b91c1c; }
.vx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; }
.vx-tile { display: block; padding: 14px 18px; border: 1px solid var(--vx-line); border-radius: 18px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .06); }
a.vx-tile:hover { background: var(--vx-soft); }
.vx-tile small { display: block; color: var(--vx-muted); font-size: 12px; font-weight: 600; }
.vx-tile b { display: block; font-size: 22px; font-weight: 800; line-height: 1.3; }
.vx-tile span { display: block; color: var(--vx-muted); font-size: 12.5px; }
.vx-columns-even { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.vx-stack { display: grid; gap: 16px; min-width: 0; }
.vx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--vx-line); font-size: 14px; }
.vx-row:first-child { border-top: 0; }
.vx-row > span:first-child { flex: 1; min-width: 0; }
.vx-row-link:hover b:first-child, .vx-row-link:hover span:first-child b { color: var(--vx-rail); }
.vx-kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; }
.vx-kv dt { color: var(--vx-muted); }
.vx-kv dd { font-weight: 500; overflow-wrap: anywhere; }
.vx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vx-chip { display: inline-block; padding: 2px 10px; margin: 2px 0; border-radius: 999px; background: #f4f4f5; color: #3f3f46; font-size: 12px; font-weight: 600; white-space: nowrap; }
.vx-chip-green { background: #d1fae5; color: #065f46; }
.vx-chip-red { background: #fee2e2; color: #991b1b; }
.vx-chip-amber { background: #fef3c7; color: #92400e; }
.vx-label { margin: 14px 0 6px; color: var(--vx-muted); font-size: 12px; font-weight: 600; }
.vx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vx-table th { padding: 8px 10px; background: var(--vx-brand); color: var(--vx-on-brand); font-size: 12px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .02em; }
.vx-table th:first-child { border-top-left-radius: 10px; }
.vx-table th:last-child { border-top-right-radius: 10px; }
.vx-table td { padding: 9px 10px; border-top: 1px solid var(--vx-line); vertical-align: top; }
.vx-table tbody tr:hover { background: var(--vx-soft); }
.vx-table a, .vx-kv a, .fi-section-content a:not(.vx-row):not(.vx-app):not(.vx-tile) { color: var(--vx-rail); font-weight: 600; }
.vx-link-btn { color: var(--vx-rail); font-size: 13px; font-weight: 600; background: none; border: 0; cursor: pointer; padding: 0; }
.vx-list { display: grid; gap: 6px; padding-left: 18px; list-style: disc; font-size: 14px; }
.vx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.vx-search { flex: 1; min-width: 12rem; max-width: 24rem; padding: 8px 14px; border: 1px solid var(--vx-line); border-radius: 999px; font-size: 14px; }
.vx-check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.vx-count-cell { display: inline-flex; align-items: center; gap: 8px; }
.vx-count { width: 6rem; padding: 6px 10px; border: 1px solid var(--vx-line); border-radius: 10px; font-size: 14px; }
.vx-count:focus, .vx-search:focus { outline: 2px solid var(--vx-brand); outline-offset: 1px; }
.vx-version { margin-top: auto; padding-top: 6px; color: rgb(255 255 255 / .75); font-size: 10.5px; font-weight: 600; }
.vx-version:hover { color: #fff; }
.vx-rail-bottom ~ .vx-version { margin-top: 0; }
/* Clickable rows feel clickable. */
.fi-ta-table tbody tr:has(a.fi-ta-record-url), .fi-ta-row.fi-clickable { cursor: pointer; }
.vx-wa-preview { white-space: pre-wrap; padding: 12px 14px; border-radius: 12px; background: #dcf8c6; color: #111; font-size: 13.5px; max-width: 34rem; }
.vx-switch { display: inline-flex; padding: 3px; border: 1px solid var(--vx-line); border-radius: 10px; gap: 2px; }
.vx-switch button { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #525252; }
.vx-switch button.vx-on { background: var(--vx-ink); color: #fff; }
.vx-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.vx-row-actions .fi-link, .vx-row-actions .fi-btn { font-size: 13px; }
@media (max-width: 640px) { .vx-next { flex-wrap: wrap; } .vx-row-actions { width: 100%; padding-left: 46px; } }
