:root {
    --ib-primary: #0d6efd;
    --ib-primary-soft: #eaf2ff;
    --ib-accent: #f5a400;
    --ib-sidebar: #0b1f3a;
    --ib-sidebar-soft: #132b4b;
    --ib-sidebar-hover: #183657;
    --ib-page: #f8f9fc;
    --ib-text: #172033;
    --ib-muted: #667085;
    --ib-line: #e6e9ef;
    --ib-line-strong: #d8dee8;
    --ib-shadow: 0 1px 2px rgba(15, 23, 42, .06);
    --ib-radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background: var(--ib-page);
    color: var(--ib-text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 1.45;
    overflow-x: hidden;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.btn {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    justify-content: center;
    line-height: 1.25;
    min-height: 36px;
    padding: .45rem .78rem;
}

.btn-sm {
    border-radius: 6px;
    font-size: 12px;
    min-height: 30px;
    padding: .3rem .55rem;
}

.badge {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    padding: .35em .62em;
}

.form-label {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: .35rem;
}

.form-control,
.form-select {
    border-color: #d8dee8;
    border-radius: 7px;
    color: var(--ib-text);
    font-size: 14px;
    min-height: 38px;
}

.form-control:focus,
.form-select:focus {
    border-color: #8bb8ff;
    box-shadow: 0 0 0 .18rem rgba(13, 110, 253, .12);
}

.invalid-feedback,
.text-danger {
    font-size: 12px;
}

.table {
    color: var(--ib-text);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: .58rem .62rem;
}

.table-responsive {
    border-radius: var(--ib-radius);
}

.card {
    border-color: var(--ib-line);
    border-radius: var(--ib-radius);
    box-shadow: var(--ib-shadow);
}

.card-body {
    padding: 18px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: 0;
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    width: 100%;
}

.sidebar-overlay {
    background: rgba(15, 23, 42, .56);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 1030;
}

.sidebar-close,
.sidebar-toggle {
    align-items: center;
    border: 1px solid var(--ib-line);
    border-radius: 7px;
    display: inline-flex;
    justify-content: center;
}

.sidebar-close {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 24px;
    height: 34px;
    line-height: 1;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
}

.sidebar-toggle {
    background: #fff;
    flex: 0 0 38px;
    height: 38px;
    padding: 0;
    position: relative;
    width: 38px;
}

.sidebar-toggle span {
    background: var(--ib-sidebar);
    border-radius: 999px;
    display: block;
    height: 2px;
    position: absolute;
    width: 17px;
}

.sidebar-toggle span:nth-child(1) {
    transform: translateY(-6px);
}

.sidebar-toggle span:nth-child(3) {
    transform: translateY(6px);
}

.sidebar {
    background: var(--ib-sidebar);
    color: #fff;
    padding: 18px 14px;
    position: relative;
}

.brand {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    min-width: 0;
}

.brand img {
    background: #fff;
    border-radius: 7px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    padding: 5px;
    width: 42px;
}

.brand span {
    display: block;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    min-width: 0;
}

.user-box {
    background: var(--ib-sidebar-soft);
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 11px 12px;
}

.user-box strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-box span {
    color: #cbd5e1;
    display: block;
    font-size: 12px;
    margin-top: 3px;
}

.menu {
    display: grid;
    gap: 4px;
}

.menu a {
    align-items: center;
    border-left: 0;
    border-radius: 7px;
    color: #d7dee9;
    display: flex;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    min-height: 36px;
    padding: 8px 11px;
    position: relative;
    text-decoration: none;
}

.menu a::before {
    background: rgba(255, 255, 255, .72);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 6px;
    margin-right: 9px;
    opacity: .5;
    transition: opacity .15s ease, background-color .15s ease;
    width: 6px;
}

.menu a:hover {
    background: var(--ib-sidebar-hover);
    color: #fff;
}

.menu a:hover::before {
    opacity: .9;
}

.menu a.active {
    background: var(--ib-accent);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.menu a.active::before {
    background: #fff;
    opacity: 1;
}

.content {
    min-width: 0;
    padding: 20px 22px;
    width: 100%;
}

.topbar {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ib-line);
    border-radius: var(--ib-radius);
    box-shadow: var(--ib-shadow);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 14px 16px;
}

.topbar-title {
    align-items: center;
    display: flex;
    gap: 11px;
    min-width: 0;
}

.topbar-title img {
    height: 38px;
    flex: 0 0 38px;
    object-fit: contain;
    width: 38px;
}

.topbar-title span {
    color: var(--ib-primary);
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 1px;
}

.topbar-title > div {
    min-width: 0;
}

.topbar h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.18;
    margin: 0;
}

.topbar p {
    color: var(--ib-muted);
    font-size: 14px;
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.topbar-actions {
    align-items: center;
    display: flex;
    gap: 9px;
}

.global-search {
    min-width: 280px;
    width: min(36vw, 420px);
}

.notification-btn {
    align-items: center;
    background: #fff8e5;
    border: 1px solid #fde68a;
    border-radius: 7px;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.notification-dot {
    background: var(--ib-accent);
    border-radius: 999px;
    box-shadow: 0 0 0 6px rgba(245, 164, 0, .16);
    display: block;
    height: 10px;
    width: 10px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--ib-line);
    border-radius: var(--ib-radius);
    box-shadow: var(--ib-shadow);
    min-height: 112px;
    padding: 17px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.stat-card span {
    color: var(--ib-muted);
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-card strong {
    color: var(--ib-primary);
    font-size: 30px;
    font-weight: 600;
    line-height: 1;
}

.stat-card:hover {
    border-color: #c8d7f0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
    transform: translateY(-1px);
}

.crm-card {
    border: 1px solid var(--ib-line);
    border-radius: var(--ib-radius);
    box-shadow: var(--ib-shadow);
}

.crm-card .card-title,
.crm-card h2.h5,
.crm-card h2.h6,
.crm-card h3.h6 {
    font-size: 15px;
    font-weight: 600;
}

.app-footer {
    align-items: center;
    border-top: 1px solid var(--ib-line);
    color: var(--ib-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 8px;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 18px;
}

.app-footer a {
    color: var(--ib-primary);
    font-weight: 600;
    text-decoration: none;
}

.crm-table {
    font-size: 13px;
    table-layout: fixed;
    width: 100%;
}

.crm-table thead th {
    background: #f4f6fa;
    border-bottom: 1px solid var(--ib-line);
    color: var(--ib-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    padding: 9px 7px;
    text-transform: uppercase;
}

.crm-table tbody td {
    border-color: #eef2f6;
    min-width: 0;
    padding: 8px 7px;
    vertical-align: middle;
}

.crm-table tbody tr:hover {
    background: #f8fbff;
}

.crm-truncate {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-line-clamp {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    font-size: 11px;
    line-height: 1.25;
    max-height: 28px;
    max-width: 100%;
    overflow: hidden;
    word-break: break-word;
}

.crm-badge {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.crm-mobile-list {
    display: grid;
    gap: 12px;
}

.crm-mobile-card {
    background: #fff;
    border: 1px solid var(--ib-line);
    border-radius: var(--ib-radius);
    box-shadow: var(--ib-shadow);
    font-size: 13px;
    padding: 12px;
    width: 100%;
}

.crm-mobile-card *,
.mobile-record-card * {
    max-width: 100%;
}

.min-w-0 {
    min-width: 0;
}

.crm-mobile-card dl {
    display: grid;
    gap: 8px;
    grid-template-columns: 118px minmax(0, 1fr);
    margin: 12px 0 0;
}

.crm-mobile-card dt {
    color: var(--ib-muted);
    font-weight: 600;
}

.crm-mobile-card dd {
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

.crm-mobile-card dd .badge,
.mobile-record-card dd .badge {
    display: inline-flex;
    width: auto;
}

.data-records-table-wrap {
    overflow-x: hidden;
}

.crm-table .crm-col-lead {
    width: 24%;
}

.crm-table .crm-col-contact {
    width: 94px;
}

.crm-table .crm-col-category-area {
    width: 22%;
}

.crm-table .crm-col-source {
    width: 72px;
}

.crm-table .crm-col-assigned {
    width: 10%;
}

.crm-table .crm-col-status {
    width: 78px;
}

.crm-table .crm-col-date {
    width: 76px;
}

.crm-table .crm-col-actions {
    width: 116px;
}

.crm-table .btn-group .btn {
    font-size: 11px;
    padding: .2rem .38rem;
}

.upload-zone {
    align-items: center;
    background: #f8fbff;
    border: 2px dashed #b9cbea;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-height: 190px;
    padding: 24px;
    text-align: center;
}

.upload-zone:hover {
    background: #eff6ff;
    border-color: var(--ib-primary);
}

.upload-zone input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.upload-icon {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ib-line);
    border-radius: 999px;
    color: var(--ib-primary);
    display: inline-flex;
    font-size: 28px;
    font-weight: 600;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.summary-tile {
    background: #f8fafc;
    border: 1px solid var(--ib-line);
    border-radius: var(--ib-radius);
    padding: 13px;
}

.summary-tile span {
    color: var(--ib-muted);
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.summary-tile strong {
    color: var(--ib-text);
    display: block;
    font-size: 26px;
    font-weight: 600;
}

.summary-tile.success strong {
    color: #198754;
}

.summary-tile.warning strong {
    color: #b7791f;
}

.summary-tile.danger strong {
    color: #dc3545;
}

.report-list {
    display: grid;
    gap: 8px;
}

.report-list div {
    background: #f8fafc;
    border: 1px solid var(--ib-line);
    border-radius: 8px;
    padding: 10px;
}

.report-list span {
    color: var(--ib-muted);
    display: block;
    font-size: 13px;
}

.empty-state {
    align-items: center;
    background: #fff;
    border: 1px dashed #b9cbea;
    border-radius: var(--ib-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 260px;
    padding: 28px;
    text-align: center;
}

.empty-state.compact {
    min-height: 180px;
}

.empty-state img {
    height: 58px;
    margin-bottom: 12px;
    object-fit: contain;
    width: 58px;
}

.empty-state h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--ib-muted);
    margin: 0;
}

.mobile-records {
    display: grid;
    gap: 12px;
}

.mobile-record-card {
    border: 1px solid var(--ib-line);
    border-radius: 8px;
    font-size: 13px;
    padding: 12px;
    width: 100%;
}

.mobile-record-card span {
    color: var(--ib-muted);
    display: block;
    font-size: 13px;
    margin-top: 3px;
}

.mobile-record-card dl {
    display: grid;
    gap: 8px;
    grid-template-columns: 110px minmax(0, 1fr);
    margin: 12px 0 0;
}

.mobile-record-card dt {
    color: var(--ib-muted);
    font-weight: 600;
}

.mobile-record-card dd {
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

.record-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: 150px minmax(0, 1fr);
    margin: 0;
}

.record-summary dt {
    color: var(--ib-muted);
    font-weight: 600;
}

.record-summary dd {
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

.calling-data-list .card-body {
    overflow-x: hidden;
}

.calling-data-table {
    font-size: 13px;
    table-layout: fixed;
}

.calling-data-table thead th {
    background: #f4f6fa;
    border-bottom: 1px solid var(--ib-line);
    color: var(--ib-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    padding: 9px 8px;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

.calling-data-table tbody td {
    border-color: #eef2f6;
    padding: 8px;
    vertical-align: middle;
}

.calling-data-table tbody tr {
    transition: background-color .15s ease, box-shadow .15s ease;
}

.calling-data-table tbody tr:hover {
    background: #f8fbff;
    box-shadow: inset 3px 0 0 var(--ib-primary);
}

.calling-data-table .cell-check {
    text-align: center;
    width: 36px;
}

.calling-data-table .cell-lead {
    width: 18%;
}

.calling-data-table .cell-contact {
    white-space: nowrap;
    width: 12%;
}

.calling-data-table .cell-meta {
    min-width: 0;
    width: 15%;
}

.calling-data-table .cell-status {
    width: 11%;
}

.calling-data-table .cell-date {
    color: var(--ib-muted);
    font-weight: 600;
    white-space: nowrap;
    width: 82px;
}

.calling-data-table .cell-actions {
    width: 118px;
}

.lead-name {
    color: var(--ib-text);
    font-weight: 600;
    line-height: 1.25;
}

.lead-company {
    color: var(--ib-muted);
    font-size: 12px;
    line-height: 1.3;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-link {
    color: var(--ib-text);
    font-weight: 600;
    text-decoration: none;
}

.contact-link:hover {
    color: var(--ib-text);
    text-decoration: none;
}

.category-badge {
    border: 1px solid var(--ib-line);
    color: var(--ib-text);
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.area-clamp {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ib-muted);
    display: -webkit-box;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 4px;
    max-height: 34px;
    overflow: hidden;
    word-break: break-word;
}

.source-badge {
    margin-top: 4px;
}

.action-stack {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.calling-data-table .action-stack .btn {
    min-width: 112px;
    width: auto;
}

.assign-inline {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.assign-inline .form-select {
    min-width: 0;
}

.calling-data-mobile .mobile-record-card {
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 12px 14px;
}

.mobile-record-head {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.mobile-record-head strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.mobile-card-actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.mobile-card-actions .btn {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
}

.calling-data-mobile .mobile-card-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

.calling-data-mobile .mobile-card-actions .btn {
    background: var(--ib-primary) !important;
    border-color: var(--ib-primary) !important;
    color: #fff !important;
    display: inline-flex !important;
    flex: 0 0 auto;
    min-height: 36px;
    min-width: 132px;
    padding: .45rem .85rem;
    text-align: center;
    text-indent: 0;
    white-space: nowrap;
    width: auto;
}

.mobile-card-actions .btn-outline-primary {
    color: var(--ib-primary);
}

.mobile-card-actions .btn-outline-danger {
    color: #dc3545;
}

.mobile-card-actions .btn-outline-secondary {
    color: #6c757d;
}

.mobile-card-actions .btn-outline-success {
    color: #198754;
}

.mobile-card-actions form {
    margin: 0;
    min-width: 0;
    width: 100%;
}

.mobile-assign-form {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
}

.report-mobile-card dl {
    gap: 7px 10px;
    grid-template-columns: 112px minmax(0, 1fr);
    margin-top: 10px;
}

.report-mobile-card dt {
    font-size: 12px;
    line-height: 1.25;
}

.report-mobile-card dd {
    color: var(--ib-text);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.report-card-title {
    color: var(--ib-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    min-width: 0;
}

.report-card-badge {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.2;
}

.required-follow-up .form-label::after {
    color: #dc3545;
    content: " *";
}

.timeline {
    display: grid;
    gap: 16px;
}

.timeline-item {
    display: grid;
    gap: 12px;
    grid-template-columns: 18px minmax(0, 1fr);
}

.timeline-point {
    background: var(--ib-primary);
    border: 3px solid #dbeafe;
    border-radius: 999px;
    height: 18px;
    margin-top: 4px;
    width: 18px;
}

.timeline-content {
    border: 1px solid var(--ib-line);
    border-radius: var(--ib-radius);
    padding: 14px;
    background: #fff;
}

.timeline-meta {
    color: var(--ib-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 13px;
}

.follow-up-card.is-overdue {
    border-color: #dc3545;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, .12);
}

.priority-low {
    background: #e7f5ff;
    color: #0b5bbb;
}

.priority-medium {
    background: #eef2ff;
    color: #4338ca;
}

.priority-high {
    background: #fff3cd;
    color: #997404;
}

.priority-urgent {
    background: #f8d7da;
    color: #842029;
}

.status-badge {
    color: #fff;
}

.status-pending {
    background: #6c757d;
}

.status-called {
    background: #0dcaf0;
}

.status-interested {
    background: #198754;
}

.status-follow-up {
    background: #0d6efd;
}

.status-not-interested {
    background: #6c757d;
}

.status-lead-capture {
    background: #6f42c1;
}

.status-sales-done {
    background: #20c997;
}

.notification-btn {
    position: relative;
    text-decoration: none;
}

.notification-count {
    align-items: center;
    background: #dc3545;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 600;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: -8px;
    top: -8px;
}

.mini-list {
    display: grid;
    gap: 10px;
}

.mini-list a {
    border: 1px solid var(--ib-line);
    border-radius: var(--ib-radius);
    color: var(--ib-text);
    padding: 10px 11px;
    text-decoration: none;
}

.mini-list a:hover {
    border-color: var(--ib-primary);
    background: #f8fbff;
}

.mini-list span {
    color: var(--ib-muted);
    display: block;
    font-size: 13px;
    margin-top: 3px;
}

.login-page {
    background: linear-gradient(135deg, #edf4ff, #f8f9fc);
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: #fff;
    border: 1px solid var(--ib-line);
    border-radius: 10px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .12);
    margin: 7vh auto 0;
    max-width: 440px;
    padding: 28px;
}

.login-logo {
    display: block;
    height: 74px;
    margin: 0 auto 12px;
    object-fit: contain;
    width: 74px;
}

.company-name {
    color: var(--ib-primary);
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    text-align: center;
    text-transform: uppercase;
}

.login-card h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 6px 0 8px;
    text-align: center;
}

.login-card p {
    color: var(--ib-muted);
    margin-bottom: 22px;
    text-align: center;
}

@media (max-width: 991.98px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        bottom: 0;
        box-shadow: 18px 0 40px rgba(15, 23, 42, .26);
        left: 0;
        max-width: calc(100vw - 54px);
        overflow-y: auto;
        padding: 58px 14px 18px;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: 292px;
        z-index: 1040;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .content {
        padding: 14px;
        width: 100%;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .topbar-title {
        align-items: flex-start;
        width: 100%;
    }

    .topbar-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        justify-content: space-between;
        width: 100%;
    }

    .global-search {
        min-width: 0;
        width: 100%;
    }

    .table-responsive {
        max-width: 100%;
        overflow-x: hidden;
    }

    .table {
        table-layout: fixed;
        width: 100%;
    }

    .table th,
    .table td {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .crm-mobile-list,
    .mobile-records,
    .calling-data-mobile {
        max-width: 100%;
        overflow-x: hidden;
        width: 100%;
    }

    .content .card,
    .content .crm-card,
    .content .card-body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .content form.row {
        margin-left: 0;
        margin-right: 0;
    }

    .content form.row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .mobile-assign-form {
        grid-template-columns: 1fr;
    }

    .mobile-assign-form .btn,
    .mobile-assign-form .form-select {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 13px;
    }

    .brand span {
        font-size: 15px;
    }

    .topbar-title {
        align-items: flex-start;
    }

    .topbar-title img {
        height: 38px;
        width: 38px;
    }

    .topbar h1 {
        font-size: 21px;
    }

    .topbar p {
        font-size: 13px;
    }

    .topbar-actions {
        align-items: stretch;
        grid-template-columns: 1fr auto;
    }

    .global-search {
        grid-column: 1 / -1;
        min-width: 100%;
    }

    .topbar-actions form:not(.global-search) {
        min-width: 0;
    }

    .card-body {
        padding: 15px;
    }

    .stat-card {
        min-height: 96px;
        padding: 15px;
    }

    .stat-card strong {
        font-size: 27px;
    }

    .mobile-record-card dl,
    .crm-mobile-card dl,
    .record-summary {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .report-mobile-card dl {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .content .col-12.d-flex.flex-wrap.gap-2 .btn,
    .content .col-12 .d-flex.flex-wrap.gap-2 .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .content .btn {
        white-space: normal;
    }

    .modal-dialog {
        margin-left: 12px;
        margin-right: 12px;
    }

    .login-card {
        margin-top: 4vh;
        padding: 22px;
    }
}
