/* Sneat theme bridge for the existing CodeIgniter/PHP views.
   Loaded after app CSS so backend-facing class names and JS hooks stay intact. */

:root {
    --color-primary: #3ABEB6;
    --color-primary-hover: #2FA69E;
    --color-primary-active: #278F88;
    --color-primary-light: #E4F7F6;
    --color-bg: #f5f5f9;
    --color-surface: #f5f5f9;
    --color-card: #ffffff;
    --color-border: #e6e6f0;
    --color-border-strong: #d9dee8;
    --color-text: #566a7f;
    --color-text-secondary: #697a8d;
    --color-text-muted: #a1acb8;
    --navy-950: #2b2c40;
    --navy-900: #2b2c40;
    --navy-800: #3b4056;
    --navy-700: #566a7f;
    --blue-600: var(--color-primary);
    --blue-700: var(--color-primary-hover);
    --blue-100: var(--color-primary-light);
    --gray-900: #566a7f;
    --gray-700: #697a8d;
    --gray-600: #8592a3;
    --gray-400: #a1acb8;
    --gray-200: #e6e6f0;
    --gray-100: #f5f5f9;
    --gray-50: #fafafb;
    --admin-bg: var(--color-bg);
    --admin-card-bg: var(--color-card);
    --admin-card-border: var(--color-border);
    --admin-border: var(--color-border);
    --admin-text: #566a7f;
    --admin-text-muted: #8592a3;
    --admin-input-bg: #ffffff;
    --admin-hover-bg: #f6f7fb;
    --admin-shadow-sm: 0 0.125rem 0.375rem 0 rgba(67, 89, 113, 0.12);
    --admin-shadow-md: 0 0.25rem 1rem 0 rgba(67, 89, 113, 0.12);
    --admin-shadow-lg: 0 0.625rem 1.25rem rgba(67, 89, 113, 0.18);
    --radius-lg: 0.75rem;
    --radius-md: 0.625rem;
    --radius-sm: 0.375rem;
    --sidebar-width: 16.25rem;
    --sidebar-width-collapsed: 5.25rem;
    --header-height: 4rem;
}

