/**
 * ValueTrack admin UI — shared visual system (Inter, compact operational density).
 * Loaded globally from shared/admin/base.html after theme.css + base.css.
 * Scoped to .vt-admin (admin layout shell). CRM retains #crm-hub-root refinements in crm_typography.css.
 */

/* ------------------------------------------------------------------ tokens */
.vt-admin {
    --admin-font: var(--font-base);
    --admin-text-body: var(--font-size-base);
    --admin-text-meta: var(--admin-font-size-meta);
    --admin-text-label: var(--admin-font-size-label);
    --admin-text-nav: 13px;
    --admin-lh-body: 1.45;
    --admin-lh-snug: 1.35;
    --admin-lh-tight: 1.25;

    --admin-space-1: 4px;
    --admin-space-2: 8px;
    --admin-space-3: 12px;
    --admin-space-4: 16px;
    --admin-space-5: 24px;

    --admin-radius-sm: 4px;
    --admin-radius-md: 6px;
    --admin-radius-lg: 8px;

    --admin-input-h: 24px;
    --admin-btn-py: 6px;
    --admin-btn-px: 12px;

    --admin-table-cell-py: 6px;
    --admin-table-cell-px: 10px;

    --admin-card-pad: var(--admin-space-4);
    --admin-modal-pad: var(--admin-space-4);

    font-family: var(--admin-font);
    font-size: var(--admin-text-body);
    font-weight: 400;
    line-height: var(--admin-lh-body);
    font-feature-settings: "liga" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------ hierarchy */
.vt-admin h1 {
    font-size: var(--admin-font-size-page-title);
    font-weight: 600;
    line-height: var(--admin-lh-tight);
    letter-spacing: -0.01em;
}

.vt-admin h2 {
    font-size: var(--admin-font-size-section);
    font-weight: 600;
    line-height: 1.3;
}

.vt-admin h3 {
    font-size: var(--admin-font-size-label);
    font-weight: 500;
    line-height: var(--admin-lh-snug);
}

.vt-admin .font-bold {
    font-weight: 600;
}

.vt-admin .font-semibold {
    font-weight: 600;
}

/* ------------------------------------------------------------------ top navigation */
.vt-admin .admin-top-nav {
    font-size: var(--admin-text-nav);
}

.vt-admin .admin-top-nav a,
.vt-admin .admin-top-nav button {
    font-size: inherit;
}

.vt-admin .admin-nav-flyout a {
    font-size: 13px;
    padding: 6px 12px;
}

.vt-admin .admin-nav-section-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
}

/* Nav visit history — admin_nav_history.js
   Current leaf / parent-of-current = yellow. Other visited = green. */
