.error {
    color: #f46a6a;
}
.parsley-error {
    border-color: #f46a6a;
}
.parsley-errors-list {
    display: none;
    margin: 0;
    padding: 0;
}
.parsley-errors-list.filled {
    display: block;
}
.parsley-errors-list>li {
    font-size: 12px;
    list-style: none;
    color: #f46a6a;
    margin-top: 5px;
}
.app-sidebar .side-menu__label{
    font-size: 12px !important;
    font-weight: 600;
}
.dropdown-menu{
    box-shadow: 0 2px 4px rgba(15,34,58,.12);
    min-width: 185px;
}
.font-size-14 {
    font-size: 14px !important;
}
.font-size-20{
    font-size:16px !important;
}

/* Notyf must sit above Bootstrap 5 modals (backdrop ~1050) so toasts stay visible */
.notyf {
    z-index: 10900 !important;
}

/* Select2 — match Bootstrap form-select look + mobile search */
.select2-container {
    width: 100% !important;
}
.select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid var(--input-border, #e9edf6);
    border-radius: 0.35rem;
    padding: 4px 8px;
    background-color: var(--form-control-bg, #fff);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: var(--default-text-color, #333);
    padding-left: 4px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-color, #5c67f2);
}
.select2-dropdown {
    border-color: var(--input-border, #e9edf6) !important;
    z-index: 99999 !important;
    overflow: visible !important;
}
.select2-container--open .select2-dropdown--below,
.select2-container--open .select2-dropdown--above {
    overflow: visible !important;
}
/* Never hide the search bar (theme/Select2 may add .select2-search--hide) */
.select2-search--dropdown,
.select2-search--dropdown.select2-search--hide {
    display: block !important;
    padding: 8px !important;
}
.select2-search--dropdown .select2-search__field {
    display: block !important;
    width: 100% !important;
    border-radius: 0.35rem;
    padding: 0.55rem 0.65rem !important;
    font-size: 16px !important; /* prevents iOS zoom */
    min-height: 42px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary-color, #5c67f2);
}
.select2-container--default .select2-results > .select2-results__options {
    max-height: 240px;
    overflow-y: auto;
}
.modal .select2-container {
    z-index: 1;
}

/* Prevent mobile native picker: hide enhanced <select> completely on touch devices */
select.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}
@media (hover: none), (pointer: coarse) {
    select.select2-hidden-accessible {
        display: none !important;
    }
}

/* Mobile searchable select overlay */
body.mobile-select-open {
    overflow: hidden;
}
.mobile-select-wrap {
    position: relative;
    width: 100%;
}
.mobile-select-wrap select.mobile-select-native {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.mobile-select-trigger {
    width: 100%;
    text-align: left !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mobile-select-trigger.is-placeholder {
    color: var(--text-muted, #6c757d);
}
.mobile-select-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    padding: 0;
}
.mobile-select-overlay.is-open {
    display: flex;
}
.mobile-select-sheet {
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    background: var(--custom-white, #fff);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}
.mobile-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--input-border, #e9edf6);
}
.mobile-select-title {
    font-weight: 600;
    font-size: 1rem;
}
.mobile-select-close {
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: #64748b;
    padding: 0 4px;
}
.mobile-select-search-wrap {
    padding: 10px 16px;
}
.mobile-select-search {
    width: 100%;
    border: 1px solid var(--input-border, #e9edf6);
    border-radius: 0.5rem;
    padding: 0.7rem 0.85rem;
    font-size: 16px;
    background: var(--form-control-bg, #fff);
}
.mobile-select-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 8px 16px;
}
.mobile-select-option {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0.85rem 0.75rem;
    font-size: 0.95rem;
    color: var(--default-text-color, #1f2937);
}
.mobile-select-option.is-selected {
    background: rgba(92, 103, 242, 0.12);
    color: var(--primary-color, #5c67f2);
    font-weight: 600;
}
.mobile-select-option:active {
    background: rgba(92, 103, 242, 0.08);
}

/* Sesame Seeds sidebar / header brand */
.sesame-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none !important;
    line-height: 1.15;
}
.sesame-brand-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgb(var(--primary-rgb)) 0%, rgb(var(--secondary-rgb)) 100%);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
}
.sesame-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sesame-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.sesame-brand-sub {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
    white-space: nowrap;
}
.sesame-brand.sidebar .sesame-brand-name,
.sesame-brand.sidebar .sesame-brand-sub,
.app-sidebar .sesame-brand-name,
.app-sidebar .sesame-brand-sub {
    color: #fff;
}
.sesame-brand.header .sesame-brand-name,
.app-header .sesame-brand-name {
    color: rgb(var(--primary-rgb));
}
.sesame-brand.header .sesame-brand-sub,
.app-header .sesame-brand-sub {
    color: #64748b;
}
.app-sidebar .header-logo img,
.horizontal-logo img {
    display: none !important;
}
.sesame-brand-icon {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}
[data-toggled="close"] .app-sidebar .sesame-brand-text {
    display: none;
}
[data-toggled="close"] .app-sidebar .main-sidebar-header {
    padding-inline: 0.75rem;
}
[data-toggled="close"] .app-sidebar .sesame-brand {
    justify-content: center;
    width: 100%;
}

/* CRM Dashboard */
.crm-dashboard .dashboard-welcome {
    background: linear-gradient(135deg, rgb(var(--primary-rgb)) 0%, #6366f1 45%, rgb(var(--secondary-rgb)) 100%);
    border: none;
    border-radius: 16px;
    color: #fff;
    overflow: hidden;
    position: relative;
}
.crm-dashboard .dashboard-welcome::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -5%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}
.crm-dashboard .dashboard-welcome::after {
    content: "";
    position: absolute;
    bottom: -50%;
    left: 20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}
.crm-dashboard .dashboard-welcome .card-body {
    position: relative;
    z-index: 1;
    padding: 1.75rem 2rem;
}
.crm-dashboard .welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #fff !important;
}
.crm-dashboard .welcome-sub {
    opacity: 0.9;
    font-size: 0.9rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9) !important;
}
.crm-dashboard .welcome-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.crm-dashboard .stat-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}
.crm-dashboard .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}
.crm-dashboard .stat-card .card-body {
    padding: 1.35rem 1.5rem;
    position: relative;
}
.crm-dashboard .stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}
.crm-dashboard .stat-card-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
    margin-bottom: 0.35rem;
}
.crm-dashboard .stat-card-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.crm-dashboard .stat-card-meta {
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
}
.crm-dashboard .stat-card-meta.up {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
.crm-dashboard .stat-card-meta.down {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
.crm-dashboard .stat-card-meta.neutral {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}
.crm-dashboard .stat-card--primary { background: linear-gradient(145deg, #eef2ff 0%, #f8fafc 100%); }
.crm-dashboard .stat-card--primary .stat-card-icon { background: rgba(92, 103, 242, 0.15); color: #5c67f2; }
.crm-dashboard .stat-card--info { background: linear-gradient(145deg, #ecfeff 0%, #f8fafc 100%); }
.crm-dashboard .stat-card--info .stat-card-icon { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }
.crm-dashboard .stat-card--success { background: linear-gradient(145deg, #ecfdf5 0%, #f8fafc 100%); }
.crm-dashboard .stat-card--success .stat-card-icon { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.crm-dashboard .stat-card--warning { background: linear-gradient(145deg, #fffbeb 0%, #f8fafc 100%); }
.crm-dashboard .stat-card--warning .stat-card-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.crm-dashboard .stat-card--purple { background: linear-gradient(145deg, #f5f3ff 0%, #f8fafc 100%); }
.crm-dashboard .stat-card--purple .stat-card-icon { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.crm-dashboard .stat-card--danger { background: linear-gradient(145deg, #fef2f2 0%, #f8fafc 100%); }
.crm-dashboard .stat-card--danger .stat-card-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.crm-dashboard .chart-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    height: 100%;
}
.crm-dashboard .chart-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 1.15rem 1.5rem;
}
.crm-dashboard .chart-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}
.crm-dashboard .chart-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.crm-dashboard .chart-card-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.15rem 0 0;
    font-weight: 500;
}
.crm-dashboard .lead-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease;
}
.crm-dashboard .lead-row:last-child { border-bottom: none; }
.crm-dashboard .lead-row:hover { background: rgba(var(--primary-rgb), 0.03); }
.crm-dashboard .lead-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, rgb(var(--primary-rgb)), rgb(var(--secondary-rgb)));
}
.crm-dashboard .lead-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: inherit;
    text-decoration: none;
}
.crm-dashboard .lead-name:hover { color: rgb(var(--primary-rgb)); }
.crm-dashboard .lead-meta {
    font-size: 0.75rem;
    color: #64748b;
}
.crm-dashboard .quick-action-btn {
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
}
.crm-dashboard .section-gap { margin-bottom: 1.5rem; }

/* WhatsApp Inbox */
.wa-inbox {
    display: flex;
    height: calc(100vh - 70px);
    min-height: 520px;
    background: #111b21;
    border-radius: 0;
    overflow: hidden;
}
.wa-fullscreen-body .wa-inbox {
    height: 100vh;
    min-height: 100vh;
}
.wa-sidebar {
    width: 380px;
    min-width: 300px;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    background: #111b21;
    border-right: 1px solid #2a3942;
}
.wa-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #202c33;
    color: #e9edef;
    gap: 0.75rem;
}
.wa-sidebar-header-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.wa-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2a3942;
    color: #e9edef;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.wa-back-btn:hover {
    background: #00a884;
    color: #fff;
}
.wa-back-btn i {
    font-size: 1.1rem;
}
.wa-sidebar-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.wa-unread-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}
.wa-chat-item {
    position: relative;
}
.wa-chat-item--unread .wa-chat-item-name,
.wa-chat-item--unread .wa-chat-item-preview {
    color: #e9edef;
    font-weight: 600;
}
.wa-unread-badge {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wa-badge {
    font-size: 0.7rem;
    background: #00a884;
    color: #fff;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
}
.wa-filter-tabs {
    display: flex;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem 0;
    background: #111b21;
}
.wa-filter-tab {
    flex: 1;
    border: 1px solid #2a3942;
    background: #202c33;
    color: #8696a0;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.wa-filter-tab.active {
    background: #00a884;
    border-color: #00a884;
    color: #fff;
}
.wa-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    padding: 0 0.3rem;
    margin-left: 0.2rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(255,255,255,0.12);
    color: inherit;
}
.wa-filter-tab.active .wa-filter-count {
    background: rgba(0,0,0,0.18);
}
.wa-lead-count {
    padding: 0.35rem 0.95rem 0;
    font-size: 0.75rem;
    color: #8696a0;
    background: #111b21;
}
.wa-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.wa-ai-btn,
.wa-confirm-btn,
.wa-takeover-btn,
.wa-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: none;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.wa-ai-btn {
    background: #00a884;
    color: #fff;
    padding: 0.45rem 0.85rem;
    box-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.wa-ai-btn:hover {
    background: #029a78;
    color: #fff;
}
.wa-ai-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}
.wa-ai-btn--resume {
    background: #f59e0b;
    color: #111b21;
}
.wa-ai-btn--resume:hover {
    background: #d97706;
    color: #111b21;
}
.wa-ai-btn i,
.wa-confirm-btn i,
.wa-takeover-btn i {
    font-size: 0.95rem;
}
.wa-takeover-btn {
    background: #3b4a54;
    color: #e9edef;
    padding: 0.45rem 0.85rem;
}
.wa-takeover-btn:hover {
    background: #4b5c68;
    color: #fff;
}
.wa-takeover-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}
.wa-confirm-btn {
    background: #25d366;
    color: #111b21;
    padding: 0.45rem 0.85rem;
}
.wa-confirm-btn:hover {
    background: #1ebe57;
    color: #111b21;
}
.wa-icon-btn {
    width: 34px;
    height: 34px;
    background: #2a3942;
    color: #e9edef;
}
.wa-icon-btn:hover {
    background: #3b4a54;
    color: #fff;
}
.wa-search-wrap {
    position: relative;
    padding: 0.65rem 0.85rem;
    background: #111b21;
}
.wa-search-wrap i {
    position: absolute;
    left: 1.35rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8696a0;
    font-size: 1rem;
}
.wa-search {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: #202c33;
    color: #e9edef;
    padding: 0.55rem 0.85rem 0.55rem 2.35rem;
    font-size: 0.88rem;
}
.wa-search:focus {
    outline: none;
    box-shadow: 0 0 0 1px #00a884;
}
.wa-chat-list {
    flex: 1;
    overflow-y: auto;
    background: #111b21;
}
.wa-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    color: #8696a0;
    font-size: 0.85rem;
}
.wa-empty-list {
    padding: 1.5rem;
    text-align: center;
    color: #8696a0;
    font-size: 0.85rem;
}
.wa-chat-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(42, 57, 66, 0.6);
    transition: background 0.15s ease;
}
.wa-chat-item:hover,
.wa-chat-item.active {
    background: #2a3942;
}
.wa-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #6a7175;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.wa-chat-item-body {
    flex: 1;
    min-width: 0;
}
.wa-chat-item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}
.wa-chat-item-name {
    color: #e9edef;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-chat-item-time {
    color: #8696a0;
    font-size: 0.72rem;
    flex-shrink: 0;
}
.wa-chat-item-preview {
    color: #8696a0;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-chat-item-phone {
    color: #8696a0;
    font-size: 0.76rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-chat-item-phone i {
    font-size: 0.72rem;
    vertical-align: middle;
}
.wa-chat-sub i {
    font-size: 0.78rem;
    vertical-align: middle;
}
.wa-chat-status {
    color: #8696a0;
    font-size: 0.72rem;
    margin-top: 0.1rem;
}
.wa-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0b141a;
    min-width: 0;
}
.wa-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8696a0;
    text-align: center;
    padding: 2rem;
}
.wa-empty i {
    font-size: 4rem;
    color: #00a884;
    margin-bottom: 1rem;
    opacity: 0.7;
}
.wa-empty h4 {
    color: #e9edef;
    margin-bottom: 0.35rem;
}
.wa-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.wa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    background: #202c33;
    border-bottom: 1px solid #2a3942;
}
.wa-chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.wa-chat-name {
    color: #e9edef;
    font-weight: 600;
    font-size: 0.95rem;
}
.wa-chat-sub {
    color: #8696a0;
    font-size: 0.78rem;
}
.wa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 4%;
    background-color: #0b141a;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23182229' fill-opacity='0.45'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.wa-messages-loading {
    text-align: center;
    padding: 0.75rem;
    color: #8696a0;
}
.wa-bubble-wrap {
    display: flex;
    margin-bottom: 0.45rem;
}
.wa-bubble-wrap.wa-bubble-in {
    justify-content: flex-start;
}
.wa-bubble-wrap.wa-bubble-out {
    justify-content: flex-end;
}
.wa-bubble {
    max-width: 65%;
    padding: 0.45rem 0.65rem 0.35rem;
    border-radius: 8px;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}
