.agent-dashboard {
    --dash-text: #182230;
    --dash-muted: #6b7280;
    --dash-border: #e8edf4;
    color: var(--dash-text);
}

.dashboard-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 28px 30px;
    border-radius: 18px;
    background: linear-gradient(125deg, #111c4e 0%, #3048b8 55%, #487fff 100%);
    box-shadow: 0 18px 45px rgba(37, 61, 154, 0.18);
    color: #fff;
}

.dashboard-hero::after {
    position: absolute;
    top: -80px;
    right: -45px;
    width: 250px;
    height: 250px;
    border: 48px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
}

.dashboard-hero>* {
    position: relative;
    z-index: 1;
}

.dashboard-hero h4 {
    margin: 7px 0 6px;
    color: #fff;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.dashboard-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dashboard-eyebrow svg {
    font-size: 1.15rem;
}

.dashboard-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.dashboard-filter-bar label {
    min-width: 150px;
}

.dashboard-filter-bar label span {
    display: block;
    margin: 0 0 5px 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-filter-bar select {
    width: 100%;
    height: 40px;
    padding: 0 34px 0 12px;
    border: 0;
    border-radius: 9px;
    outline: none;
    background-color: #fff;
    color: #25304a;
    font-size: 0.86rem;
}

.dashboard-filter-bar button {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #3048b8;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.dashboard-filter-bar button:hover {
    transform: translateY(-2px);
}

.dashboard-filter-bar button:disabled {
    opacity: 0.7;
}

.dashboard-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid #f5d47e;
    border-radius: 12px;
    background: #fff9e8;
    color: #855d04;
}

.dashboard-notice.is-error {
    border-color: #ffc9c9;
    background: #fff1f1;
    color: #b42318;
}

.dashboard-notice svg {
    flex: 0 0 auto;
    font-size: 1.3rem;
}

.dashboard-notice button {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 700;
}

.dashboard-metric {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(19, 33, 68, 0.045);
}

.dashboard-metric .card-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.dashboard-metric-icon {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    border-radius: 15px;
    font-size: 1.75rem;
}

.dashboard-metric p,
.dashboard-metric h3,
.dashboard-metric small {
    margin: 0;
}

.dashboard-metric p {
    color: var(--dash-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-metric h3 {
    margin: 3px 0 1px;
    color: var(--dash-text);
    font-size: 1.75rem;
}

.dashboard-metric small {
    color: #9aa3b2;
    font-size: 0.72rem;
}

.dashboard-metric-primary .dashboard-metric-icon {
    background: #edf3ff;
    color: #487fff;
}

.dashboard-metric-success .dashboard-metric-icon {
    background: #ebf9f0;
    color: #2e9f5b;
}

.dashboard-metric-warning .dashboard-metric-icon {
    background: #fff5e6;
    color: #e88c17;
}

.dashboard-metric-danger .dashboard-metric-icon {
    background: #fff0ee;
    color: #e35d4d;
}

.dashboard-panel,
.dashboard-contact-card {
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(19, 33, 68, 0.045);
}

.dashboard-panel .card-body {
    padding: 22px;
}

.dashboard-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-panel-heading h6,
.dashboard-table-header h6 {
    margin: 0 0 3px;
    color: var(--dash-text);
    font-size: 1rem;
}

.dashboard-panel-heading p,
.dashboard-table-header p {
    margin: 0;
    color: var(--dash-muted);
    font-size: 0.78rem;
}

.dashboard-panel-heading a {
    color: #487fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.dashboard-chip {
    padding: 5px 9px;
    border-radius: 20px;
    background: #f2f5fa;
    color: #657087;
    font-size: 0.7rem;
    font-weight: 700;
}

.dashboard-team-list {
    display: grid;
    gap: 13px;
    margin-top: 18px;
}

.dashboard-team-list>div {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid #eef1f6;
    border-radius: 13px;
    background: #fbfcfe;
}

.dashboard-team-list>div>span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--team-color) 12%, white);
    color: var(--team-color);
    font-size: 1.45rem;
}

