.stats-grid {
display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-grid {
display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr);
    align-items: start;
    gap: 18px;
}

.activity-placeholder {
display: flex;
    height: 270px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: linear-gradient( to top, transparent 24%, #e8edf4 25%, transparent 26% ), linear-gradient( to top, transparent 49%, #e8edf4 50%, transparent 51% ), linear-gradient( to top, transparent 74%, #e8edf4 75%, transparent 76% );
    border-radius: 9px;
}

@media (max-width: 1100px) {
.stats-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid {
grid-template-columns: 1fr;
}
}

@media (max-width: 650px) {
.stats-grid {
grid-template-columns: 1fr;
        gap: 13px;
}
}

.dashboard-notice {
display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.dashboard-notice svg {
width: 20px;
        height: 20px;
        flex: 0 0 20px;
}

.dashboard-notice-error {
color: #912018;
    background: #fff3f2;
    border: 1px solid #fecdca;
}

.dashboard-notice-error div div {
margin-top: 2px;
        font-size: 12px;
        color: #b42318;
}

.activity-empty-state {
display: flex;
    min-height: 255px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: #475467;
    background: linear-gradient( to top, transparent 24%, #edf1f6 25%, transparent 26% ), linear-gradient( to top, transparent 49%, #edf1f6 50%, transparent 51% ), linear-gradient( to top, transparent 74%, #edf1f6 75%, transparent 76% );
    border-radius: 10px;
}

.activity-empty-state strong {
margin-top: 13px;
        font-size: 14px;
        color: #344054;
}

.activity-empty-state > span {
max-width: 360px;
        margin-top: 5px;
        font-size: 12px;
        color: var(--muted);
}

.dashboard-agents-panel {
margin-top: 18px;
}

.dashboard-table-wrapper {
overflow-x: auto;
}

.dashboard-table {
width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.dashboard-table th {
padding: 11px 12px;
        font-size: 11px;
        font-weight: 600;
        color: #667085;
        text-align: left;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        background: #f8fafc;
        border-top: 1px solid #eaecf0;
        border-bottom: 1px solid #eaecf0;
}

.dashboard-table td {
padding: 14px 12px;
        font-size: 12px;
        color: #475467;
        border-bottom: 1px solid #eef1f5;
}

.dashboard-table tbody tr:last-child td {
border-bottom: 0;
}

.dashboard-table tbody tr:hover {
background: #fbfcfe;
}

.computer-cell {
display: flex;
    align-items: center;
    gap: 11px;
}

.computer-cell strong {
display: block;
        font-size: 12px;
        font-weight: 600;
        color: #344054;
}

.computer-cell small {
display: block;
        margin-top: 2px;
        font-size: 10px;
        color: #98a2b3;
}

.computer-icon {
display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    color: #175cd3;
    background: #eff8ff;
    border-radius: 9px;
}

.computer-icon svg {
width: 17px;
        height: 17px;
}

@media (max-width: 650px) {
.dashboard-agents-panel {
margin-top: 13px;
}
}

.activity-chart-container {
position: relative;
    width: 100%;
    height: 285px;
}

.dashboard-grid {
display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    align-items: start;
    gap: 18px;
}

.dashboard-agents-panel {
width: 100%;
    margin-top: 0;
}

.dashboard-main-column,
.dashboard-side-panels {
display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 18px;
}

.dashboard-usage-insights {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 18px;
}

@media (max-width: 1100px) {
.dashboard-grid {
grid-template-columns: 1fr;
}
}

.top-applications-list {
display: flex;
    flex-direction: column;
    gap: 16px;
}

.top-application-item {
min-width: 0;
}

.top-application-heading {
display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.top-application-heading strong {
flex-shrink: 0;
        font-size: 11px;
        font-weight: 600;
        color: #475467;
}

.top-application-name {
display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.top-application-name > span:last-child {
overflow: hidden;
        font-size: 12px;
        font-weight: 500;
        color: #344054;
        text-overflow: ellipsis;
        white-space: nowrap;
}

.application-progress {
height: 6px;
    overflow: hidden;
    background: #edf1f5;
    border-radius: 10px;
}

.application-progress-value {
height: 100%;
    min-width: 3px;
    background: linear-gradient( 90deg, #2d83ce 0%, #5aa9e6 100% );
    border-radius: 10px;
}

.applications-empty-state {
display: flex;
    min-height: 125px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    font-size: 12px;
    color: #667085;
    text-align: center;
    background: #fafbfc;
    border: 1px dashed #d7dee8;
    border-radius: 9px;
}

.applications-empty-state svg {
width: 23px;
        height: 23px;
        color: #98a2b3;
}

@media (max-width: 1100px) {
.dashboard-side-panels {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (max-width: 700px) {
.dashboard-side-panels {
grid-template-columns: 1fr;
}
}

.activity-summary-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.activity-summary-pills span {
    padding: 6px 9px;
    font-size: 10px;
    color: #667085;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.activity-summary-pills strong {
    margin-left: 4px;
    color: #344054;
}

.hourly-activity-chart {
    position: relative;
    display: grid;
    height: 285px;
    padding: 18px 8px 0;
    grid-template-columns: repeat(24, minmax(8px, 1fr));
    gap: 4px;
    border-bottom: 1px solid #d0d5dd;
}

.daily-activity-chart {
    position: relative;
    display: grid;
    height: 285px;
    padding: 18px 8px 0;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 1px solid #d0d5dd;
}

.hourly-chart-gridlines {
    position: absolute;
    inset: 18px 8px 29px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.hourly-chart-gridlines span {
    width: 100%;
    border-top: 1px dashed #e4e7ec;
}

.hourly-bar-column {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.hourly-bar-track {
    display: flex;
    height: 237px;
    align-items: flex-end;
    justify-content: center;
}

.hourly-bar-value {
    width: min(100%, 22px);
    min-height: 0;
    background: #dbe8f5;
    border-radius: 5px 5px 2px 2px;
    transition: filter 0.15s ease;
}

.hourly-bar-value.has-activity {
    min-height: 4px;
    background: linear-gradient(180deg, #2d83ce 0%, #75b6ea 100%);
}

.hourly-bar-column:hover .hourly-bar-value.has-activity {
    filter: brightness(0.92);
}

.hourly-bar-label {
    display: block;
    height: 29px;
    padding-top: 8px;
    overflow: visible;
    font-size: 9px;
    color: #667085;
    text-align: center;
    white-space: nowrap;
}

.dashboard-table {
    min-width: 920px;
}

.dashboard-employee-cell {
    display: flex;
    min-width: 175px;
    align-items: center;
    gap: 10px;
}

.dashboard-employee-avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #175cd3;
    background: #eff8ff;
    border-radius: 50%;
}

.dashboard-employee-cell strong,
.dashboard-time-value {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #344054;
}

.dashboard-employee-cell small,
.dashboard-time-detail {
    display: block;
    max-width: 210px;
    margin-top: 2px;
    overflow: hidden;
    font-size: 10px;
    color: #98a2b3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.computer-drilldown {
    position: relative;
    min-width: 125px;
}

.computer-drilldown summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    color: #175cd3;
    cursor: pointer;
    background: #eff8ff;
    border-radius: 7px;
    list-style: none;
}

.computer-drilldown summary::-webkit-details-marker {
    display: none;
}

.computer-drilldown summary svg {
    width: 13px;
    height: 13px;
}

.computer-drilldown summary svg:last-child {
    transition: transform 0.15s ease;
}

.computer-drilldown[open] summary svg:last-child {
    transform: rotate(180deg);
}

.computer-drilldown ul {
    min-width: 190px;
    padding: 8px 10px 8px 26px;
    margin: 6px 0 0;
    color: #344054;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.computer-drilldown li + li {
    margin-top: 5px;
}

.unmapped-badge {
    display: inline-block;
    padding: 5px 8px;
    font-size: 10px;
    color: #667085;
    background: #f2f4f7;
    border-radius: 7px;
}

@media (max-width: 700px) {
    .activity-summary-pills {
        width: 100%;
        justify-content: flex-start;
    }

    .hourly-activity-chart {
        gap: 2px;
    }
}

/* Compact commercial dashboard layout */
.dashboard-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-summary-row .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 0;
}

.dashboard-summary-row .stat-card {
    min-height: 94px;
    padding: 12px 14px;
    border-radius: 11px;
}

.dashboard-summary-row .stat-label {
    margin-bottom: 4px;
    font-size: 10px;
}

.dashboard-summary-row .stat-value {
    font-size: 22px;
}

.dashboard-summary-row .stat-detail {
    margin-top: 5px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-summary-row .stat-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 9px;
}

.dashboard-summary-row .stat-icon svg {
    width: 16px;
    height: 16px;
}

.agent-status-card {
    height: 100%;
    padding: 14px 16px;
}

.agent-status-card .panel-header {
    margin-bottom: 5px;
}

.agent-status-card .status-list li {
    padding: 8px 0;
    font-size: 11px;
}

.agent-status-card .status-symbol {
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

.agent-status-card .status-symbol svg {
    width: 12px;
    height: 12px;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.9fr);
    gap: 12px;
}

.dashboard-usage-insights {
    gap: 12px;
}

.dashboard-main-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
}

.dashboard-side-panels {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
}


.dashboard-grid .panel-card {
    padding: 17px;
}

.dashboard-grid .panel-header {
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-grid .attention-list {
    grid-template-columns: 1fr;
    gap: 8px;
}

.dashboard-grid .attention-item {
    padding: 10px;
}

.dashboard-grid .hourly-activity-chart,
.dashboard-grid .daily-activity-chart {
    height: 225px;
}

.dashboard-grid .hourly-bar-track {
    height: 177px;
}

.dashboard-grid .top-applications-list {
    gap: 12px;
}

.dashboard-grid .top-application-heading {
    gap: 8px;
    margin-bottom: 6px;
}

.dashboard-grid .panel-link {
    flex: 0 0 auto;
    white-space: nowrap;
}

.dashboard-grid .top-application-name {
    gap: 7px;
}

.dashboard-grid .top-application-label {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    color: #344054;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1050px) {
    .dashboard-summary-row {
        grid-template-columns: 1fr;
    }

    .agent-status-card .status-list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .agent-status-card .status-list li {
        border-bottom: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .dashboard-summary-row .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agent-status-card .status-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid .hourly-activity-chart,
    .dashboard-grid .daily-activity-chart {
        height: 205px;
    }

    .dashboard-grid .hourly-bar-track {
        height: 157px;
    }
}

@media (max-width: 430px) {
    .dashboard-summary-row .stats-grid,
    .agent-status-card .status-list {
        grid-template-columns: 1fr;
    }
}

/* Commercial dashboard overview */
.dashboard-tabs {
    display: flex;
    gap: 4px;
    padding: 5px;
    margin-bottom: 16px;
    overflow-x: auto;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
}

.dashboard-tabs a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #667085;
    text-decoration: none;
    border-radius: 8px;
}

.dashboard-tabs a:hover,
.dashboard-tabs a.active {
    color: #175cd3;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.dashboard-tabs svg {
    width: 15px;
    height: 15px;
}

.dashboard-filter-bar {
    display: flex;
    align-items: end;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
}

.dashboard-filter-heading {
    min-width: 210px;
    margin-right: auto;
}

.dashboard-filter-heading strong,
.dashboard-filter-heading span {
    display: block;
}

.dashboard-filter-heading strong {
    font-size: 13px;
    color: #344054;
}

.dashboard-filter-heading span {
    margin-top: 3px;
    font-size: 10px;
    color: #98a2b3;
}

.dashboard-filter-bar label {
    min-width: 155px;
}

.dashboard-custom-dates {
    display: none;
    align-items: end;
    gap: 12px;
}

.dashboard-custom-dates.visible {
    display: flex;
}

.dashboard-filter-bar label > span {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 600;
    color: #667085;
}

.dashboard-filter-bar .form-control,
.dashboard-filter-bar .form-select {
    min-height: 37px;
    font-size: 12px;
}

.dashboard-filter-button,
.dashboard-filter-reset {
    display: inline-flex;
    min-height: 37px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
}

.dashboard-filter-button {
    color: #ffffff;
    background: #175cd3;
    border: 1px solid #175cd3;
}

.dashboard-filter-button svg {
    width: 14px;
    height: 14px;
}

.dashboard-filter-reset {
    color: #475467;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #d0d5dd;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-detail-warning {
    color: #b54708;
}

.attention-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.attention-item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 13px;
    color: inherit;
    text-decoration: none;
    background: #fcfcfd;
    border: 1px solid #eaecf0;
    border-radius: 10px;
}

.attention-item:hover {
    background: #f8fafc;
    border-color: #d0d5dd;
}

.attention-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    color: #b54708;
    background: #fffaeb;
    border-radius: 9px;
}

.attention-info .attention-icon {
    color: #175cd3;
    background: #eff8ff;
}

.attention-icon svg,
.attention-arrow {
    width: 17px;
    height: 17px;
}

.attention-content {
    min-width: 0;
    flex: 1;
}

.attention-content strong,
.attention-content .attention-employee-names,
.attention-content small {
    display: block;
}

.attention-content strong {
    font-size: 12px;
    color: #344054;
}

.attention-content small {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.45;
    color: #667085;
}

.attention-employee-names {
    display: flex !important;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 600;
    color: #344054;
}

.attention-employee-names svg {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    color: #667085;
}

.attention-arrow {
    flex: 0 0 17px;
    color: #98a2b3;
}

.dashboard-all-clear {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: #067647;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 10px;
}

.dashboard-all-clear > span {
    display: inline-flex;
}

.dashboard-all-clear svg {
    width: 23px;
    height: 23px;
}

.dashboard-all-clear strong,
.dashboard-all-clear small {
    display: block;
}

.dashboard-all-clear strong {
    font-size: 12px;
}

.dashboard-all-clear small {
    margin-top: 3px;
    font-size: 10px;
    color: #087443;
}

.website-icon {
    color: #067647;
    background: #ecfdf3;
}

.website-progress-value {
    background: linear-gradient(90deg, #12b76a 0%, #6ce9a6 100%);
}

.productivity-chip {
    flex: 0 0 auto;
    padding: 3px 6px;
    font-size: 8px;
    font-weight: 600;
    border-radius: 10px;
}

.productivity-productive {
    color: #067647;
    background: #ecfdf3;
}

.productivity-unproductive {
    color: #b42318;
    background: #fef3f2;
}

.productivity-neutral,
.productivity-uncategorised {
    color: #475467;
    background: #f2f4f7;
}

html {
    scroll-behavior: smooth;
}

@media (max-width: 1000px) {
    .dashboard-filter-bar {
        flex-wrap: wrap;
    }

    .dashboard-filter-heading {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .dashboard-filter-bar label {
        width: 100%;
    }

    .dashboard-custom-dates,
    .dashboard-custom-dates.visible {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-filter-button,
    .dashboard-filter-reset {
        flex: 1;
    }

    .stats-grid,
    .attention-list {
        grid-template-columns: 1fr;
    }
}
/* Explicit dashboard right-column order */
.dashboard-side-panels > #needs-attention {
    order: 0 !important;
}

.dashboard-side-panels > .dashboard-usage-insights {
    order: 1 !important;
}