.wa-bubble-in .wa-bubble {
    background: #202c33;
    color: #e9edef;
    border-top-left-radius: 0;
}
.wa-bubble-out .wa-bubble {
    background: #005c4b;
    color: #e9edef;
    border-top-right-radius: 0;
}
.wa-bubble-text {
    font-size: 0.88rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.wa-bubble-meta {
    font-size: 0.68rem;
    color: rgba(233, 237, 239, 0.65);
    text-align: right;
    margin-top: 0.15rem;
}
.wa-composer {
    padding: 0.65rem 1rem;
    background: #202c33;
    border-top: 1px solid #2a3942;
}
.wa-composer-form {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.wa-composer-input {
    flex: 1;
    border: none;
    border-radius: 8px;
    background: #2a3942;
    color: #e9edef;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
}
.wa-composer-input:focus {
    outline: none;
}
.wa-composer-input:disabled {
    opacity: 0.6;
}
.wa-send-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #00a884;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.wa-send-btn:hover:not(:disabled) {
    background: #06cf9c;
}
.wa-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
@media (max-width: 991px) {
    .wa-inbox {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 70px);
    }
    .wa-sidebar {
        width: 100%;
        max-width: none;
        max-height: 45vh;
    }
    .wa-main {
        min-height: 50vh;
    }
}

