body {
    background:
        radial-gradient(circle at top left, rgba(12, 86, 208, .08), transparent 32rem),
        linear-gradient(180deg, #fbfbff 0%, #f3f6fb 100%);
    color: #1d2330;
}

.crm-snapshot-card {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-top-color: #e4e7ec !important;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .07), 0 2px 6px rgba(16, 24, 40, .05);
    color: #191b23;
    min-height: 150px;
    overflow: hidden;
    position: relative;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: crmKpiBounceIn .72s cubic-bezier(.2, .78, .2, 1) both;
    will-change: opacity, transform;
}

.crm-snapshot-card::before,
.crm-snapshot-card::after {
    display: none !important;
}

.crm-snapshot-card:hover {
    border-color: #cbd5e8;
    box-shadow: 0 18px 36px rgba(16, 24, 40, .11), 0 4px 10px rgba(16, 24, 40, .08);
    transform: translateY(-2px);
}

.crm-snapshot-blue {
    --kpi-accent: #0052cc;
    --kpi-soft: #eaf2ff;
}

.crm-snapshot-green {
    --kpi-accent: #237d78;
    --kpi-soft: #e5f5f2;
}

.crm-snapshot-gold {
    --kpi-accent: #535f73;
    --kpi-soft: #edf1f7;
}

.crm-snapshot-red {
    --kpi-accent: #a33500;
    --kpi-soft: #fff0e8;
}

.crm-snapshot-body {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    min-height: 112px;
    padding: 18px 12px 12px;
    position: relative;
    z-index: 1;
}

.crm-snapshot-value {
    color: #191b23;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 14px;
}

.crm-snapshot-percent {
    font-size: 18px;
    vertical-align: super;
}

.crm-snapshot-label {
    color: #434654;
    font-size: 14px;
    font-weight: 700;
}

.crm-snapshot-icon {
    align-items: center;
    background: var(--kpi-soft);
    border: 1px solid rgba(115, 118, 133, .08);
    border-radius: 14px;
    color: var(--kpi-accent);
    display: flex;
    font-size: 40px;
    height: 58px;
    justify-content: center;
    line-height: 1;
    opacity: .82;
    position: absolute;
    right: 14px;
    top: 18px;
    transform: none;
    transition: transform .18s ease, opacity .18s ease, background .18s ease;
    width: 58px;
    z-index: 1;
}

.crm-snapshot-card:hover .crm-snapshot-icon {
    opacity: 1;
    transform: translateY(-1px);
}

.crm-snapshot-footer {
    align-items: center;
    background: #f8fafc;
    border-top: 0;
    color: var(--kpi-accent);
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    height: 38px;
    justify-content: flex-start;
    letter-spacing: .02em;
    padding: 0 14px;
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.crm-snapshot-footer:hover {
    background: var(--kpi-soft);
    color: var(--kpi-accent);
}

.crm-snapshot-footer .material-symbols-outlined {
    font-size: 18px;
}

.crm-snapshot-card:nth-child(2) {
    animation-delay: .06s;
}

.crm-snapshot-card:nth-child(3) {
    animation-delay: .12s;
}

.crm-snapshot-card:nth-child(4) {
    animation-delay: .18s;
}

@keyframes crmKpiBounceIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(.97);
    }
    62% {
        opacity: 1;
        transform: translateY(-5px) scale(1.012);
    }
    82% {
        transform: translateY(2px) scale(.996);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.crm-mobile-bottom-nav {
    display: none;
}

.crm-modal-form {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.crm-calendar-summary {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-calendar-summary > div {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
    padding: 16px;
}

.crm-calendar-summary strong {
    color: #003d9b;
    display: block;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 8px;
}

.crm-calendar-summary span {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.crm-calendar-summary .crm-calendar-alert strong {
    color: #a33500;
}

.crm-calendar-toolbar,
.crm-calendar-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.crm-calendar-month {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
}

.crm-calendar-heading {
    background: #f3f3fd;
    border-bottom: 1px solid #e4e7ec;
    color: #434654;
    font-size: 12px;
    font-weight: 800;
    padding: 10px;
    text-transform: uppercase;
}

.crm-calendar-day {
    border-bottom: 1px solid #edf0f5;
    border-right: 1px solid #edf0f5;
    min-height: 132px;
    padding: 10px;
}

.crm-calendar-muted {
    background: #fafbfe;
    color: #98a2b3;
}

.crm-calendar-date {
    color: #1d2330;
    font-weight: 800;
    margin-bottom: 8px;
}

.crm-calendar-event {
    background: #dae2ff;
    border-left: 3px solid #0052cc;
    border-radius: 5px;
    color: #001848;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    overflow: hidden;
    padding: 5px 6px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-calendar-event:hover {
    color: #003d9b;
    filter: brightness(.98);
}

.crm-event-completed {
    background: #d7f4ea;
    border-left-color: #237d78;
}

.crm-event-cancelled {
    background: #ffdad6;
    border-left-color: #ba1a1a;
}

.crm-calendar-more {
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.crm-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-agenda-item {
    align-items: stretch;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-left: 5px solid #0052cc;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
    display: grid;
    gap: 14px;
    grid-template-columns: 96px 1fr auto;
    padding: 14px;
}

.crm-agenda-overdue {
    border-left-color: #a33500;
}

.crm-agenda-time {
    align-items: center;
    background: #f3f3fd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
}

.crm-agenda-time strong,
.crm-agenda-time span {
    display: block;
}

.crm-agenda-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.crm-agenda-title h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.crm-agenda-main p {
    color: #434654;
    margin: 0 0 4px;
}

.crm-agenda-main small {
    color: #667085;
}

.crm-agenda-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.crm-bdo-row {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 128px;
    padding: 10px 8px;
    transition: background .18s ease, border-color .18s ease;
}

.crm-bdo-row:hover {
    background: #f8fbff;
    border-color: #e4ecff;
}

.crm-bdo-row p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-bdo-performance {
    min-width: 0;
}

.crm-bdo-meta {
    align-items: center;
    color: #667085;
    display: flex;
    font-size: 11px;
    font-weight: 800;
    justify-content: space-between;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.crm-bdo-meta strong {
    color: #003d9b;
}

.crm-bdo-track {
    background: #e7eaf2;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.crm-bdo-track i {
    background: linear-gradient(90deg, #0052cc, #12a594);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 8px;
}

.crm-upcoming-panel {
    background: linear-gradient(145deg, #0052cc 0%, #0c56d0 48%, #003d9b 100%);
    border: 1px solid rgba(178, 197, 255, .35);
    box-shadow: 0 16px 32px rgba(0, 61, 155, .24), 0 3px 8px rgba(0, 24, 72, .18);
    color: #ffffff;
}

.crm-upcoming-panel h3,
.crm-upcoming-panel .material-symbols-outlined {
    color: #ffffff;
}

.crm-upcoming-item {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
    color: #ffffff;
    display: block;
    padding: 14px;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.crm-upcoming-item:hover {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .32);
    color: #ffffff;
    transform: translateY(-1px);
}

.crm-upcoming-item p {
    color: rgba(255, 255, 255, .82);
    margin: 0;
}

.crm-upcoming-item .font-label-md {
    color: #ffffff;
    margin: 0;
}

.crm-upcoming-item span {
    background: rgba(218, 226, 255, .22);
    border: 1px solid rgba(218, 226, 255, .25);
    border-radius: 4px;
    color: #dae2ff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    text-transform: uppercase;
}

.crm-upcoming-link {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 8px;
    color: #ffffff;
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-top: 16px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.crm-upcoming-link:hover {
    background: rgba(255, 255, 255, .22);
    color: #ffffff;
}

.crm-page-header,
.bg-white.rounded-xl.border {
    box-shadow: 0 10px 26px rgba(16, 24, 40, .055);
}

.bg-white.rounded-xl.border {
    backdrop-filter: saturate(1.05);
}

.body-content {
    margin-top: 0;
    padding: 24px 15px;
}

.crm-navbar {
    background: #132238;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.crm-footer {
    color: #667085;
    font-size: 13px;
    padding: 28px 0 8px;
}

input,
select,
textarea {
    max-width: none;
}

.crm-page,
.crm-dashboard {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.crm-page-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.crm-page-header h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
}

.crm-page-header p {
    color: #667085;
    margin: 0;
}

.crm-eyebrow {
    color: #0b63ce !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.crm-actions,
.crm-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.crm-kpi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-kpi,
.crm-panel,
.crm-form-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .04);
}

.crm-kpi {
    padding: 18px;
}

.crm-kpi span,
.crm-kpi small {
    color: #667085;
    display: block;
}

.crm-kpi strong {
    display: block;
    font-size: 28px;
    line-height: 1.2;
    margin: 8px 0;
}

.crm-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 2fr 1fr;
}

.crm-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-panel,
.crm-form-card {
    padding: 18px;
}

.crm-panel-wide {
    min-width: 0;
}

.crm-panel-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.crm-panel-header h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.crm-panel-header p,
.crm-panel-header span,
.crm-list-item small,
.crm-table small {
    color: #667085;
}

.crm-pipeline,
.crm-list,
.crm-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-pipeline-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 220px 1fr;
}

.crm-pipeline-row span {
    color: #667085;
    display: block;
    font-size: 13px;
}

.crm-bar {
    align-self: center;
    background: #eef2f7;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.crm-bar i {
    background: linear-gradient(90deg, #0b63ce, #12a594);
    display: block;
    height: 100%;
}

.crm-source-row {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
    margin-bottom: 14px;
}

.crm-source-row .crm-bar,
.crm-source-row small {
    grid-column: 1 / -1;
}

.crm-list-item {
    align-items: center;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    color: #1d2330;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
    text-decoration: none;
}

.crm-list-item:hover {
    background: #f8fbff;
    color: #0b63ce;
}

.crm-list-item strong,
.crm-list-item small {
    display: block;
}

.crm-list-item em,
.crm-badge {
    background: #eaf3ff;
    border-radius: 999px;
    color: #0b63ce;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    padding: 4px 9px;
    white-space: nowrap;
}

.crm-filter-bar {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 190px 220px auto;
    padding: 12px;
}

.crm-table-wrap {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    overflow-x: auto;
}

.crm-table {
    margin: 0;
    min-width: 920px;
}

.crm-table td,
.crm-table th {
    padding: 14px;
    vertical-align: middle;
}

.crm-table td strong,
.crm-table td small,
.crm-table td span {
    display: block;
}

.crm-form-page {
    max-width: 1040px;
}

.crm-form-card {
    padding: 22px;
}

.crm-form-actions {
    border-top: 1px solid #e4e7ec;
    margin-top: 22px;
    padding-top: 18px;
}

.crm-detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}

.crm-definition-list {
    display: grid;
    gap: 12px;
    grid-template-columns: 140px 1fr;
    margin: 0;
}

.crm-definition-list dt {
    color: #667085;
    font-weight: 700;
}

.crm-definition-list dd {
    margin: 0;
}

.crm-stack-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.crm-timeline-item {
    border-left: 3px solid #0b63ce;
    padding-left: 12px;
}

.crm-timeline-item strong,
.crm-timeline-item small {
    display: block;
}

.crm-timeline-item small,
.crm-empty {
    color: #667085;
}

@media (max-width: 992px) {
    .crm-kpi-grid,
    .crm-grid,
    .crm-grid-three,
    .crm-detail-grid,
    .crm-calendar-summary {
        grid-template-columns: 1fr 1fr;
    }

    .crm-filter-bar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .body-content {
        padding: 18px 12px;
    }

    body {
        padding-bottom: 76px;
    }

    .flex.pt-16.h-screen > aside {
        display: none;
    }

    .flex.pt-16.h-screen > main {
        padding: 18px 12px 96px;
    }

    .crm-mobile-bottom-nav {
        align-items: center;
        background: rgba(255, 255, 255, .94);
        border: 1px solid #e4e7ec;
        border-radius: 22px 22px 0 0;
        bottom: 0;
        box-shadow: 0 -14px 32px rgba(16, 24, 40, .14);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        left: 0;
        min-height: 70px;
        padding: 8px 10px 10px;
        position: fixed;
        right: 0;
        z-index: 70;
    }

    .crm-mobile-nav-item,
    .crm-mobile-nav-action {
        align-items: center;
        color: #535f73;
        display: flex;
        flex-direction: column;
        gap: 2px;
        justify-content: center;
        min-width: 0;
        position: relative;
        text-decoration: none;
    }

    .crm-mobile-nav-item .material-symbols-outlined {
        font-size: 24px;
    }

    .crm-mobile-nav-item small {
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
    }

    .crm-mobile-nav-item:hover {
        color: #003d9b;
    }

    .crm-mobile-nav-action {
        background: linear-gradient(135deg, #0052cc, #003d9b);
        border: 4px solid #ffffff;
        border-radius: 999px;
        box-shadow: 0 10px 20px rgba(0, 61, 155, .28);
        color: #ffffff;
        height: 56px;
        justify-self: center;
        margin-top: -28px;
        width: 56px;
    }

    .crm-mobile-nav-action .material-symbols-outlined {
        font-size: 30px;
    }

    .crm-mobile-nav-alert::after {
        background: #ba1a1a;
        border: 2px solid #ffffff;
        border-radius: 999px;
        content: "";
        height: 10px;
        position: absolute;
        right: 22%;
        top: 5px;
        width: 10px;
    }

    .crm-page-header,
    .crm-panel-header {
        flex-direction: column;
    }

    .crm-kpi-grid,
    .crm-grid,
    .crm-grid-three,
    .crm-detail-grid,
    .crm-filter-bar,
    .crm-pipeline-row,
    .crm-definition-list,
    .crm-calendar-summary,
    .crm-calendar-month,
    .crm-agenda-item {
        grid-template-columns: 1fr;
    }

    .crm-calendar-heading {
        display: none;
    }

    .crm-calendar-day {
        min-height: auto;
    }

    .crm-agenda-actions {
        justify-content: flex-start;
    }

    .crm-bdo-row {
        grid-template-columns: 1fr;
    }

    .crm-actions,
    .crm-form-actions {
        width: 100%;
    }

    .crm-actions .btn,
    .crm-form-actions .btn,
    .crm-filter-bar .btn {
        width: 100%;
    }
}