html,
body.admin-body,
body.auth-body {
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-body {
    background: var(--admin-bg);
    color: var(--admin-text);
}

.admin-shell {
    min-height: 100vh;
    background: var(--admin-bg);
}

.admin-sidebar {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #566a7f;
    box-shadow: 0 0.125rem 0.375rem 0 rgba(67, 89, 113, 0.12);
}

.sidebar-brand {
    min-height: 4rem;
    padding: 1.25rem 1rem 1.25rem 1.25rem;
    border-bottom: 0;
    gap: 0.75rem;
    min-width: 0;
}

.sidebar-brand-toggle {
    margin-left: auto;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.sidebar-brand-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-brand-logo img {
    display: block;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.sidebar-brand-logo-full {
    height: 2rem;
    max-width: 9.75rem;
}

.sidebar-brand-logo-icon {
    display: none !important;
    height: 2rem;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    padding: 0.5rem 0.875rem 1rem;
    overflow-y: auto;
}

.sidebar-tools {
    flex: 0 0 auto;
    padding: 0 0.875rem 0.5rem;
}

.sidebar-tools-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    list-style: none;
}

.sidebar-tools-summary::-webkit-details-marker {
    display: none;
}

.sidebar-tools-summary .sidebar-section-label {
    flex: 1;
}

.sidebar-tools-chevron {
    width: 0.875rem;
    height: 0.875rem;
    color: #a1acb8;
    transition: transform 0.15s ease;
}

.sidebar-tools:not([open]) .sidebar-tools-chevron {
    transform: rotate(-90deg);
}

.sidebar-tools-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-tools:not([open]) .sidebar-tools-list {
    display: none;
}

.sidebar-tool-btn {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #697a8d;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 400;
    gap: 0.75rem;
    text-align: left;
    cursor: pointer;
}

.sidebar-tool-btn:hover {
    background: rgba(58, 190, 182, 0.10);
    color: var(--color-primary);
}

.sidebar-tools .nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-tools .nav-icon svg,
.sidebar-user svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.sidebar-tools .nav-label {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-tool-btn .nav-badge-count {
    margin-left: auto;
}

.sidebar-user {
    position: relative;
    flex: 0 0 auto;
    padding: 0.75rem 0.875rem;
    border-top: 1px solid #eceef1;
}

.sidebar-user .profile-trigger {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
}

.sidebar-user .profile-avatar {
    width: 2.25rem;
    height: 2.25rem;
}

.admin-sidebar .header-dropdown {
    position: relative;
}

.admin-sidebar .header-dropdown .dropdown-panel {
    top: 0;
    right: auto;
    left: calc(100% + 0.75rem);
    min-width: 20rem;
    max-width: min(24rem, calc(100vw - var(--sidebar-width) - 2rem));
}

.admin-sidebar .sidebar-user .dropdown-panel {
    top: auto;
    bottom: 0;
}

.admin-sidebar .notif-panel {
    width: min(22.5rem, calc(100vw - var(--sidebar-width) - 2rem));
    max-height: min(27.5rem, calc(100vh - 6rem));
    overflow: hidden;
}

.admin-sidebar #notificationsDropdown .notif-panel {
    position: fixed;
    top: var(--activity-panel-top, 5.5rem);
    right: auto;
    bottom: auto;
    left: var(--activity-panel-left, calc(var(--sidebar-width) + 0.75rem));
    max-height: calc(100vh - 1.5rem);
}

.admin-shell.sidebar-collapsed .sidebar-tools .nav-label,
.admin-shell.sidebar-collapsed .sidebar-user .profile-meta {
    display: none;
}

.admin-shell.sidebar-collapsed .sidebar-tools-summary {
    justify-content: center;
}

.admin-shell.sidebar-collapsed .sidebar-tools-summary .sidebar-section-label,
.admin-shell.sidebar-collapsed .sidebar-tools-chevron {
    display: none;
}

.admin-shell.sidebar-collapsed .sidebar-brand {
    padding-right: 0.875rem;
    padding-left: 0.875rem;
}

.admin-shell.sidebar-collapsed .sidebar-brand-logo {
    justify-content: center;
    flex: 0 0 auto;
}

.admin-shell.sidebar-collapsed .sidebar-brand-logo-full {
    display: none;
}

.admin-shell.sidebar-collapsed .sidebar-brand-logo-icon {
    display: block !important;
}

.admin-shell.sidebar-collapsed .sidebar-brand-toggle {
    margin-left: 0;
}

.sidebar-mobile-trigger {
    position: fixed;
    top: 0.875rem;
    left: 0.875rem;
    z-index: 60;
    box-shadow: var(--admin-shadow-sm);
}

.sidebar-section-label {
    padding: 1rem 0.875rem 0.35rem;
    color: #a1acb8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sidebar-nav .nav-item {
    margin: 0.125rem 0;
}

.sidebar-nav .nav-link {
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.375rem;
    color: #697a8d;
    font-size: 0.9375rem;
    font-weight: 400;
    gap: 0.75rem;
}

.sidebar-nav button.nav-link {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-item.has-submenu.active > .nav-link {
    background: rgba(58, 190, 182, 0.10);
    color: var(--color-primary);
}

.sidebar-nav .nav-item.active > .nav-link,
.sidebar-nav .nav-submenu .nav-item.active > .nav-link {
    background: var(--color-primary-light);
    color: var(--color-primary);
    box-shadow: none;
    font-weight: 600;
}

.side-drawer .drawer-header {
    background: #fff;
    border-bottom: 1px solid #eceef1;
}

.side-drawer .drawer-header h3 {
    color: #566a7f;
}

.side-drawer .drawer-close {
    background: rgba(58, 190, 182, 0.12);
    color: var(--color-primary);
}

.side-drawer .drawer-close:hover {
    background: rgba(58, 190, 182, 0.20);
}

.sidebar-nav .nav-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.nav-submenu {
    margin: 0.25rem 0 0.35rem 1.4rem;
    padding: 0 0 0 0.8rem;
    border-left: 1px solid #eceef1;
}

.nav-submenu .nav-link {
    min-height: 2.25rem;
    padding: 0.5rem 0.75rem;
    color: #697a8d;
    font-size: 0.875rem;
}

.nav-badge,
.nav-badge-count,
.badge-count {
    border-radius: 50rem;
}

.sidebar-footer {
    border-top: 0;
    color: #a1acb8;
}

.admin-main {
    margin-left: var(--sidebar-width);
    padding: 0;
    background: var(--admin-bg);
}

.admin-shell.sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-width-collapsed);
}

.admin-header {
    height: 3.875rem;
    margin: 1rem 1.5rem 0;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--admin-shadow-sm);
    backdrop-filter: saturate(200%) blur(0.375rem);
}

