:root{--crm-blue:#648bea;--crm-blue-dark:#4f76d7;--crm-border:#e8edf3;--crm-text:#364b5f;--crm-muted:#7d8b9b;--crm-bg:#f7f9fb;--crm-sidebar:248px}.crm-shell{background:var(--crm-bg);min-height:100vh}.crm-sidebar{width:var(--crm-sidebar);background:#fff;border-right:1px solid var(--crm-border);box-shadow:none}.crm-brand-wrap{height:62px;padding:10px 24px;border-bottom:1px solid var(--crm-border)}.crm-brand{gap:10px;text-decoration:none}.crm-brand-logo{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:#05b5bc;background:linear-gradient(135deg,#06c2c8 0 55%,#ef426f 55% 75%,#ffc928 75%)}.crm-brand .brand-title{font-weight:800;letter-spacing:.8px;color:#07aeb5;font-size:1.35rem}.crm-brand .brand-subtitle{font-size:.68rem;color:#92a0ae}.crm-nav{padding:12px 9px 18px;overflow-y:auto}.crm-nav .nav-link{border-radius:4px;color:#657386;font-size:.94rem;padding:.61rem .85rem;margin:1px 0;display:flex;align-items:center;gap:.65rem;border:0;background:transparent;width:100%;text-align:left}.crm-nav .nav-link:hover{background:#f6f8fb;color:#33495e}.crm-nav .nav-link.active,.crm-nav .nav-group.open>.nav-group-toggle{background:var(--crm-blue);color:#fff}.crm-nav .nav-icon{width:22px;text-align:center;font-size:1.08rem}.nav-group-toggle .bi-chevron-down{transition:.2s}.nav-group.open>.nav-group-toggle .bi-chevron-down{transform:rotate(180deg)}.nav-submenu{display:none;padding:2px 0 5px 43px}.nav-group.open>.nav-submenu{display:block}.nav-sublink{display:block;color:#788698;text-decoration:none;font-size:.87rem;padding:.44rem .4rem}.nav-sublink:hover{color:var(--crm-blue-dark)}.admin-main{margin-left:var(--crm-sidebar)}.crm-navbar{height:62px;border-bottom:1px solid var(--crm-border);box-shadow:none}.top-quick-links a{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;color:#536879;text-decoration:none}.top-quick-links a:hover{background:#f2f5f8;color:var(--crm-blue)}.brand-switcher select{min-width:165px;border-color:var(--crm-border);color:#536879}.dashboard-content{background:var(--crm-bg);min-height:calc(100vh - 108px)}.panel{background:#fff;border:1px solid var(--crm-border);border-radius:7px;box-shadow:none}.panel-header{padding:16px 18px;border-bottom:1px solid var(--crm-border);display:flex;align-items:center;justify-content:space-between}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}.page-heading-copy{display:flex;align-items:center;gap:12px}.page-icon{width:42px;height:42px;border-radius:10px;background:#edf3ff;color:var(--crm-blue);display:grid;place-items:center;font-size:1.2rem}.eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:.7rem;font-weight:700;color:#8c99a7}.table>:not(caption)>*>*{padding:.82rem .85rem;border-color:var(--crm-border);color:var(--crm-text);font-size:.9rem}.table thead th{font-weight:700;font-size:.82rem;background:#fbfcfd;color:#526474}.table a{color:#1765b3;text-decoration:none}.table a:hover{text-decoration:underline}.badge{font-weight:600}.btn-primary{background:var(--crm-blue);border-color:var(--crm-blue)}.btn-primary:hover{background:var(--crm-blue-dark);border-color:var(--crm-blue-dark)}.form-control,.form-select{border-color:#e6ebf0;min-height:40px}.form-control:focus,.form-select:focus{border-color:#9db8f8;box-shadow:0 0 0 .2rem rgba(100,139,234,.12)}.metric-card{background:#fff;border:1px solid var(--crm-border);border-radius:8px;padding:18px;box-shadow:none}.metric-card .metric-value{font-size:1.7rem}.metric-icon{border-radius:8px}.crm-footer{background:#fff;border-top:1px solid var(--crm-border);color:#8996a5}.invoice-paper{background:#fff;border:1px solid var(--crm-border);max-width:1000px;margin:auto}.invoice-modern .invoice-brandbar{background:#172b4d;color:#fff}.invoice-minimal .invoice-brandbar{border-bottom:4px solid #222}.file-card{border:1px solid var(--crm-border);border-radius:8px;padding:14px;background:#fff}.task-status-dot{width:8px;height:8px;border-radius:50%;display:inline-block}.credential-value{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.86rem}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);border-left:1px solid var(--crm-border);border-top:1px solid var(--crm-border)}.calendar-cell{min-height:110px;border-right:1px solid var(--crm-border);border-bottom:1px solid var(--crm-border);padding:7px;background:#fff}.calendar-cell .date{font-size:.8rem;color:#728194;text-align:right}.calendar-event{display:block;margin-top:4px;padding:3px 5px;border-radius:3px;background:#e8f0ff;color:#3567c8;font-size:.72rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-chat-list{max-height:640px;overflow:auto}.crm-chat-message{border-bottom:1px solid var(--crm-border);padding:16px}.crm-chat-message:last-child{border-bottom:0}.sidebar-user{border-top:1px solid var(--crm-border)}
[data-bs-theme="dark"] .crm-sidebar,[data-bs-theme="dark"] .crm-navbar,[data-bs-theme="dark"] .panel,[data-bs-theme="dark"] .metric-card,[data-bs-theme="dark"] .crm-footer,[data-bs-theme="dark"] .file-card,[data-bs-theme="dark"] .calendar-cell,[data-bs-theme="dark"] .invoice-paper{background:#17202a;border-color:#293440}[data-bs-theme="dark"] .crm-shell,[data-bs-theme="dark"] .dashboard-content{background:#10171f}[data-bs-theme="dark"] .table>:not(caption)>*>*{color:#d9e2ea;border-color:#293440}[data-bs-theme="dark"] .table thead th{background:#1a2530;color:#cbd7e0}
@media(max-width:991.98px){.admin-main{margin-left:0}.crm-sidebar{width:260px}.page-heading{align-items:flex-start;flex-direction:column}.page-heading .btn{width:auto}.calendar-grid{min-width:840px}.calendar-wrap{overflow:auto}}

/* Invoice brand-first workflow */
.invoice-brand-selector{overflow:hidden}.invoice-brand-card{--brand-accent:#648bea;display:block;height:100%;padding:20px;border:1px solid var(--crm-border);border-radius:12px;background:#fff;color:var(--crm-text);text-decoration:none;position:relative;overflow:hidden;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.invoice-brand-card:before{content:"";position:absolute;left:0;top:0;right:0;height:4px;background:var(--brand-accent)}.invoice-brand-card:hover{color:var(--crm-text);text-decoration:none;transform:translateY(-2px);border-color:#d9e2ed;box-shadow:0 10px 28px rgba(41,58,78,.08)}.invoice-brand-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.invoice-brand-logo-wrap{width:72px;height:58px;border:1px solid var(--crm-border);border-radius:10px;background:#fff;display:grid;place-items:center;padding:8px;overflow:hidden}.invoice-brand-logo-wrap img{display:block;max-width:100%;max-height:100%;object-fit:contain}.invoice-brand-fallback{width:100%;height:100%;border-radius:7px;background:#f4f7fb;color:var(--brand-accent);display:grid;place-items:center;font-size:1.35rem}.invoice-brand-arrow{width:34px;height:34px;border-radius:50%;background:#f6f8fb;display:grid;place-items:center;color:#738294;transition:.18s ease}.invoice-brand-card:hover .invoice-brand-arrow{background:var(--brand-accent);color:#fff}.invoice-brand-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--crm-border);border-radius:9px;overflow:hidden}.invoice-brand-meta>div{padding:9px 10px;border-right:1px solid var(--crm-border)}.invoice-brand-meta>div:last-child{border-right:0}.invoice-brand-meta span,.invoice-brand-meta strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.invoice-brand-meta span{font-size:.69rem;color:var(--crm-muted);margin-bottom:2px}.invoice-brand-meta strong{font-size:.82rem;font-weight:700}.invoice-brand-card-footer{border-top:1px solid var(--crm-border);display:flex;align-items:center;justify-content:space-between;color:var(--brand-accent);font-weight:700;font-size:.86rem}.empty-state-icon{width:52px;height:52px;border-radius:14px;background:#f1f5fb;color:var(--crm-blue);display:grid;place-items:center;font-size:1.3rem}
.selected-invoice-brand{--brand-accent:#648bea;display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--crm-border);border-left:4px solid var(--brand-accent);border-radius:10px;padding:14px 16px}.selected-invoice-brand-logo{width:74px;height:54px;border:1px solid var(--crm-border);border-radius:9px;display:grid;place-items:center;padding:7px;background:#fff;flex:0 0 auto}.selected-invoice-brand-logo img{max-width:100%;max-height:100%;object-fit:contain}.selected-invoice-brand-logo span{width:100%;height:100%;display:grid;place-items:center;border-radius:6px;background:#f3f6fa;color:var(--brand-accent);font-size:1.2rem}.selected-invoice-brand-copy{display:flex;flex-direction:column;min-width:0}.selected-invoice-brand-copy strong{font-size:1rem;color:var(--crm-text)}.selected-invoice-brand-copy small:last-child{color:var(--crm-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-invoice-brand-details{margin-left:auto;display:flex;align-items:stretch;border:1px solid var(--crm-border);border-radius:8px;overflow:hidden}.selected-invoice-brand-details>span{min-width:92px;padding:8px 11px;border-right:1px solid var(--crm-border);display:flex;flex-direction:column}.selected-invoice-brand-details>span:last-child{border-right:0}.selected-invoice-brand-details small{color:var(--crm-muted);font-size:.67rem}.selected-invoice-brand-details strong{font-size:.8rem}.invoice-form-panel{overflow:hidden}.invoice-items-wrap{border:1px solid var(--crm-border);border-radius:10px;padding:14px}.invoice-items-table{border:1px solid var(--crm-border);border-radius:8px}.invoice-items-table table{min-width:760px}.invoice-items-table .form-control{min-height:38px}.invoice-total-box{border:1px solid var(--crm-border);border-radius:10px;padding:15px;background:#fbfcfe}.invoice-total-line{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:6px 0;color:#627386}.invoice-grand-total{border-top:1px solid var(--crm-border);margin-top:8px;padding-top:13px;color:var(--crm-text);font-size:1.05rem}.invoice-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--crm-border);background:#fbfcfd}

/* Small portal polish */
.panel{transition:border-color .15s ease}.btn{border-radius:6px}.page-heading h1{color:#33495e}.crm-navbar{background:#fff!important}.crm-nav .nav-link.active{box-shadow:inset 3px 0 0 rgba(255,255,255,.35)}

[data-bs-theme="dark"] .invoice-brand-card,[data-bs-theme="dark"] .selected-invoice-brand,[data-bs-theme="dark"] .invoice-brand-logo-wrap,[data-bs-theme="dark"] .selected-invoice-brand-logo{background:#17202a;border-color:#293440;color:#d9e2ea}[data-bs-theme="dark"] .invoice-brand-card:hover{border-color:#3c4a58}[data-bs-theme="dark"] .invoice-brand-fallback,[data-bs-theme="dark"] .invoice-brand-arrow,[data-bs-theme="dark"] .selected-invoice-brand-logo span,[data-bs-theme="dark"] .empty-state-icon{background:#1f2a35}[data-bs-theme="dark"] .invoice-brand-meta,[data-bs-theme="dark"] .invoice-brand-meta>div,[data-bs-theme="dark"] .invoice-brand-card-footer,[data-bs-theme="dark"] .selected-invoice-brand-details,[data-bs-theme="dark"] .selected-invoice-brand-details>span,[data-bs-theme="dark"] .invoice-items-wrap,[data-bs-theme="dark"] .invoice-items-table,[data-bs-theme="dark"] .invoice-total-box,[data-bs-theme="dark"] .invoice-grand-total,[data-bs-theme="dark"] .invoice-form-actions{border-color:#293440}[data-bs-theme="dark"] .invoice-total-box,[data-bs-theme="dark"] .invoice-form-actions{background:#1a2530}[data-bs-theme="dark"] .selected-invoice-brand-copy strong{color:#d9e2ea}

@media(max-width:767.98px){.invoice-brand-meta{grid-template-columns:1fr}.invoice-brand-meta>div{border-right:0;border-bottom:1px solid var(--crm-border)}.invoice-brand-meta>div:last-child{border-bottom:0}.selected-invoice-brand{align-items:flex-start;flex-wrap:wrap}.selected-invoice-brand-details{width:100%;margin-left:0}.selected-invoice-brand-details>span{flex:1;min-width:0}.invoice-form-actions{position:sticky;bottom:0;z-index:5}}

/* ==============================================================
   v1.2 interface refinements
   ============================================================== */
:root{--crm-sidebar:236px;--crm-surface:#fff;--crm-soft:#f5f7fa;--crm-dark:#27384a}
body{overflow-x:hidden}.crm-sidebar{box-shadow:4px 0 18px rgba(31,48,66,.025)}.crm-brand-wrap{height:64px;padding:10px 18px}.crm-brand-logo{width:34px;height:34px}.crm-brand .brand-title{font-size:1.28rem}.crm-nav{padding:10px 8px 20px;gap:0}.crm-nav .nav-link{min-height:42px;padding:.56rem .72rem;border-radius:7px;font-size:.9rem;font-weight:500;margin:1px 0}.crm-nav .nav-icon{width:24px;font-size:1.04rem;color:#8492a3}.crm-nav .nav-link:hover{background:#f4f7fb}.crm-nav .nav-link.active,.crm-nav .nav-group.open>.nav-group-toggle{background:#648bea;color:#fff;box-shadow:none}.crm-nav .nav-link.active .nav-icon,.crm-nav .nav-group.open>.nav-group-toggle .nav-icon{color:#fff}.nav-submenu{padding:3px 0 6px 42px}.nav-sublink{padding:.38rem .45rem;font-size:.83rem;border-radius:5px}.nav-sublink:hover{background:#f4f7fb;text-decoration:none}.nav-count{min-width:22px;height:20px;padding:0 6px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:#edf2ff;color:#4f76d7;font-size:.68rem;font-weight:700}.crm-nav .nav-link.active .nav-count{background:rgba(255,255,255,.18);color:#fff}
.crm-navbar{height:64px;background:#fff!important;position:sticky;top:0;z-index:1020}.crm-navbar-title{align-items:center;min-width:0;color:#6a7888;font-size:.86rem;font-weight:600}.navbar-actions{display:flex;align-items:center}.icon-button{border:0;background:transparent;color:#5e7082;display:grid;place-items:center;width:38px;height:38px;border-radius:9px;font-size:1.02rem}.icon-button:hover{background:#f4f7fb;color:#3f5f82}.profile-button{display:flex;align-items:center;gap:9px;border:0;background:transparent;padding:4px 7px;border-radius:9px;color:#42576a}.profile-button:hover{background:#f4f7fb}.profile-button:after{margin-left:2px}.profile-copy{flex-direction:column;align-items:flex-start;line-height:1.1}.profile-copy strong{font-size:.82rem;font-weight:650;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-copy small{font-size:.66rem;color:#8c99a6;margin-top:3px}.avatar-img{object-fit:cover}.header-count{position:absolute;right:0;top:1px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#ef476f;color:#fff;border:2px solid #fff;display:inline-flex;align-items:center;justify-content:center;font-size:.56rem;font-weight:800}.brand-switcher .form-select{height:36px;min-height:36px;border-radius:8px;background-color:#fff}
.dashboard-content{min-width:0}.dashboard-content>.container-fluid{max-width:100%}.panel{border-radius:9px}.panel-header{padding:14px 16px}.page-heading{margin-bottom:16px}.page-heading h1{font-size:1.42rem!important}.page-icon{width:40px;height:40px;border-radius:9px}.crm-footer{font-size:.82rem}

/* Tables: stop unnecessary desktop horizontal scroll caused by the source template. */
.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}.table{width:100%;margin-bottom:0;table-layout:auto}.table thead th{white-space:normal!important;vertical-align:middle;line-height:1.25}.table tbody td{min-width:0!important;white-space:normal;vertical-align:middle;overflow-wrap:anywhere}.table>:not(caption)>*>*{padding:.72rem .72rem;font-size:.84rem}.table .text-nowrap{white-space:nowrap!important}.table td.text-end.text-nowrap{width:1%;white-space:nowrap!important}.table td.text-end.text-nowrap .btn{padding:.32rem .48rem}.table .progress{min-width:58px}.table form.d-inline{white-space:nowrap}

/* Messages */
.messages-shell{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);min-height:650px;overflow:hidden}.messages-sidebar{border-right:1px solid var(--crm-border);background:#fff;min-width:0}.messages-sidebar-head{padding:14px;border-bottom:1px solid var(--crm-border)}.messages-conversations{max-height:650px;overflow-y:auto}.conversation-item{display:flex;gap:11px;padding:13px 14px;border-bottom:1px solid var(--crm-border);color:var(--crm-text);text-decoration:none;position:relative}.conversation-item:hover{background:#f7f9fc;color:var(--crm-text);text-decoration:none}.conversation-item.active{background:#edf3ff}.conversation-item.active:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--crm-blue)}.conversation-copy{min-width:0;flex:1}.conversation-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.conversation-name{font-size:.88rem;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-time{font-size:.66rem;color:var(--crm-muted);white-space:nowrap}.conversation-subject{font-size:.78rem;color:#66788a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}.conversation-preview{font-size:.72rem;color:#95a0ac;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}.conversation-unread{min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--crm-blue);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.62rem;font-weight:700}.messages-main{display:flex;flex-direction:column;min-width:0;background:#fbfcfe}.messages-main-head{min-height:72px;padding:12px 16px;border-bottom:1px solid var(--crm-border);background:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px}.messages-thread{flex:1;max-height:515px;overflow-y:auto;padding:22px 22px 10px}.message-day{text-align:center;font-size:.68rem;color:var(--crm-muted);margin:4px 0 16px}.message-line{display:flex;gap:9px;margin-bottom:15px;align-items:flex-end}.message-line.mine{justify-content:flex-end}.message-bubble{max-width:min(72%,680px);padding:10px 12px;border-radius:13px 13px 13px 4px;background:#fff;border:1px solid var(--crm-border);box-shadow:0 2px 8px rgba(31,48,66,.025)}.message-line.mine .message-bubble{background:#648bea;border-color:#648bea;color:#fff;border-radius:13px 13px 4px 13px}.message-subject{font-size:.69rem;font-weight:700;margin-bottom:4px;opacity:.8}.message-body{font-size:.87rem;white-space:pre-wrap;overflow-wrap:anywhere}.message-meta{font-size:.62rem;margin-top:5px;opacity:.65;text-align:right}.messages-compose{padding:12px 14px;border-top:1px solid var(--crm-border);background:#fff}.messages-compose .form-control{resize:none;min-height:44px}.messages-empty{min-height:620px;display:grid;place-items:center;text-align:center;color:var(--crm-muted)}

/* Client detail */
.client-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px}.client-identity{display:flex;align-items:center;gap:13px;min-width:0}.client-avatar{width:56px;height:56px;border-radius:14px;background:#edf3ff;color:var(--crm-blue);display:grid;place-items:center;font-size:1.3rem;font-weight:750;flex:0 0 auto}.client-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--crm-border)}.client-stat{padding:13px 16px;border-right:1px solid var(--crm-border)}.client-stat:last-child{border-right:0}.client-stat small{display:block;color:var(--crm-muted);font-size:.69rem}.client-stat strong{display:block;margin-top:2px;font-size:.96rem}.client-info-list{display:grid;gap:10px}.client-info-row{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;font-size:.84rem}.client-info-row span:first-child{color:var(--crm-muted)}.client-tabs{display:flex;gap:4px;overflow-x:auto;padding:0 4px;border-bottom:1px solid var(--crm-border)}.client-tabs a{padding:11px 12px;color:#68798a;text-decoration:none;border-bottom:2px solid transparent;white-space:nowrap;font-size:.82rem}.client-tabs a.active{color:#3c64b1;border-bottom-color:var(--crm-blue);font-weight:650}

/* Gateway settings */
.gateway-brand-bar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 16px}.gateway-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.gateway-card{border:1px solid var(--crm-border);border-radius:10px;background:#fff;overflow:hidden}.gateway-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-bottom:1px solid var(--crm-border)}.gateway-title{display:flex;align-items:center;gap:10px;font-weight:700}.gateway-icon{width:34px;height:34px;border-radius:8px;background:#eef3ff;color:#5277d4;display:grid;place-items:center}.gateway-card-body{padding:15px}.gateway-help{font-size:.72rem;color:var(--crm-muted);margin-top:5px}.gateway-savebar{position:sticky;bottom:0;z-index:4;background:rgba(247,249,251,.94);backdrop-filter:blur(8px);border-top:1px solid var(--crm-border);padding:12px 0;margin-top:16px}

/* Dark theme: intentionally brighter text and icons */
[data-bs-theme="dark"]{--crm-text:#e8eef5;--crm-muted:#aeb9c6;--crm-border:#33404d;--crm-bg:#10161d;--crm-surface:#18212b;--crm-soft:#202b36}
[data-bs-theme="dark"] body{background:#10161d!important;color:#e8eef5!important}[data-bs-theme="dark"] .crm-sidebar,[data-bs-theme="dark"] .crm-navbar,[data-bs-theme="dark"] .panel,[data-bs-theme="dark"] .metric-card,[data-bs-theme="dark"] .crm-footer,[data-bs-theme="dark"] .file-card,[data-bs-theme="dark"] .calendar-cell,[data-bs-theme="dark"] .invoice-paper,[data-bs-theme="dark"] .messages-sidebar,[data-bs-theme="dark"] .messages-main-head,[data-bs-theme="dark"] .messages-compose,[data-bs-theme="dark"] .gateway-card{background:#18212b!important;border-color:#33404d!important;color:#e8eef5!important}[data-bs-theme="dark"] .crm-shell,[data-bs-theme="dark"] .dashboard-content,[data-bs-theme="dark"] .messages-main{background:#10161d!important}[data-bs-theme="dark"] .crm-brand-wrap,[data-bs-theme="dark"] .panel-header,[data-bs-theme="dark"] .messages-sidebar-head,[data-bs-theme="dark"] .messages-main-head,[data-bs-theme="dark"] .messages-compose,[data-bs-theme="dark"] .gateway-card-head,[data-bs-theme="dark"] .client-stat-grid,[data-bs-theme="dark"] .client-stat,[data-bs-theme="dark"] .client-tabs{border-color:#33404d!important}[data-bs-theme="dark"] .crm-nav .nav-link,[data-bs-theme="dark"] .nav-sublink,[data-bs-theme="dark"] .crm-nav .nav-icon{color:#c9d3de}[data-bs-theme="dark"] .crm-nav .nav-link:hover,[data-bs-theme="dark"] .nav-sublink:hover{background:#202b36;color:#fff}[data-bs-theme="dark"] .crm-nav .nav-link.active,[data-bs-theme="dark"] .crm-nav .nav-group.open>.nav-group-toggle{color:#fff;background:#587fdc}[data-bs-theme="dark"] .crm-nav .nav-link.active .nav-icon,[data-bs-theme="dark"] .crm-nav .nav-group.open>.nav-group-toggle .nav-icon{color:#fff}[data-bs-theme="dark"] .icon-button,[data-bs-theme="dark"] .profile-button,[data-bs-theme="dark"] .crm-navbar-title{color:#d5dee8}[data-bs-theme="dark"] .icon-button:hover,[data-bs-theme="dark"] .profile-button:hover{background:#202b36;color:#fff}[data-bs-theme="dark"] .profile-copy small,[data-bs-theme="dark"] .text-muted,[data-bs-theme="dark"] .form-text,[data-bs-theme="dark"] .conversation-time,[data-bs-theme="dark"] .conversation-preview,[data-bs-theme="dark"] .client-info-row span:first-child{color:#aeb9c6!important}[data-bs-theme="dark"] .page-heading h1,[data-bs-theme="dark"] h1,[data-bs-theme="dark"] h2,[data-bs-theme="dark"] h3,[data-bs-theme="dark"] h4,[data-bs-theme="dark"] h5,[data-bs-theme="dark"] h6,[data-bs-theme="dark"] strong,[data-bs-theme="dark"] label,[data-bs-theme="dark"] .form-label{color:#edf3f9}[data-bs-theme="dark"] .page-icon,[data-bs-theme="dark"] .gateway-icon,[data-bs-theme="dark"] .client-avatar{background:#233248;color:#9bb9ff}[data-bs-theme="dark"] .table>:not(caption)>*>*{color:#e3ebf3!important;border-color:#33404d!important}[data-bs-theme="dark"] .table thead th{background:#202a35!important;color:#d4dee8!important}[data-bs-theme="dark"] .table tbody tr:hover{background:#1d2732!important}[data-bs-theme="dark"] .table a{color:#8cb6ff}[data-bs-theme="dark"] .form-control,[data-bs-theme="dark"] .form-select{background-color:#111922!important;border-color:#3a4857!important;color:#edf3f9!important}[data-bs-theme="dark"] .form-control::placeholder{color:#8997a6}[data-bs-theme="dark"] .form-select option{background:#18212b;color:#edf3f9}[data-bs-theme="dark"] .btn-light,[data-bs-theme="dark"] .btn-outline-secondary{background:#202b36;border-color:#3a4857;color:#e4ecf4}[data-bs-theme="dark"] .btn-light:hover,[data-bs-theme="dark"] .btn-outline-secondary:hover{background:#283543;color:#fff}[data-bs-theme="dark"] .dropdown-menu,[data-bs-theme="dark"] .list-group-item{background:#18212b;border-color:#33404d;color:#e6eef5}[data-bs-theme="dark"] .dropdown-item{color:#e3ebf3}[data-bs-theme="dark"] .dropdown-item:hover{background:#202b36;color:#fff}[data-bs-theme="dark"] .conversation-item{color:#e3ebf3;border-color:#33404d}[data-bs-theme="dark"] .conversation-item:hover{background:#202b36;color:#fff}[data-bs-theme="dark"] .conversation-item.active{background:#24334a}[data-bs-theme="dark"] .conversation-subject{color:#c3cfdb}[data-bs-theme="dark"] .message-bubble{background:#202b36;border-color:#33404d;color:#edf3f9}[data-bs-theme="dark"] .message-line.mine .message-bubble{background:#587fdc;border-color:#587fdc;color:#fff}[data-bs-theme="dark"] .badge.text-bg-light{background:#202b36!important;color:#e5edf5!important;border-color:#3a4857!important}[data-bs-theme="dark"] .border,[data-bs-theme="dark"] .border-top,[data-bs-theme="dark"] .border-bottom,[data-bs-theme="dark"] .border-start,[data-bs-theme="dark"] .border-end{border-color:#33404d!important}[data-bs-theme="dark"] .header-count{border-color:#18212b}[data-bs-theme="dark"] .brand-switcher .form-select{background-color:#111922!important}[data-bs-theme="dark"] .gateway-savebar{background:rgba(16,22,29,.94);border-color:#33404d}

@media(max-width:1199.98px){.gateway-grid{grid-template-columns:1fr}.client-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.client-stat:nth-child(2){border-right:0}.client-stat:nth-child(-n+2){border-bottom:1px solid var(--crm-border)}}
@media(max-width:991.98px){.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}.messages-shell{grid-template-columns:1fr;min-height:0}.messages-sidebar{border-right:0;border-bottom:1px solid var(--crm-border)}.messages-conversations{max-height:300px}.messages-thread{max-height:480px}.message-bubble{max-width:84%}}
@media(max-width:767.98px){.crm-footer .container-fluid{justify-content:center!important;text-align:center}.client-hero{align-items:flex-start;flex-direction:column}.client-stat-grid{grid-template-columns:1fr 1fr}.client-info-row{grid-template-columns:92px minmax(0,1fr)}.messages-thread{padding:16px 12px 8px}.message-bubble{max-width:90%}.table>:not(caption)>*>*{font-size:.8rem}.profile-button{padding:4px}}
[data-bs-theme="dark"] .crm-footer{color:#bcc7d2!important}[data-bs-theme="dark"] .crm-brand .brand-subtitle{color:#aeb9c6}[data-bs-theme="dark"] .bi{opacity:1}
.crm-rich-editor{border:1px solid var(--bs-border-color);border-radius:.55rem;overflow:hidden;background:var(--bs-body-bg)}
.crm-rich-toolbar{display:flex;gap:.3rem;flex-wrap:wrap;padding:.45rem;border-bottom:1px solid var(--bs-border-color);background:var(--bs-tertiary-bg)}
.crm-rich-toolbar button{border:1px solid var(--bs-border-color);border-radius:.35rem;background:var(--bs-body-bg);color:var(--bs-body-color);padding:.25rem .55rem;font-size:.8rem}
.crm-rich-surface{min-height:130px;padding:.8rem;outline:0;line-height:1.55}
.crm-rich-surface:focus{box-shadow:inset 0 0 0 2px rgba(var(--bs-primary-rgb),.18)}
.brand-record-row>td:first-child{border-left:4px solid var(--record-brand-color,#648bea)}
.crm-chat-launcher{position:fixed;right:22px;bottom:22px;z-index:1050;width:56px;height:56px;border:0;border-radius:50%;background:var(--crm-blue);color:#fff;box-shadow:0 12px 30px rgba(15,23,42,.25);font-size:1.25rem}.crm-chat-launcher span{position:absolute;right:-2px;top:-2px;min-width:20px;height:20px;border-radius:10px;background:#ef4444;font-size:.7rem;display:grid;place-items:center}.crm-chat-widget{position:fixed;right:22px;bottom:88px;z-index:1050;width:min(370px,calc(100vw - 30px));border:1px solid var(--bs-border-color);border-radius:14px;background:var(--bs-body-bg);box-shadow:0 20px 60px rgba(15,23,42,.25);overflow:hidden}.crm-chat-widget-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:var(--crm-blue);color:#fff}.crm-chat-widget-head strong,.crm-chat-widget-head small{display:block}.crm-chat-widget-head small{opacity:.8}.crm-chat-widget-head button{border:0;background:transparent;color:#fff}.crm-chat-widget-actions{display:flex;justify-content:flex-end;gap:8px;padding:0 16px 14px}.crm-chat-page-link{display:flex;justify-content:space-between;padding:11px 16px;border-top:1px solid var(--bs-border-color);text-decoration:none;font-weight:700}
.crm-notes-launcher{position:fixed;right:88px;bottom:27px;z-index:1049;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#f59e0b;color:#fff;text-decoration:none;box-shadow:0 10px 24px rgba(15,23,42,.2)}.crm-notes-launcher:hover{color:#fff;transform:translateY(-1px)}