.dashboard-team-list div div {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.dashboard-team-list small {
    color: var(--dash-muted);
    font-weight: 600;
}

.dashboard-team-list strong {
    color: var(--dash-text);
    font-size: 1.35rem;
}

.dashboard-page-header {
    min-height: 76px;
    align-items: flex-start !important;
    margin-bottom: 24px !important;
}

.dashboard-page-header h6 {
    margin-top: 8px !important;
}

.navbar-header {
    position: relative;
    z-index: 20;
}

.navbar-header .dropdown,
.navbar-header .dropdown-menu {
    z-index: 25;
}

.dashboard-main-body:has(.dashboard-admin-filters) {
    position: relative;
    z-index: 1;
}

.dashboard-main-body:has(.dashboard-admin-filters)>.dashboard-page-header {
    padding-right: 530px;
}

.dashboard-admin-filters {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 24px;
    width: auto;
}

.dashboard-admin-filters label {
    min-width: 162px;
}

.dashboard-admin-filters .form-select {
    height: 40px;
}

.dashboard-grid {
    row-gap: 24px;
}

.dashboard-section-title {
    color: #182230;
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-section-subtitle {
    color: #6b7280;
    font-size: 0.8rem;
}

.dashboard-chart-select {
    min-width: 104px;
    height: 36px;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 8px;
    font-size: 0.78rem;
}

.dashboard-empty-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5fb;
    color: #7c8ba4;
    font-size: 1.5rem;
}

.dashboard-stat-card {
    border-top: 3px solid var(--stat-accent);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(19, 33, 68, 0.1);
}

.dashboard-stat-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    font-size: 1.25rem;
}

.dashboard-metric-value {
    color: #182230;
    font-size: 1.75rem;
    line-height: 1.1;
}

.dashboard-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.dashboard-followup-tabs .btn {
    min-width: 82px;
    border-radius: 7px;
    font-size: 0.78rem;
}

.dashboard-empty-state {
    display: flex;
    min-height: 235px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    text-align: center;
}

.dashboard-empty-state>span {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 50%;
    background: #f1f5fb;
    color: #7c8ba4;
    font-size: 1.65rem;
}

.dashboard-empty-state strong {
    color: #374151;
    font-size: 0.92rem;
}

.dashboard-empty-state small {
    max-width: 280px;
    margin-top: 4px;
    color: #8a94a6;
}

.dashboard-reminders .dashboard-empty-state {
    min-height: 260px;
}

.dashboard-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 22px 14px;
}

.dashboard-tabs {
    display: flex;
    gap: 5px;
    padding: 4px;
    border-radius: 10px;
    background: #f3f5f8;
}

.dashboard-tabs button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #697386;
    font-size: 0.75rem;
    font-weight: 700;
}

.dashboard-tabs button span {
    display: grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: #e6eaf0;
    font-size: 0.65rem;
}

.dashboard-tabs button.active {
    background: #fff;
    color: #487fff;
    box-shadow: 0 2px 7px rgba(20, 38, 75, 0.09);
}

.dashboard-tabs button.active span {
    background: #edf3ff;
}

.dashboard-table th {
    padding: 11px 18px;
    border-color: #eef1f5;
    background: #f8fafc;
    color: #7b8495;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-table td {
    padding: 14px 18px;
    border-color: #eef1f5;
    color: #4b5563;
    font-size: 0.79rem;
    white-space: nowrap;
}

.dashboard-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-person>span {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 10px;
    background: #edf3ff;
    color: #487fff;
    font-weight: 800;
}

.dashboard-person strong,
.dashboard-person small {
    display: block;
}

.dashboard-person strong {
    color: #25304a;
}

.dashboard-person small {
    margin-top: 2px;
    color: #929aaa;
    font-size: 0.68rem;
}

.dashboard-status-pill {
    display: inline-block;
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--status-color) 32%, white);
    border-radius: 20px;
    background: color-mix(in srgb, var(--status-color) 10%, white);
    color: var(--status-color);
    font-size: 0.7rem;
    font-weight: 700;
}