.admin-content {
    padding: 1.5rem;
    width: 100%;
}

.breadcrumb {
    color: #a1acb8;
    font-size: 0.875rem;
}

.breadcrumb .crumb-current,
.page-header h1,
.card-header h3 {
    color: #566a7f;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.page-header p {
    color: #8592a3;
}

.card,
.kpi-card,
.dropdown-panel,
.lead-gear-menu,
.modal-content,
.side-drawer,
.lead-modal {
    border: 0;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: var(--admin-shadow-sm);
}

.card-header {
    border-bottom: 1px solid #eceef1;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.kpi-grid {
    gap: 1.5rem;
}

.kpi-card {
    padding: 1.25rem;
}

.kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--admin-shadow-md);
}

.btn,
.btn-sm,
.btn-auth {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-primary,
.btn-auth {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(58, 190, 182, 0.32);
}

.btn-primary:hover,
.btn-auth:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

.btn-secondary {
    border-color: #8592a3;
    background: #8592a3;
    color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(133, 146, 163, 0.24);
}

.btn-secondary:hover {
    border-color: #788393;
    background: #788393;
    color: #fff;
}

.btn-outline {
    border: 1px solid #d9dee8;
    background: #fff;
    color: #697a8d;
}

.btn-outline:hover {
    background: #f6f7fb;
    border-color: #d9dee8;
    color: #697a8d;
}

.icon-btn,
.sidebar-toggle,
.mobile-menu-toggle,
.profile-trigger {
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #697a8d;
}

.icon-btn:hover,
.sidebar-toggle:hover,
.mobile-menu-toggle:hover,
.profile-trigger:hover {
    background: rgba(67, 89, 113, 0.08);
    color: #566a7f;
}

.profile-avatar {
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.notif-list .lv-avatar {
    border-radius: 0.5rem;
}

.dropdown-panel {
    border: 1px solid rgba(67, 89, 113, 0.08);
}

.dropdown-panel a.dropdown-link,
.lead-gear-item {
    color: #697a8d;
    font-weight: 400;
}

.dropdown-panel a.dropdown-link:hover,
.lead-gear-item:hover {
    background: rgba(58, 190, 182, 0.10);
    color: var(--color-primary);
}

.table-responsive,
.list-view .card,
.og-root {
    border-radius: 0.5rem;
}

table.data-table {
    border-collapse: collapse;
}

table.data-table th,
.og-root .og-native-table thead th {
    background: #fff;
    color: #566a7f;
    border-bottom: 1px solid #eceef1;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

table.data-table td,
.og-root .og-native-table tbody td {
    color: #697a8d;
    border-bottom: 1px solid #eceef1;
}

table.data-table tbody tr:hover,
.og-root .og-native-table tbody tr:hover {
    background: #f8f8fb;
}

.form-control,
.toolbar-filters input,
.toolbar-filters select,
.og-root input,
.og-root select,
.og-select-filter {
    min-height: 2.375rem;
    border: 1px solid #d9dee8;
    border-radius: 0.375rem;
    background: #fff;
    color: #697a8d;
}

.form-control:focus,
.toolbar-filters input:focus,
.toolbar-filters select:focus,
.og-root input:focus,
.og-root select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0.25rem 0.05rem rgba(58, 190, 182, 0.20);
}

.badge,
.status-tab-count,
.og-chip,
.og-page-btn {
    border-radius: 50rem;
}

.badge-new,
.badge-active,
.badge-contacted,
.badge-pending {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-won,
.badge-sent {
    background: #e8fadf;
    color: #71dd37;
}

.badge-lost,
.badge-failed,
.badge-inactive {
    background: #ffe0db;
    color: #ff3e1d;
}

.drawer-overlay,
.sidebar-overlay,
.lead-modal-overlay {
    background: rgba(67, 89, 113, 0.45);
}

.og-root {
    --og-ink: #566a7f;
    --og-muted: #8592a3;
    --og-border: #eceef1;
    --og-accent: var(--color-primary);
    --og-accent-soft: var(--color-primary-light);
    --og-surface: #fff;
    --og-soft-bg: #f8f8fb;
}

.og-toolbar,
.og-root .og-table-wrap,
.og-root .og-native-table,
.og-root .og-pager,
.og-root .og-drawer,
.og-root .og-row-menu,
.og-root .og-columns-panel,
.og-root .og-filter-panel {
    border-color: #eceef1;
    background: #fff;
    box-shadow: var(--admin-shadow-sm);
}

.og-root .og-chip.is-active,
.og-root .og-filter-chip.is-active,
.og-root .og-page-btn.is-active,
.og-root .og-native-table tbody tr.is-selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

body.auth-body {
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: #f5f5f9;
}

.page-shapes {
    display: none;
}

.auth-center-wrapper {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: var(--admin-shadow-sm);
}

.center-logo {
    margin-bottom: 1.5rem;
    text-align: center;
}

.center-logo::before {
    display: none;
}

.center-logo img {
    max-width: 13rem;
    height: auto;
}

.auth-heading h2 {
    margin-bottom: 0.5rem;
    color: #566a7f;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-heading p {
    color: #8592a3;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form label,
.form-group label {
    color: #566a7f;
    font-size: 0.8125rem;
    font-weight: 500;
}

.input-control input,
.auth-form input {
    min-height: 2.625rem;
    border: 1px solid #d9dee8;
    border-radius: 0.375rem;
    color: #697a8d;
}

.input-control input:focus,
.auth-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0.25rem 0.05rem rgba(58, 190, 182, 0.20);
}

.auth-alert.error {
    background: #ffe0db;
    color: #ff3e1d;
}

.auth-alert.success {
    background: #e8fadf;
    color: #71dd37;
}

.auth-link,
a {
    color: var(--color-primary);
}

:root[data-theme="dark"] {
    --admin-bg: #232333;
    --admin-card-bg: #2b2c40;
    --admin-card-border: #444564;
    --admin-border: #444564;
    --admin-text: #d5d5e2;
    --admin-text-muted: #a3a4cc;
    --admin-input-bg: #2b2c40;
    --admin-hover-bg: #34354a;
}

:root[data-theme="dark"] body.admin-body,
:root[data-theme="dark"] .admin-shell,
:root[data-theme="dark"] body.auth-body {
    background: #232333;
    color: #d5d5e2;
}

:root[data-theme="dark"] .admin-sidebar,
:root[data-theme="dark"] .admin-header,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .kpi-card,
:root[data-theme="dark"] .dropdown-panel,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .side-drawer,
:root[data-theme="dark"] .auth-center-wrapper,
:root[data-theme="dark"] .lead-modal,
:root[data-theme="dark"] .og-toolbar,
:root[data-theme="dark"] .og-root .og-table-wrap,
:root[data-theme="dark"] .og-root .og-native-table,
:root[data-theme="dark"] .og-root .og-pager {
    background: #2b2c40;
    color: #d5d5e2;
}

:root[data-theme="dark"] .sidebar-brand-text,
:root[data-theme="dark"] .page-header h1,
:root[data-theme="dark"] .card-header h3,
:root[data-theme="dark"] .breadcrumb .crumb-current,
:root[data-theme="dark"] .auth-heading h2 {
    color: #d5d5e2;
}

:root[data-theme="dark"] .sidebar-nav .nav-link,
:root[data-theme="dark"] .nav-submenu .nav-link,
:root[data-theme="dark"] table.data-table td,
:root[data-theme="dark"] .dropdown-panel a.dropdown-link {
    color: #a3a4cc;
}

:root[data-theme="dark"] table.data-table th,
:root[data-theme="dark"] table.data-table td,
:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .input-control input,
:root[data-theme="dark"] .auth-form input {
    border-color: #444564;
}

:root[data-theme="dark"] table.data-table th,
:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .input-control input,
:root[data-theme="dark"] .auth-form input {
    background: #2b2c40;
    color: #d5d5e2;
}

@media (max-width: 860px) {
    .admin-sidebar {
        top: 0;
        bottom: 0;
        width: var(--sidebar-width);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        margin: 0.75rem;
    }

    .admin-content {
        padding: 4.25rem 0.75rem 0.75rem;
    }

    .admin-sidebar .header-dropdown .dropdown-panel,
    .admin-sidebar .sidebar-user .dropdown-panel {
        position: fixed;
        top: auto;
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        min-width: 0;
        max-width: none;
        max-height: calc(100vh - 1.5rem);
        overflow: auto;
    }

    .admin-sidebar .notif-panel {
        width: auto;
        max-height: calc(100vh - 1.5rem);
    }

    .admin-sidebar #notificationsDropdown .notif-panel {
        top: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-height: calc(100vh - 1.5rem);
    }
}

/* Tenant workspace top navigation. Super Admin keeps the sidebar layout. */
body.tenant-body .mobile-menu-toggle,
body.tenant-body .sidebar-overlay {
    display: none !important;
}

body.tenant-body .admin-main,
body.tenant-body .admin-shell.sidebar-collapsed .admin-main {
    margin-left: 0;
}

body.tenant-body .admin-shell {
    background: #f4f6fb;
}

body.tenant-body .admin-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.25rem 2rem 2rem;
}

body.tenant-body .admin-footer {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.tenant-topnav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 4.25rem;
    padding: 0.75rem 2rem;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e5e9f2;
    box-shadow: 0 0.25rem 1rem rgba(67,89,113,.08);
    backdrop-filter: saturate(180%) blur(.5rem);
}

.tenant-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.tenant-brand img {
    height: 2rem;
    width: auto;
    display: block;
}

.tenant-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.tenant-nav::-webkit-scrollbar {
    display: none;
}

.tenant-nav-item {
    position: relative;
    flex: 0 0 auto;
}

.tenant-nav-link,
.tenant-tool-trigger,
.tenant-profile .profile-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.5rem;
    padding: .55rem .85rem;
    border: 1px solid transparent;
    border-radius: .5rem;
    background: transparent;
    color: #566a7f;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.tenant-nav-link:hover,
.tenant-nav-link.active,
.tenant-nav-item.active > .tenant-nav-link,
.tenant-tool-trigger:hover,
.tenant-profile .profile-trigger:hover {
    background: #e4f7f6;
    color: #2fa69e;
}

.tenant-nav-link svg,
.tenant-tool-trigger svg {
    width: .9rem;
    height: .9rem;
}

.tenant-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.tenant-tools,
.tenant-profile {
    position: relative;
}

.tenant-tool-trigger {
    border-color: #dce4ef;
    background: #fff;
    box-shadow: 0 0.125rem 0.375rem rgba(67,89,113,.08);
}

.tenant-tool-trigger .nav-badge-count {
    margin-left: .15rem;
}

.tenant-menu-panel,
.tenant-tools-panel,
.tenant-profile > .dropdown-panel {
    top: calc(100% + .5rem);
    right: 0;
    left: auto;
    min-width: 13rem;
}

.tenant-nav-item .tenant-menu-panel {
    right: auto;
    left: 0;
}

.tenant-tools-panel {
    width: 18rem;
    padding: .45rem;
}

.tenant-tool-row,
.tenant-tool-row-button {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.dropdown-panel button.dropdown-link {
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--admin-text);
    text-decoration: none;
}

.dropdown-panel button.dropdown-link:hover {
    background: var(--admin-hover-bg);
}

.tenant-tool-row span,
.tenant-tool-row-button span {
    color: #566a7f;
    font-weight: 700;
}

.tenant-tool-row small,
.tenant-tool-row-button small {
    color: #a1acb8;
    font-size: .75rem;
    line-height: 1.35;
}

.tenant-tool-row:hover span,
.tenant-tool-row-button:hover span {
    color: #2fa69e;
}

.tenant-profile .profile-trigger {
    padding: .35rem .6rem .35rem .35rem;
    border-color: #dce4ef;
    background: #fff;
}

.tenant-profile .profile-avatar {
    width: 2rem;
    height: 2rem;
}

.tenant-profile .profile-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.tenant-profile .profile-name {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #566a7f;
    font-size: .83rem;
    font-weight: 700;
}

.tenant-profile .profile-role {
    color: #a1acb8;
    font-size: .72rem;
    font-weight: 500;
}

.tenant-tools #notificationsDropdown {
    position: relative;
}