.vt-admin .admin-top-nav a[data-admin-nav-id].admin-nav--visited:not([role="menuitem"]) {
    border-bottom: 2px solid var(--color-main, #035122) !important;
    border-bottom-color: var(--color-main, #035122) !important;
    color: var(--color-main, #035122) !important;
    font-weight: 500 !important;
    background-color: transparent !important;
}

.vt-admin .admin-top-nav a[data-admin-nav-id].admin-nav--current:not([role="menuitem"]),
.vt-admin .admin-top-nav a[data-admin-nav-id].admin-nav--parent-active:not([role="menuitem"]) {
    background-color: #ffde59 !important;
    color: #111827 !important;
    font-weight: 500 !important;
    border-bottom: 2px solid var(--color-main, #035122) !important;
}

.vt-admin .admin-top-nav [role="menuitem"][data-admin-nav-id].admin-nav--visited {
    background-color: var(--color-main-light, #ecfdf5) !important;
    color: var(--color-main, #035122) !important;
    font-weight: 500 !important;
    box-shadow: inset 3px 0 0 var(--color-main, #035122);
}

.vt-admin .admin-top-nav [role="menuitem"][data-admin-nav-id].admin-nav--current {
    background-color: #ffde59 !important;
    color: #111827 !important;
    font-weight: 500 !important;
    box-shadow: inset 3px 0 0 var(--color-main, #035122);
}

.vt-admin #admin-mobile-menu a[data-admin-nav-id].admin-nav--visited {
    background-color: var(--color-main-light, #ecfdf5) !important;
    color: var(--color-main, #035122) !important;
    font-weight: 500 !important;
    box-shadow: inset 3px 0 0 var(--color-main, #035122);
}

.vt-admin #admin-mobile-menu a[data-admin-nav-id].admin-nav--current {
    background-color: #ffde59 !important;
    color: #111827 !important;
    font-weight: 500 !important;
    box-shadow: inset 3px 0 0 var(--color-main, #035122);
}

/* ------------------------------------------------------------------ module header bar (green rail) */
.vt-admin .admin-module-header,
.vt-admin .admin-module-header h1 {
    font-size: var(--admin-font-size-section);
    font-weight: 600;
    line-height: var(--admin-lh-snug);
}

/* ------------------------------------------------------------------ hub tab bar (.tab-btn — Data Room, ValuTrek Pro) */
.vt-admin .tab-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--admin-space-1);
    padding: 8px 12px;
    font-family: var(--admin-font);
    font-size: 13px;
    font-weight: 500;
    line-height: var(--admin-lh-snug);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.vt-admin .tab-btn:hover {
    color: var(--color-main);
}

.vt-admin .tab-btn.active,
.vt-admin .tab-btn.border-\[var\(--color-main\)\] {
    color: var(--color-main);
    border-bottom-color: var(--color-main);
    font-weight: 500;
}

/* ------------------------------------------------------------------ action-center / workspace tabs */
.vt-admin .mpsp-action-tab {
    font-family: var(--admin-font);
    font-size: 13px;
    font-weight: 500;
    line-height: var(--admin-lh-snug);
    padding: 6px 12px;
    border-radius: var(--admin-radius-md);
}

/* ------------------------------------------------------------------ dashboard hub cards */
.vt-admin .admin-hub-card {
    padding: var(--admin-space-4);
    border-radius: var(--admin-radius-lg);
    height: 240px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.vt-admin .admin-hub-card h2 {
    font-size: 14px;
    font-weight: 500;
}

.vt-admin .admin-hub-card p {
    font-size: var(--admin-text-meta);
    line-height: var(--admin-lh-snug);
}

.vt-admin .admin-hub-card .admin-hub-card-btn {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--admin-radius-md);
}

/* ------------------------------------------------------------------ forms */
.vt-admin label {
    font-size: var(--admin-text-label);
    font-weight: 500;
    line-height: var(--admin-lh-snug);
}

.vt-admin input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]),
.vt-admin select,
.vt-admin textarea {
    font-family: var(--admin-font);
    font-size: var(--admin-text-body);
    font-weight: 400;
    line-height: var(--admin-lh-snug);
    border-radius: var(--admin-radius-md);
}

.vt-admin input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.vt-admin select {
    /* min-height: var(--admin-input-h); */
    padding: 4px 8px;
}

.vt-admin textarea {
    padding: 4px 8px;
}

/* Admin dashboard — red checkbox accent (checked state visible even when disabled) */
.vt-admin input[type="checkbox"],
#crm-hub-root input[type="checkbox"] {
    accent-color: var(--admin-checkbox-accent, #dc2626);
}

.vt-admin input[type="checkbox"]:disabled,
#crm-hub-root input[type="checkbox"]:disabled,
.vt-admin input[type="checkbox"]:disabled:checked,
#crm-hub-root input[type="checkbox"]:disabled:checked {
    opacity: 1;
    cursor: default;
    accent-color: var(--admin-checkbox-accent, #dc2626);
}

.vt-admin label:has(input[type="checkbox"]:disabled) {
    cursor: default;
}

.vt-admin .admin-field-error,
.vt-admin .text-red-600.text-xs,
.vt-admin .text-red-500.text-xs {
    font-size: var(--admin-text-meta);
}

/* ------------------------------------------------------------------ buttons (utility classes; existing Tailwind btn classes still work) */
.vt-admin .admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--admin-space-1);
    font-family: var(--admin-font);
    font-size: 13px;
    font-weight: 500;
    line-height: var(--admin-lh-snug);
    padding: var(--admin-btn-py) var(--admin-btn-px);
    border-radius: var(--admin-radius-md);
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.vt-admin .admin-btn-primary {
    background-color: var(--color-main);
    color: #fff;
    border: 1px solid transparent;
}

.vt-admin .admin-btn-primary:hover {
    opacity: 0.92;
}

.vt-admin .admin-btn-secondary {
    background-color: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.vt-admin .admin-btn-secondary:hover {
    background-color: #f9fafb;
}

.vt-admin .admin-btn-danger {
    background-color: var(--color-pop);
    color: #fff;
    border: 1px solid transparent;
}

.vt-admin .admin-btn-danger:hover {
    opacity: 0.92;
}

.vt-admin .admin-btn-ghost {
    background: transparent;
    color: #374151;
    border: 1px solid transparent;
}

.vt-admin .admin-btn-ghost:hover {
    background-color: #f3f4f6;
}

/* Normalize inline primary buttons that use legacy 12px Tailwind */
.vt-admin button.rounded.bg-\[var\(--color-main\)\],
.vt-admin a.rounded.bg-\[var\(--color-main\)\],
.vt-admin button.rounded.bg-\[var\(--color-main-soft\)\],
.vt-admin button.rounded.bg-\[var\(--color-main-blue\)\],
.vt-admin button.rounded.bg-\[var\(--color-pop\)\],
.vt-admin button.rounded.border.border-gray-300,
.vt-admin a.rounded.border.border-gray-300 {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--admin-radius-md);
}

/* ------------------------------------------------------------------ tables (native HTML tables in admin) */
.vt-admin table {
    font-size: var(--admin-text-body);
    border-collapse: collapse;
}

.vt-admin table thead th {
    font-size: var(--admin-text-label);
    font-weight: 500;
    padding: var(--admin-table-cell-py) var(--admin-table-cell-px);
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    color: #374151;
}

.vt-admin table tbody td {
    font-size: var(--admin-text-body);
    padding: var(--admin-table-cell-py) var(--admin-table-cell-px);
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.vt-admin table tbody tr:hover td {
    background-color: #f9fafb;
}

.vt-admin table .admin-table-meta {
    font-size: var(--admin-text-meta);
    color: #6b7280;
}

/* ------------------------------------------------------------------ AG Grid (admin default; CRM overrides in theme.css) */
.vt-admin .ag-theme-alpine {
    --ag-font-family: var(--admin-font);
    --ag-font-size: 13px;
    --ag-header-font-size: 12px;
    --ag-header-font-weight: 500;
    --ag-checkbox-checked-color: var(--admin-checkbox-accent, #dc2626);
}

.vt-admin .ag-theme-alpine .ag-checkbox-input-wrapper .ag-checkbox-input,
.vt-admin .ag-theme-alpine .ag-cell input[type="checkbox"] {
    accent-color: var(--admin-checkbox-accent, #dc2626) !important;
}

#crm-hub-root .ag-theme-alpine {
    --ag-checkbox-checked-color: var(--admin-checkbox-accent, #dc2626);
}

#crm-hub-root .ag-theme-alpine .ag-checkbox-input-wrapper .ag-checkbox-input,
#crm-hub-root .ag-theme-alpine .ag-cell input[type="checkbox"] {
    accent-color: var(--admin-checkbox-accent, #dc2626) !important;
}

.vt-admin .ag-theme-alpine .ag-header-cell-text {
    font-weight: 500;
}

/* ------------------------------------------------------------------ badges / status chips */
.vt-admin .admin-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    padding: 2px 8px;
    border-radius: var(--admin-radius-sm);
    white-space: nowrap;
}

/* ------------------------------------------------------------------ cards / panels */
.vt-admin .admin-panel,
.vt-admin .admin-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-card-pad);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vt-admin .admin-panel-title {
    font-size: var(--admin-font-size-label);
    font-weight: 500;
    line-height: var(--admin-lh-snug);
    color: #111827;
    margin: 0 0 var(--admin-space-2);
}

.vt-admin .admin-panel-subtitle {
    font-size: var(--admin-text-meta);
    color: #6b7280;
    line-height: var(--admin-lh-snug);
}

/* ------------------------------------------------------------------ modals (shared patterns; CRM .crm-sd-modal-* in theme.css) */
.vt-admin .admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--admin-space-3);
    background: rgba(0, 0, 0, 0.45);
}

.vt-admin .admin-modal-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--admin-radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
    width: 100%;
    max-width: 28rem;
    max-height: min(90vh, 520px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vt-admin .admin-modal-head {
    padding: 12px 16px 8px;
    border-bottom: 1px solid #f3f4f6;
}

.vt-admin .admin-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: var(--admin-lh-snug);
}

.vt-admin .admin-modal-body {
    padding: var(--admin-modal-pad);
    flex: 1;
    min-height: 0;
    overflow: auto;
    font-size: var(--admin-text-body);
}

.vt-admin .admin-modal-footer {
    padding: 10px 16px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: var(--admin-space-2);
    background: #f9fafb;
}

/* ------------------------------------------------------------------ MPSP sidebar (shared with Data Room hubs) */
.vt-admin .mpsp-sidebar-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.vt-admin .mpsp-sidebar-section-heading {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.vt-admin .mpsp-sidebar nav,
.vt-admin .mpsp-sidebar .mpsp-nav-item-label {
    font-size: 13px;
    font-weight: 400;
}

/* Data Room / MPSP hub — action center: fixed card height, body scrolls inside */
.vt-admin .dr-hub-ac-aside {
    height: 100%;
    min-height: 0;
    align-self: stretch;
}

.vt-admin .dr-hub-ac-card {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vt-admin .dr-ac-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------------ typography utilities (usable outside CRM) */
.vt-admin .admin-type-page-title {
    font-size: var(--admin-font-size-page-title);
    font-weight: 600;
    line-height: var(--admin-lh-tight);
}

.vt-admin .admin-type-section {
    font-size: var(--admin-font-size-section);
    font-weight: 600;
    line-height: 1.3;
}

.vt-admin .admin-type-body {
    font-size: var(--admin-text-body);
    font-weight: 400;
    line-height: var(--admin-lh-body);
}

.vt-admin .admin-type-meta {
    font-size: var(--admin-text-meta);
    font-weight: 400;
    line-height: var(--admin-lh-snug);
    color: #6b7280;
}

.vt-admin .admin-type-label {
    font-size: var(--admin-text-label);
    font-weight: 500;
    line-height: var(--admin-lh-snug);
}

/* Pro / hub module headers on green title bar */
.vt-admin h1.text-lg.font-semibold.text-white,
.vt-admin .admin-module-header h1 {
    font-size: var(--admin-font-size-section);
    font-weight: 600;
}

/* Legacy shadow cards — normalize border/shadow when not using .admin-hub-card */
.vt-admin .rounded-xl.shadow-md {
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* CRM dashboard stat cards — align with admin meta/body scale */
#crm-hub-root .crm-hub-stat-label {
    font-size: var(--admin-font-size-meta);
    font-weight: 500;
    line-height: 1.35;
    color: #4b5563;
}

#crm-hub-root .crm-hub-stat-value {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
}

/* Buyer email template tab name (replaces browser prompt) */
.dr-buyer-et-tab-modal {
    z-index: 100055;
    padding: 2.5vh 2.5vw;
}

.dr-buyer-et-tab-modal-panel {
    width: min(420px, 100%);
    max-width: none;
}

/* Email template editor (Send Email → New Template nested modal) */
.email-template-editor-modal {
    padding: 2.5vh 2.5vw;
}

.email-template-editor-panel {
    display: flex;
    flex-direction: column;
    height: 95%;
    width: 70%;
    max-width: none;
    overflow: hidden;
}

.email-template-editor-name-subject-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 639px) {
    .email-template-editor-name-subject-row {
        grid-template-columns: 1fr;
    }
}

/* Email template editor — compact placeholder tag buttons */
.dr-email-ph-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 9px;
    line-height: 1.2;
    padding: 0 4px;
}

/* ── Email Templates sidebar (tabs → cards) ─────────────────────────────── */
.dr-et-templates-ui {
    --dr-et-green: var(--color-main, #035122);
    --dr-et-border: #e5e7eb;
    --dr-et-muted: #6b7280;
    --dr-et-surface: #ffffff;
    background: var(--dr-et-surface);
}

aside:has(> .dr-et-templates-ui),
aside:has(.dr-et-templates-ui) {
    background: #f9fafb !important;
}

.dr-et-templates-ui [data-dr-buyer-et-tab-header] {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 0 1rem;
    border-bottom: 1px solid var(--dr-et-border);
    background: var(--dr-et-surface);
}

.dr-et-templates-ui [data-dr-buyer-et-tabs-bar] {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
    min-width: 0;
}

.dr-et-templates-ui [data-dr-buyer-et-tabs-bar] > .group {
    display: flex;
    align-items: flex-end;
}

.dr-et-templates-ui .dr-et-tab {
    position: relative;
    margin: 0;
    padding: 0.875rem 1rem 0.75rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--dr-et-muted);
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.dr-et-templates-ui .dr-et-tab:hover {
    color: #374151;
}

.dr-et-templates-ui .dr-et-tab.dr-et-tab--active {
    border-bottom-color: var(--dr-et-green);
    color: var(--dr-et-green);
    font-weight: 600;
}

.dr-et-templates-ui [data-dr-buyer-et-tab-add] {
    flex-shrink: 0;
    margin: 0.5rem 0 0.625rem 0.5rem;
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--dr-et-border);
    border-radius: 0.375rem;
    background: var(--dr-et-surface);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    color: #374151;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dr-et-templates-ui [data-dr-buyer-et-tab-add]:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.dr-et-templates-ui .dr-et-panel-toolbar {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    background: var(--dr-et-surface);
}

.dr-et-templates-ui .dr-et-panel-toolbar .dr-et-new-tpl-btn {
    align-self: flex-end;
}

.dr-et-templates-ui .dr-et-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    width: 100%;
}

.dr-et-templates-ui .dr-et-quick-tags[hidden] {
    display: none !important;
}

.dr-et-templates-ui .dr-et-quick-tag {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.dr-et-templates-ui .dr-et-quick-tag:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #111827;
}

.dr-et-templates-ui .dr-et-quick-tag--active {
    border-color: var(--dr-et-green, #035122);
    background: rgba(3, 81, 34, 0.08);
    color: var(--dr-et-green, #035122);
}

.dr-et-templates-ui .dr-et-tpl-pagination {
    flex-shrink: 0;
    padding: 0.5rem 1rem 0.75rem;
    border-top: 1px solid #f3f4f6;
    background: var(--dr-et-surface);
}

.dr-et-templates-ui .dr-et-tpl-pagination[hidden] {
    display: none !important;
}

.dr-et-templates-ui .dr-et-tpl-pagination__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.dr-et-templates-ui .dr-et-tpl-pagination__label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.dr-et-templates-ui .dr-et-tpl-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    line-height: 1;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.dr-et-templates-ui .dr-et-tpl-pagination__btn:hover:not(:disabled) {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #374151;
}

.dr-et-templates-ui .dr-et-tpl-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dr-et-templates-ui .dr-et-new-tpl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--dr-et-green);
    border-radius: 0.375rem;
    background: var(--dr-et-surface);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--dr-et-green);
    transition: background-color 0.15s ease;
}

.dr-et-templates-ui .dr-et-new-tpl-btn:hover {
    background: rgba(3, 81, 34, 0.06);
}

.dr-et-templates-ui [data-dr-buyer-et-cards],
.dr-et-templates-ui [data-dr-et-cards] {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
}

.dr-et-templates-ui .dr-et-tpl-empty {
    padding: 0.5rem 0.25rem;
    font-size: 12px;
    line-height: 1.45;
    color: var(--dr-et-muted);
}

.dr-et-templates-ui .dr-et-tpl-card-outer {
    position: relative;
}

.dr-et-templates-ui .dr-et-tpl-card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0.875rem 0.875rem 0.875rem 2.25rem;
    cursor: pointer;
    border: 1px solid var(--dr-et-border);
    border-radius: 0.5rem;
    background: var(--dr-et-surface);
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.dr-et-templates-ui button.dr-et-tpl-card {
    cursor: pointer;
}

.dr-et-templates-ui .dr-et-tpl-card:hover {
    border-color: #d1d5db;
    background: #fafafa;
}

.dr-et-templates-ui .dr-et-tpl-card::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 9999px;
    background: var(--dr-et-surface);
    transform: translateY(-50%);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dr-et-templates-ui .dr-et-tpl-card--selected {
    border-color: var(--dr-et-green);
    background: rgba(3, 81, 34, 0.03);
    box-shadow: 0 0 0 1px var(--dr-et-green);
}

.dr-et-templates-ui .dr-et-tpl-card--selected::before {
    border-color: var(--dr-et-green);
    background: var(--dr-et-green);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.625rem;
}

.dr-et-templates-ui .dr-et-tpl-card-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.dr-et-templates-ui .dr-et-tpl-card-badge--system {
    background: #dbeafe;
    color: #1e40af;
}

.dr-et-templates-ui .dr-et-tpl-card-badge--office {
    background: #ffedd5;
    color: #9a3412;
}

.dr-et-templates-ui .dr-et-tpl-card-badge--broker {
    background: #ede9fe;
    color: #5b21b6;
}

.dr-et-templates-ui .dr-et-tpl-card-title {
    margin-bottom: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 4.5rem;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}

.dr-et-templates-ui .dr-et-tpl-card-subject {
    margin-bottom: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.4;
    color: #374151;
}

.dr-et-templates-ui .dr-et-tpl-card-subject-label {
    font-weight: 600;
    color: #111827;
}

.dr-et-templates-ui .dr-et-tpl-card-snippet {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.45;
    color: var(--dr-et-muted);
    word-break: break-word;
}

.dr-et-templates-ui .dr-et-tpl-card-actions {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    z-index: 10;
    display: flex;
    gap: 0.25rem;
}

.dr-et-templates-ui .dr-et-tpl-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    font-size: 13px;
    line-height: 1;
    color: #9ca3af;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.dr-et-templates-ui .dr-et-tpl-card-action:hover {
    background: #f3f4f6;
    color: #374151;
}

.dr-et-templates-ui .dr-et-tpl-card-action--delete:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.dr-invite-compose-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    flex-shrink: 0;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid #f3f4f6;
    background: rgba(249, 250, 251, 0.6);
    padding: 0.75rem 1rem;
}