/* Cashbook dashboard */
.card.cashbook-kpi {
    border: 0 !important;
    border-radius: 16px !important;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card.cashbook-kpi::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}
.card.cashbook-kpi:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12) !important;
}
.card.cashbook-kpi .card-body {
    padding: 1.5rem 1.6rem 1.5rem 1.75rem;
    background: transparent !important;
}
.cashbook-kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}
.cashbook-kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0;
    letter-spacing: -0.02em;
}
.cashbook-kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
}

.card.cashbook-kpi--have {
    background: #d1fae5 !important;
}
.card.cashbook-kpi--have::before { background: #10b981; }
.card.cashbook-kpi--have .cashbook-kpi-label { color: #047857; }
.card.cashbook-kpi--have .cashbook-kpi-value { color: #064e3b; }
.card.cashbook-kpi--have .cashbook-kpi-icon { background: linear-gradient(135deg, #34d399, #059669); }

.card.cashbook-kpi--pr {
    background: #e0e7ff !important;
}
.card.cashbook-kpi--pr::before { background: #5c67f2; }
.card.cashbook-kpi--pr .cashbook-kpi-label { color: #4338ca; }
.card.cashbook-kpi--pr .cashbook-kpi-value { color: #312e81; }
.card.cashbook-kpi--pr .cashbook-kpi-icon { background: linear-gradient(135deg, #818cf8, #4f46e5); }

.card.cashbook-kpi--expense {
    background: #fee2e2 !important;
}
.card.cashbook-kpi--expense::before { background: #ef4444; }
.card.cashbook-kpi--expense .cashbook-kpi-label { color: #b91c1c; }
.card.cashbook-kpi--expense .cashbook-kpi-value { color: #991b1b; }
.card.cashbook-kpi--expense .cashbook-kpi-icon { background: linear-gradient(135deg, #f87171, #dc2626); }

.card.cashbook-kpi--income {
    background: #dcfce7 !important;
}
.card.cashbook-kpi--income::before { background: #22c55e; }
.card.cashbook-kpi--income .cashbook-kpi-label { color: #15803d; }
.card.cashbook-kpi--income .cashbook-kpi-value { color: #14532d; }
.card.cashbook-kpi--income .cashbook-kpi-icon { background: linear-gradient(135deg, #4ade80, #16a34a); }

.card.cashbook-kpi--diff {
    background: #ffedd5 !important;
}
.card.cashbook-kpi--diff::before { background: #f59e0b; }
.card.cashbook-kpi--diff .cashbook-kpi-label { color: #b45309; }
.card.cashbook-kpi--diff .cashbook-kpi-value { color: #92400e; }
.card.cashbook-kpi--diff .cashbook-kpi-icon { background: linear-gradient(135deg, #fbbf24, #d97706); }

.cashbook-filter-btn {
    border-radius: 999px !important;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
}
.cashbook-filter-btn.active,
.cashbook-filter-btn[aria-expanded="true"] {
    box-shadow: 0 8px 20px rgba(92, 103, 242, 0.28);
}

.cashbook-account-tile {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}
.cashbook-account-tile:hover {
    border-color: rgba(92, 103, 242, 0.35);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}
.cashbook-account-tile .tile-name {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}
.cashbook-account-tile .tile-name:hover { color: rgb(var(--primary-rgb)); }
.cashbook-account-tile .tile-balance { font-weight: 700; margin-bottom: 0.75rem; }

.cashbook-tx-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom-width: 1px;
}
.cashbook-tx-table tbody tr:hover {
    background: rgba(92, 103, 242, 0.03);
}
.cashbook-credit-badge,
.cashbook-debit-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-weight: 600;
    font-size: 0.82rem;
}
.cashbook-credit-badge { background: rgba(16, 185, 129, 0.12); color: #059669; }
.cashbook-debit-badge { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

/* Account profile page */
.account-profile-card {
    overflow: hidden;
    border: 0 !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
}
.account-profile-banner {
    padding: 1.35rem 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 42%),
        linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
}
.account-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
.account-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.account-profile-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.85rem;
}
.account-profile-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
}
.account-profile-balance {
    padding: 0.55rem 0.9rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    min-width: 150px;
}
.account-profile-balance-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.15rem;
}
.account-profile-balance-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.account-profile-balance-value.is-credit { color: #bbf7d0; }
.account-profile-balance-value.is-debit { color: #fecaca; }
.account-ledger-balance {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.account-info-tile {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #f8fafc;
    padding: 1rem 1.1rem;
    min-height: 120px;
}
.account-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.55rem;
}
.account-info-value {
    color: #0f172a;
    font-weight: 500;
    line-height: 1.5;
    white-space: pre-wrap;
}
.account-doc-preview {
    display: inline-block;
    text-decoration: none;
}
.account-doc-preview img {
    max-height: 120px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    object-fit: cover;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}
.account-doc-empty {
    color: #94a3b8;
    font-size: 0.92rem;
    font-style: italic;
    padding: 1.25rem 0.5rem;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #fff;
}