.tenant-tools #notificationsDropdown .notif-panel {
    position: fixed;
    top: var(--activity-panel-top, 5rem);
    left: var(--activity-panel-left, auto);
    right: auto;
    width: min(34rem, calc(100vw - 1.5rem));
    max-height: min(42rem, calc(100vh - 1.5rem));
    overflow: hidden;
    border: 1px solid #dfe7f2;
    border-radius: .75rem;
    box-shadow: 0 1.25rem 3.5rem rgba(67, 89, 113, .20);
}

body.tenant-body .notif-panel-header {
    align-items: flex-start;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

body.tenant-body .notif-panel-header h4 {
    color: #344767;
    font-size: .98rem;
    font-weight: 700;
}

body.tenant-body .notif-panel-header h4::after {
    content: 'Workspace updates, billing events, and lead movement';
    display: block;
    margin-top: .2rem;
    color: #8592a3;
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.35;
}

body.tenant-body .notif-list {
    padding: .45rem 0;
    background: #fbfcff;
}

body.tenant-body .notif-date-heading {
    padding: .75rem 1.1rem .35rem;
    color: #8a9ab0;
}

body.tenant-body .notif-list .drawer-list-item {
    margin: .25rem .65rem;
    padding: .8rem 2.05rem .8rem .8rem;
    border: 1px solid transparent;
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 .15rem .55rem rgba(67, 89, 113, .06);
}

body.tenant-body .notif-list .drawer-list-item:hover {
    border-color: #dfe7f2;
    background: #fff;
    box-shadow: 0 .35rem 1.1rem rgba(67, 89, 113, .10);
}

body.tenant-body .notif-list .drawer-list-item.is-unread {
    border-color: rgba(58, 190, 182, .28);
    background: #f8fdfc;
}

body.tenant-body .notif-list .drawer-list-item .item-title {
    color: #344767;
    font-size: .86rem;
    white-space: normal;
}

body.tenant-body .notif-list .drawer-list-item .item-subtitle {
    margin-top: .25rem;
    color: #6f7f95;
    font-size: .77rem;
    line-height: 1.45;
}

body.tenant-body .notif-list .drawer-list-item .item-time {
    margin-top: .45rem;
    color: #9aa8ba;
    font-size: .7rem;
    font-weight: 600;
}

body.tenant-body .notif-list .lv-avatar,
body.tenant-body .notif-list .drawer-list-item .item-icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: .65rem;
}

