body {
    background: #eef2f6;
    color: #1f2933;
    font-size: 14px;
}

body.modal-open {
    overflow: hidden;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #172033, #32465f);
}

.login-card {
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.navbar .nav-link {
    font-size: 13px;
    padding-left: 9px;
    padding-right: 9px;
}

.navbar-brand {
    font-size: 16px;
    letter-spacing: 0;
}

.dropdown-menu {
    border-radius: 8px;
    border-color: #dfe5ec;
    box-shadow: 0 10px 30px rgba(20, 31, 46, .14);
}

.dropdown-item {
    font-size: 14px;
    padding: 8px 14px;
}

.page-head h1,
.panel h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.panel {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(20, 31, 46, .05);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.panel-title h2 {
    font-size: 16px;
}

.panel-title a {
    color: #40648f;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.metric {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 13px 14px;
    min-height: 104px;
    box-shadow: 0 1px 3px rgba(20, 31, 46, .04);
}

.metric span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.metric strong {
    font-size: 24px;
    line-height: 1;
}

.metric small {
    display: block;
    color: #687789;
    font-size: 12px;
    line-height: 1.25;
    margin-top: 8px;
}

.metric-danger {
    border-color: #f1c7c7;
    background: #fffafa;
}

.dashboard-head {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 12px 14px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dashboard-grid .table {
    margin-bottom: 0;
}

.dashboard-grid .table th {
    color: #66768a;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.funnel-list,
.compact-list,
.lead-feed,
.kpi-stack {
    display: grid;
    gap: 8px;
}

.funnel-row {
    border-bottom: 1px solid #edf1f5;
    padding-bottom: 8px;
}

.funnel-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mini-bar {
    background: #edf2f7;
    border-radius: 999px;
    height: 7px;
    margin-top: 7px;
    overflow: hidden;
}

.mini-bar i {
    background: #2f6fed;
    display: block;
    height: 100%;
}

.compact-row {
    align-items: center;
    border-bottom: 1px solid #edf1f5;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto auto;
    padding: 8px 0;
}

.compact-row:last-child {
    border-bottom: 0;
}

.compact-row em {
    color: #687789;
    font-size: 12px;
    font-style: normal;
}

.compact-row.muted {
    color: #687789;
}

.kpi-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-stack div {
    background: #f7f9fb;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    padding: 11px;
}

.kpi-stack span {
    color: #64748b;
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

.kpi-stack strong {
    font-size: 18px;
}

.lead-feed-item {
    align-items: center;
    border-bottom: 1px solid #edf1f5;
    color: inherit;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 8px 0;
    text-decoration: none;
}

.lead-feed-item:last-child {
    border-bottom: 0;
}

.lead-feed-item small {
    color: #687789;
    display: block;
    font-size: 12px;
    margin-top: 3px;
}

.empty-state {
    color: #687789;
    font-size: 13px;
    padding: 18px 0;
    text-align: center;
}

.response {
    border-left: 4px solid #2f6fed;
    background: #eef4ff;
    padding: 12px;
    border-radius: 4px;
}

.table > :not(caption) > * > * {
    padding: 8px 10px;
    vertical-align: middle;
}

.progress {
    min-width: 120px;
}

.modal.crm-modal-open {
    display: block;
    background: rgba(0, 0, 0, .18);
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 1;
    z-index: 1055;
}

.crm-modal-backdrop {
    z-index: 1040;
}

.modal.crm-modal-open .modal-dialog {
    z-index: 1055;
}

@media (max-width: 720px) {
    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .page-head .btn {
        width: 100%;
    }

    .quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .quick-actions .btn {
        width: 100%;
    }

    .kpi-stack,
    .compact-row {
        grid-template-columns: 1fr;
    }
}