.dr-invite-compose-footer__send {
    justify-self: center;
}

.dr-invite-compose-footer__outlook {
    justify-self: end;
}

.dr-invite-compose-footer__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-left: auto;
}
.dr-invite-to-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.dr-invite-to-label {
    font-size: 11px;
    font-weight: 500;
    color: #4b5563;
}

.dr-invite-req {
    color: #dc2626;
}

.dr-invite-to-links {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dr-invite-to-link {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: #2563eb;
    cursor: pointer;
}

.dr-invite-to-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.dr-invite-to-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
}

.dr-invite-to-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
}

.dr-invite-to-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.15rem 0.35rem 0.15rem 0.5rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    line-height: 1.3;
}

.dr-invite-to-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dr-invite-to-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.dr-invite-to-pill-remove:hover {
    color: #4b5563;
    background: #e5e7eb;
}

/* Invite compose — To pills, footer buttons */
.dr-invite-compose-footer .dr-invite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.dr-invite-compose-footer .dr-invite-btn--ghost {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
}

.dr-invite-compose-footer .dr-invite-btn--ghost:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.dr-invite-compose-footer .dr-invite-btn--primary {
    border: 1px solid var(--dr-et-green, #035122);
    background: var(--dr-et-green, #035122);
    color: #fff;
}

.dr-invite-compose-footer .dr-invite-btn--primary:hover {
    opacity: 0.92;
}

.dr-invite-preview-backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.dr-invite-preview-body {
    font-size: 12px;
    line-height: 1.5;
}

.dr-invite-preview-body.mce-content-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.dr-invite-preview-body.mce-content-body p {
    margin: 0 0 0.75em;
}

.dr-invite-preview-body.mce-content-body p:last-child {
    margin-bottom: 0;
}

.dr-invite-preview-body.mce-content-body ul,
.dr-invite-preview-body.mce-content-body ol {
    margin: 0 0 0.75em 1.25em;
    padding: 0;
}

.dr-invite-preview-body.mce-content-body a {
    color: #2563eb;
    text-decoration: underline;
}

.dr-invite-compose-split {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: row;
}

.dr-invite-compose-split__templates,
.dr-invite-compose-split__editor {
    display: flex;
    min-height: 0;
    min-width: 0;
    flex: 1 1 50%;
    max-width: 50%;
    flex-direction: column;
}

.dr-invite-compose-split__editor {
    border-right: 1px solid #f3f4f6;
}

@media (max-width: 767px) {
    .dr-invite-compose-split {
        flex-direction: column;
    }

    .dr-invite-compose-split__templates,
    .dr-invite-compose-split__editor {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .dr-invite-compose-split__editor {
        border-right: 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .dr-invite-compose-split__templates {
        max-height: 42vh;
    }
}

/* TinyMCE email editors — soft gray toolbar (data-rich-email) */
[data-rich-fill="1"] .tox:not(.tox-tinymce-inline) .tox-editor-header,
[data-rich-body-block="1"] .tox:not(.tox-tinymce-inline) .tox-editor-header {
    background-color: #f3f4f6 !important;
    border-bottom: 1px solid #e5e7eb;
}

[data-rich-fill="1"] .tox .tox-toolbar-overlord,
[data-rich-fill="1"] .tox .tox-toolbar__primary,
[data-rich-fill="1"] .tox .tox-toolbar,
[data-rich-body-block="1"] .tox .tox-toolbar-overlord,
[data-rich-body-block="1"] .tox .tox-toolbar__primary,
[data-rich-body-block="1"] .tox .tox-toolbar {
    background-color: #f3f4f6 !important;
}

[data-rich-fill="1"] .tox .tox-toolbar__group,
[data-rich-body-block="1"] .tox .tox-toolbar__group {
    /* border-color: #e5e7eb; */
}

/* TinyMCE — wrap toolbars (no horizontal scroll clipping dropdown menus) */
.tox:not(.tox-tinymce-inline) .tox-editor-header {
    overflow: visible !important;
}

.tox .tox-toolbar-overlord {
    overflow: visible !important;
}

.tox .tox-toolbar__primary,
.tox .tox-toolbar {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    height: auto !important;
    row-gap: 1px;
}

[data-rich-fill="1"] .tox .tox-tbtn,
[data-rich-body-block="1"] .tox .tox-tbtn {
    height: 26px;
    margin-block: 1px;
}

[data-rich-fill="1"] .tox .tox-tbtn--select .tox-tbtn__select-label,
[data-rich-body-block="1"] .tox .tox-tbtn--select .tox-tbtn__select-label {
    font-size: 11px;
    max-width: 4.5rem;
}

/* TinyMCE popups/dialogs above CRM modals (stack up to z-index ~100050) */
.tox.tox-tinymce-aux {
    z-index: 101000 !important;
}

.tox .tox-dialog-wrap,
.tox .tox-dialog-wrap__backdrop {
    z-index: 101000 !important;
}

.tox .tox-dialog {
    z-index: 101001 !important;
}

.tox .tox-menu,
.tox .tox-collection--list {
    z-index: 101002 !important;
}

/* ------------------------------------------------------------------ TinyMCE email body (fill remaining flex height) */
[data-rich-body-block="1"] {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

[data-rich-fill="1"] {
    flex: 1 1 0%;
    min-height: 10rem;
    display: flex;
    flex-direction: column;
    width: 100%;
}

[data-rich-fill="1"] > textarea[data-rich-email] {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

[data-rich-fill="1"][data-rich-pending="1"] {
    opacity: 0.65;
    pointer-events: none;
}

[data-rich-fill="1"] .tox.tox-tinymce {
    flex: 1 1 auto !important;
    min-height: 10rem !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

[data-rich-fill="1"] .tox .tox-editor-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

[data-rich-fill="1"] .tox .tox-edit-area {
    flex: 1 1 auto !important;
}

[data-rich-fill="1"] .tox .tox-edit-area__iframe {
    flex: 1 1 auto !important;
}

/* ------------------------------------------------------------------ Top navigation v2 (icon nav, split brand) */
.vt-admin .admin-top-nav--v2 {
    flex-shrink: 0;
    position: relative;
    z-index: 60;
    min-height: 52px;
}

.vt-admin .admin-top-nav__inner {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 52px;
    padding: 0 1rem;
    overflow: visible;
}

@media (min-width: 768px) {
    .vt-admin .admin-top-nav--v2 .admin-top-nav__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 0.75rem;
    }

    .vt-admin .admin-top-nav--v2 .admin-top-nav__brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .vt-admin .admin-top-nav--v2 .admin-top-nav__divider {
        display: none;
    }

    .vt-admin .admin-top-nav--v2 .admin-top-nav__desktop {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        margin-left: 0;
        flex: unset;
        max-width: 100%;
    }

    .vt-admin .admin-top-nav--v2 .admin-top-nav__actions {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        margin-left: 0;
    }
}

/* Brand */
.vt-admin .admin-top-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-right: 1.25rem;
}

.vt-admin .admin-top-nav__brand-image {
    display: block;
    width: 12rem;
    height: 2rem;
    /* max-width: 7rem; */
    box-sizing: content-box;
    padding: 1rem 0.375rem;
    border-radius: 0.375rem;
    object-fit: contain;
}

.vt-admin .admin-top-nav--v2 .admin-top-nav__logo {
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 0.375rem;
    background: rgb(255 255 255 / 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.vt-admin .admin-top-nav__brand-text {
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.vt-admin .admin-top-nav__brand-primary {
    font-weight: 700;
    color: #fff;
}

.vt-admin .admin-top-nav__brand-secondary {
    font-weight: 700;
    color: var(--color-secondary, #b08d3e);
}

/* Section dividers */
.vt-admin .admin-top-nav__divider {
    width: 1px;
    height: 1.5rem;
    background: rgb(255 255 255 / 0.18);
    flex-shrink: 0;
    margin-right: 1rem;
}

.vt-admin .admin-top-nav__divider--actions {
    margin-left: 0.25rem;
    margin-right: 0.75rem;
}

/* Desktop nav */
.vt-admin .admin-top-nav__desktop {
    display: none;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
    overflow: visible;
    margin-left: 1.125rem;
}

@media (min-width: 768px) {
    .vt-admin .admin-top-nav__desktop {
        display: flex;
    }
}

.vt-admin .admin-top-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.9375rem 1rem;
    border-radius: 6px;
    border: none;
    color: rgb(255 255 255 / 0.92);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
    line-height: 1.25;
}

.vt-admin .admin-top-nav__link-icon {
    font-size: 0.9375rem;
    opacity: 0.92;
    flex-shrink: 0;
}

.vt-admin .admin-top-nav__link-label {
    flex-shrink: 0;
}

.vt-admin .admin-top-nav__chevron {
    font-size: 0.625rem;
    opacity: 0.65;
    margin-left: 0.125rem;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.vt-admin .admin-top-nav__link:hover {
    background: rgb(0 0 0 / 0.12);
    color: #fff;
}

.vt-admin .admin-top-nav__link--active {
    background: rgb(0 0 0 / 0.22);
    color: #fff;
    font-weight: 600;
}

/* Flyout dropdowns */
.vt-admin .admin-top-nav__flyout {
    position: relative;
    display: inline-flex;
}

.vt-admin .admin-top-nav__flyout:hover .admin-top-nav__chevron,
.vt-admin .admin-top-nav__flyout:focus-within .admin-top-nav__chevron {
    transform: rotate(180deg);
}

.vt-admin .admin-top-nav__menu {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;
    min-width: 200px;
    padding-top: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(2px);
    transition: opacity 0.12s, visibility 0.12s, transform 0.12s;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
    padding-bottom: 0.25rem;
}

.vt-admin .admin-top-nav__flyout:hover .admin-top-nav__menu,
.vt-admin .admin-top-nav__flyout:focus-within .admin-top-nav__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.vt-admin .admin-top-nav__menu-item {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.12s;
}

.vt-admin .admin-top-nav__menu-item:hover {
    background: #f9fafb;
}

.vt-admin .admin-top-nav__menu-item--active {
    background: var(--color-main-light, #ecfdf5);
    color: var(--color-main, #035122);
    font-weight: 600;
}

/* ValuTrek Pro workspace menu — icon-led launcher used by desktop and mobile nav. */
.vt-admin .admin-top-nav__menu--pro {
    min-width: 264px;
    padding: 10px;
}

.vt-admin .admin-top-nav__menu--pro::before {
    position: absolute;
    top: -7px;
    left: 88px;
    width: 14px;
    height: 14px;
    content: "";
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    transform: rotate(45deg);
}

.vt-admin .admin-top-nav__menu-item--icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 6px;
}

.vt-admin .admin-top-nav__menu-icon {
    width: 20px;
    flex: 0 0 20px;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.vt-admin .admin-top-nav__menu-icon--home,
.vt-admin .admin-top-nav__menu-icon--mpsp {
    color: #16814a;
}

.vt-admin .admin-top-nav__menu-icon--opinion {
    color: #e58a16;
}

.vt-admin .admin-top-nav__menu-icon--cim {
    color: #168df0;
}

.vt-admin .admin-top-nav__menu-icon--bli {
    color: #8464dc;
}

.vt-admin .admin-top-nav__menu-icon--seller-hub {
    color: #16814a;
}

.vt-admin .admin-top-nav__menu-icon--buyer-hub {
    color: #168df0;
}

.vt-admin .admin-top-nav__menu-icon--broker-hub {
    color: #8464dc;
}

.vt-admin .admin-top-nav__menu-icon--telemarketing {
    color: #e5455a;
}

.vt-admin .admin-top-nav__menu--pro .admin-top-nav__menu-item--active,
.vt-admin .admin-top-nav__menu--pro .admin-top-nav__menu-item.admin-nav--current {
    color: var(--color-main, #035122) !important;
    background: var(--color-main-light, #ecfdf5) !important;
    box-shadow: none !important;
}

@media (max-width: 767px) {
    .vt-admin .admin-top-nav__divider {
        display: none;
    }

    .vt-admin .admin-top-nav__brand {
        padding-right: 0;
    }
}

/* Right actions */
.vt-admin .admin-top-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.vt-admin .admin-top-nav__utility {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: rgb(255 255 255 / 0.92);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.vt-admin .admin-top-nav__utility--settings {
    display: none;
}

@media (min-width: 640px) {
    .vt-admin .admin-top-nav__utility--settings {
        display: inline-flex;
    }
}

.vt-admin .admin-top-nav__utility--logout {
    font-weight: 600;
}

.vt-admin .admin-top-nav__utility:hover {
    background: rgb(0 0 0 / 0.12);
    color: #fff;
}

.vt-admin .admin-top-nav__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgb(255 255 255 / 0.1);
    border: 1px solid rgb(255 255 255 / 0.2);
    border-radius: 0.375rem;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .vt-admin .admin-top-nav__menu-toggle {
        display: none !important;
    }

    .vt-admin .admin-top-nav__mobile-panel {
        display: none !important;
    }
}

/* Mobile panel */
.vt-admin .admin-top-nav__mobile-panel {
    border-top: 1px solid rgb(255 255 255 / 0.12);
    background: var(--color-main, #035122);
}

.vt-admin .admin-top-nav__mobile-inner {
    padding: 0.5rem 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.vt-admin .admin-top-nav__mobile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 6px;
    color: rgb(255 255 255 / 0.88);
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.12s;
}

.vt-admin .admin-top-nav__mobile-link:hover {
    background: rgb(0 0 0 / 0.15);
    color: #fff;
}

.vt-admin .admin-top-nav__mobile-link--active {
    background: rgb(0 0 0 / 0.22);
    color: #fff;
    font-weight: 600;
}

.vt-admin .admin-top-nav__mobile-link--nested {
    padding-left: 1.75rem;
    font-size: 13px;
}

.vt-admin .admin-top-nav__mobile-link--logout {
    margin-top: 0.375rem;
    font-weight: 600;
}

.vt-admin .admin-top-nav__mobile-section {
    padding: 0.375rem 0.625rem 0.125rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(255 255 255 / 0.5);
}

/* Visit-history highlights on dark v2 bar */
.vt-admin .admin-top-nav--v2 a[data-admin-nav-id].admin-nav--visited:not([role="menuitem"]) {
    border-bottom: none !important;
    color: rgb(255 255 255 / 0.95) !important;
    font-weight: 500 !important;
    background-color: rgb(0 0 0 / 0.1) !important;
}

.vt-admin .admin-top-nav--v2 a[data-admin-nav-id].admin-nav--current:not([role="menuitem"]),
.vt-admin .admin-top-nav--v2 a[data-admin-nav-id].admin-nav--parent-active:not([role="menuitem"]) {
    background-color: rgb(0 0 0 / 0.28) !important;
    color: #fff !important;
    font-weight: 600 !important;
    border: none !important;
}

.vt-admin .admin-top-nav--v2 .admin-top-nav__link .bi {
    color: inherit;
}

.vt-admin #admin-mobile-menu a[data-admin-nav-id].admin-nav--visited {
    background-color: rgb(0 0 0 / 0.12) !important;
    color: #fff !important;
    font-weight: 500 !important;
    box-shadow: none;
}

.vt-admin #admin-mobile-menu a[data-admin-nav-id].admin-nav--current {
    background-color: rgb(0 0 0 / 0.28) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: none;
}

#crm-hub-root .crm-dashboard-header__refresh--spin i {
    animation: crm-dashboard-spin 0.6s linear;
}

@keyframes crm-dashboard-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Global Account Settings host overlay (must live here — many pages override head_extra) */
.vt-account-settings-host {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 24, 39, 0.45);
}

.vt-account-settings-host[hidden] {
    display: none !important;
}

.vt-account-settings-host__panel {
    width: min(1600px, 90vw);
    height: min(900px, 92vh);
    max-height: 92vh;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 48px rgba(16, 24, 40, 0.22);
}

.vt-account-settings-host__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #f3f4f6;
}

html.vt-account-host-open,
html.vt-account-host-open body {
    overflow: hidden;
}

@media (max-width: 900px) {
    .vt-account-settings-host {
        padding: 0;
    }

    .vt-account-settings-host__panel {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