body.tenant-body .drawer-empty {
    margin: .7rem;
    border: 1px dashed #d5deea;
    border-radius: .65rem;
    background: #fff;
    color: #7d8da5;
}

.tenant-tools.open .tenant-tools-panel .notif-panel {
    display: none;
}

.tenant-tools.open #notificationsDropdown.open .notif-panel {
    display: flex;
}

body.tenant-body .billing-page {
    --billing-ink: #26364d;
    --billing-muted: #7d8da5;
}

body.tenant-body .billing-page .page-header {
    margin-bottom: 1rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid #dfe7f2;
    border-radius: .75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 .25rem 1rem rgba(67,89,113,.08);
}

body.tenant-body .billing-page .page-header h1 {
    margin-bottom: .35rem;
    color: var(--billing-ink);
    font-weight: 700;
}

body.tenant-body .billing-page .dashboard-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(21rem, .75fr);
    gap: 1rem;
}

body.tenant-body .billing-page .card {
    border: 1px solid #dfe7f2;
    border-radius: .75rem;
    box-shadow: 0 .25rem 1rem rgba(67,89,113,.08);
}

body.tenant-body .billing-page .card-header {
    min-height: 3.8rem;
    padding: 1.05rem 1.25rem;
}

body.tenant-body .billing-page .card-header h3 {
    color: var(--billing-ink);
    font-weight: 700;
}