.dashboard-reminders {
    display: grid;
    gap: 2px;
}

.dashboard-reminders>div:not(.dashboard-empty-state) {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f5;
}

.dashboard-reminders>div:last-child {
    border-bottom: 0;
}

.dashboard-reminders>div>span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: #fff3e3;
    color: #e78a13;
    font-size: 1.2rem;
}

.dashboard-reminders strong,
.dashboard-reminders small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-reminders strong {
    color: #303a4c;
    font-size: 0.78rem;
}

.dashboard-reminders small {
    margin-top: 3px;
    color: #8b95a5;
    font-size: 0.69rem;
}

.dashboard-reminders time {
    padding: 5px 8px;
    border-radius: 8px;
    background: #f4f6f9;
    color: #6f798b;
    font-size: 0.68rem;
    white-space: nowrap;
}

.dashboard-contact-card {
    overflow: hidden;
    border: 0;
    background: linear-gradient(145deg, #17245c, #3048b8);
    color: #fff;
}

.dashboard-contact-card .card-body {
    padding: 25px;
}

.dashboard-contact-top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-contact-top>span {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.55rem;
    font-weight: 800;
}

.dashboard-contact-top small {
    color: #bfc9f3;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-contact-top h5 {
    margin: 2px 0;
    color: #fff;
}

.dashboard-contact-top p {
    margin: 0;
    color: #c9d1ed;
    font-size: 0.77rem;
}

.dashboard-contact-actions {
    display: grid;
    gap: 9px;
    margin-top: 22px;
}

.dashboard-contact-actions a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.78rem;
    transition: background 0.2s ease;
}

.dashboard-contact-actions a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dashboard-contact-actions svg {
    flex: 0 0 auto;
    font-size: 1.2rem;
}

.dashboard-contact-actions span,
.dashboard-contact-actions small {
    display: block;
}

.dashboard-contact-actions small {
    color: #bfc9f3;
    font-size: 0.65rem;
}

.dashboard-contact-card .dashboard-empty-state strong,
.dashboard-contact-card .dashboard-empty-state small {
    color: #fff;
}

.dashboard-contact-card .dashboard-empty-state>span {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.dashboard-conversations {
    display: grid;
}

.dashboard-conversations>div {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f5;
}

.dashboard-conversations>div:last-child {
    border-bottom: 0;
}

.dashboard-conversations>div>span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: #edf3ff;
    color: #487fff;
    font-size: 1.25rem;
}

.dashboard-conversations strong {
    color: #303a4c;
    font-size: 0.8rem;
}

.dashboard-conversations p {
    overflow: hidden;
    margin: 3px 0 0;
    color: #838da0;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-conversations small {
    color: #9aa3b2;
    font-size: 0.68rem;
    white-space: nowrap;
}

.dashboard-skeleton-card,
.dashboard-skeleton-panel {
    padding: 25px;
    border: 1px solid #e9edf3;
    border-radius: 16px;
    background: #fff;
}

.dashboard-skeleton-card {
    height: 120px;
}

.dashboard-skeleton-card span {
    display: block;
    margin-bottom: 15px;
}

.dashboard-skeleton-panel {
    height: 390px;
}

[data-theme="dark"] .agent-dashboard,
.dark .agent-dashboard {
    --dash-text: #e6eaf0;
    --dash-muted: #aab2c0;
    --dash-border: #313a4d;
}