body.tenant-body .billing-page .card-body {
    padding: 1.1rem 1.25rem 1.25rem;
}

body.tenant-body .billing-page .detail-table th {
    width: 10rem;
    color: var(--billing-muted);
    font-size: .74rem;
}

body.tenant-body .billing-page .detail-table td {
    color: #49627f;
    font-weight: 500;
}

body.tenant-body .billing-page .data-table th {
    color: #8b9ab1;
    font-size: .72rem;
}

body.tenant-body .billing-page .data-table td {
    padding-top: 1.05rem;
    padding-bottom: 1.05rem;
}

@media (max-width: 980px) {
    .tenant-topnav {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: .75rem 1rem;
    }

    .tenant-nav {
        order: 3;
        flex-basis: 100%;
    }

    .tenant-actions {
        margin-left: auto;
    }

    body.tenant-body .admin-content {
        padding: 1rem;
    }

    body.tenant-body .billing-page .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .tenant-profile .profile-meta {
        display: none;
    }

    .tenant-tools-panel,
    .tenant-profile > .dropdown-panel,
    .tenant-nav-item .tenant-menu-panel {
        position: fixed;
        top: 4.5rem;
        right: .75rem;
        left: .75rem;
        min-width: 0;
        width: auto;
    }

    body.tenant-body .admin-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.customer-dashboard {
    --dashboard-ink: #26364d;
    --dashboard-muted: #7d8da5;
}

.customer-dashboard-header {
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid #dfe7f2;
    border-radius: .75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 .25rem 1rem rgba(67, 89, 113, .08);
}

.customer-dashboard-header h1 {
    color: var(--dashboard-ink);
    font-weight: 700;
}

.customer-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.customer-dashboard-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr);
    gap: 1rem;
    margin-top: 1rem;
}