[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .dashboard-metric,
.dark .dashboard-panel,
.dark .dashboard-metric {
    background: #202838;
}

[data-theme="dark"] .dashboard-team-list>div,
.dark .dashboard-team-list>div {
    border-color: #343e51;
    background: #252e3f;
}

[data-theme="dark"] .dashboard-table th,
.dark .dashboard-table th {
    background: #252e3f;
}

[data-theme="dark"] .dashboard-table td,
[data-theme="dark"] .dashboard-table th,
.dark .dashboard-table td,
.dark .dashboard-table th {
    border-color: #333d50;
}

@media (max-width: 1199px) {
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-filter-bar {
        width: 100%;
    }

    .dashboard-filter-bar label {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .dashboard-hero {
        padding: 22px 18px;
    }

    .dashboard-filter-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .dashboard-filter-bar label {
        min-width: calc(50% - 6px);
    }

    .dashboard-filter-bar button {
        align-self: flex-end;
    }

    .dashboard-table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .dashboard-tabs button {
        flex: 1;
        justify-content: center;
        white-space: nowrap;
    }
}

.point-of-contact {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
}

.point-of-contact__fab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 24px;
    background: #487fff;
    box-shadow: 0 10px 25px rgba(72, 127, 255, 0.3);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.point-of-contact__fab:hover,
.point-of-contact__fab:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(72, 127, 255, 0.4);
}

.point-of-contact__fab svg {
    font-size: 1.35rem;
}

.point-of-contact__popup {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid #e8edf4;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(19, 33, 68, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 180ms ease;
}

.point-of-contact.is-open .point-of-contact__popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.point-of-contact__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: #f7f9fd;
}

.point-of-contact__avatar {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 50%;
    background: #eaf0ff;
    color: #487fff;
    font-size: 1.45rem;
}

.point-of-contact__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #487fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.point-of-contact__header h6,
.point-of-contact__header p {
    margin: 0;
}

.point-of-contact__header h6 {
    color: #182230;
    font-size: 0.95rem;
}

.point-of-contact__header p {
    margin-top: 2px;
    color: #6b7280;
    font-size: 0.76rem;
}

.point-of-contact__close {
    display: grid;
    width: 30px;
    height: 30px;
    margin-left: auto;
    place-items: center;
    border: 0;
    background: transparent;
    color: #7c8ba4;
    font-size: 1.25rem;
}

.point-of-contact__actions {
    display: grid;
    gap: 6px;
    padding: 12px;
}

.point-of-contact__actions a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    color: #344054;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.point-of-contact__actions a:hover,
.point-of-contact__actions a:focus-visible {
    background: #f1f5fb;
    color: #487fff;
}

.point-of-contact__actions a>svg {
    width: 20px;
    flex: 0 0 20px;
    font-size: 1.2rem;
}

.point-of-contact__actions span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.8rem;
}

.point-of-contact__actions small {
    display: block;
    margin-bottom: 2px;
    color: #98a2b3;
    font-size: 0.68rem;
}

@media (max-width: 991px) {
    .dashboard-page-header {
        min-height: 0;
    }

    .dashboard-main-body:has(.dashboard-admin-filters)>.dashboard-page-header {
        padding-right: 0;
    }

    .dashboard-admin-filters {
        position: static;
        width: 100%;
        margin-top: -8px;
        margin-bottom: 20px;
    }

    .dashboard-admin-filters>div {
        justify-content: flex-end !important;
    }

    .dashboard-admin-filters label {
        min-width: calc(50% - 4px);
        flex: 1;
    }
}

@media (max-width: 575px) {
    .dashboard-page-header {
        align-items: center !important;
        margin-bottom: 16px !important;
    }

    .dashboard-page-header h6 {
        margin-top: 0 !important;
    }

    .dashboard-admin-filters>div {
        align-items: stretch !important;
    }

    .dashboard-admin-filters label,
    .dashboard-admin-filters .btn {
        width: 100%;
    }

    .point-of-contact {
        right: 16px;
        bottom: 16px;
    }

    .point-of-contact__fab {
        width: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .point-of-contact__fab span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .point-of-contact__popup {
        right: -4px;
    }

    .dashboard-filter-bar label {
        min-width: 100%;
    }

    .dashboard-filter-bar button {
        width: 100%;
    }

    .dashboard-contact-actions a {
        font-size: 0.7rem;
    }

    .dashboard-reminders>div:not(.dashboard-empty-state) {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .dashboard-reminders time {
        grid-column: 2;
        width: max-content;
    }
}