.customer-report-card {
    border: 1px solid #dfe7f2;
    border-radius: .75rem;
    box-shadow: 0 .25rem 1rem rgba(67, 89, 113, .08);
}

.customer-report-card .card-header {
    align-items: center;
    min-height: 4rem;
    padding: 1rem 1.25rem;
}

.customer-report-card .card-header h3 {
    margin-bottom: .2rem;
    color: var(--dashboard-ink);
    font-weight: 700;
}

.customer-report-card .card-header p {
    margin: 0;
    color: var(--dashboard-muted);
    font-size: .85rem;
}

.customer-report-card .card-body {
    padding: 1.15rem 1.25rem 1.25rem;
}

.pipeline-report {
    display: grid;
    gap: .95rem;
}

.pipeline-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .35rem;
    color: #566a7f;
    font-size: .86rem;
    font-weight: 600;
}

.pipeline-row-meta strong {
    color: var(--dashboard-ink);
}

.pipeline-bar {
    height: .55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f8;
}

.pipeline-bar span {
    display: block;
    height: 100%;
    min-width: .35rem;
    border-radius: inherit;
}

.pipeline-bar .tone-blue { background: #5b8def; }
.pipeline-bar .tone-amber { background: #ffab00; }
.pipeline-bar .tone-navy { background: #566a7f; }
.pipeline-bar .tone-green { background: #2fb344; }
.pipeline-bar .tone-red { background: #ff4c51; }

.snapshot-list {
    display: grid;
    gap: .8rem;
}

.snapshot-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #e6edf5;
}

.snapshot-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.snapshot-list span {
    color: var(--dashboard-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.snapshot-list strong {
    color: #49627f;
    font-weight: 700;
}

.customer-dashboard .data-table td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

@media (max-width: 980px) {
    .customer-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .customer-dashboard-header {
        align-items: flex-start;
    }

    .customer-dashboard-actions {
        width: 100%;
    }

    .customer-dashboard-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}
