:root {
    --sidebar-bg: #172029;
    --sidebar-link: #c8d2dc;
    --sidebar-active: #21a67a;
    --page-bg: #f5f7fa;
    --panel-border: #dde3ea;
    --text-main: #1f2933;
}

/* Alert center */
.alert-center-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.alert-center-tabs {
    display: inline-flex;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid #d7dee6;
    border-radius: 7px;
    background: #fff;
}

.alert-center-tabs a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-right: 1px solid #e3e8ed;
    color: #52606d;
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.alert-center-tabs a:last-child {
    border-right: 0;
}

.alert-center-tabs a.active {
    background: #edf6f2;
    color: #176b54;
}

.alert-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dce2e8;
    border-radius: 7px;
    background: #fff;
}

.alert-summary-item {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 15px;
    border-right: 1px solid #e6eaee;
    border-left: 3px solid #8a96a3;
}

.alert-summary-item:last-child {
    border-right: 0;
}

.alert-summary-item span {
    overflow: hidden;
    color: #667382;
    font-size: 0.73rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-summary-item strong {
    font-size: 1.15rem;
}

.alert-summary-item.is-critical { border-left-color: #c62836; }
.alert-summary-item.is-warning { border-left-color: #d48a00; }
.alert-summary-item.is-info { border-left-color: #557080; }
.alert-summary-item.is-success { border-left-color: #21835f; }

.alert-filter-panel {
    padding: 13px 15px;
}

.alert-filter-grid {
    display: grid;
    grid-template-columns: 132px 132px minmax(150px, 0.8fr) 140px 140px minmax(230px, 1.3fr);
    gap: 10px;
    align-items: end;
}

.alert-filter-grid .form-label,
.alert-treatment-form .form-label,
.alert-rule-editor .form-label {
    margin-bottom: 4px;
    color: #657281;
    font-size: 0.72rem;
    font-weight: 650;
}

.alert-occurrence-panel {
    padding-bottom: 8px;
}

.alert-occurrence-list {
    border-top: 1px solid #e6eaee;
}

.alert-occurrence-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 38px;
    gap: 12px;
    align-items: start;
    padding: 14px 8px 14px 12px;
    border-bottom: 1px solid #e6eaee;
    border-left: 3px solid #7c8996;
}

.alert-occurrence-item.severity-critical { border-left-color: #c62836; }
.alert-occurrence-item.severity-warning { border-left-color: #d48a00; }
.alert-occurrence-item.severity-info { border-left-color: #557080; }

.alert-occurrence-level {
    padding-top: 2px;
}

.alert-occurrence-main,
.alert-occurrence-main > div > div {
    min-width: 0;
}

.alert-occurrence-main h3 {
    margin: 0 0 4px;
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

.alert-occurrence-person {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7785;
    font-size: 0.74rem;
}

.alert-occurrence-person span::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 8px 2px 0;
    border-radius: 50%;
    background: #9ba6b1;
}

.alert-occurrence-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin-top: 8px;
    color: #6a7684;
    font-size: 0.7rem;
}

.alert-occurrence-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.alert-occurrence-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
}

.alert-occurrence-toggle[aria-expanded="true"] i {
    display: inline-block;
    transform: rotate(180deg);
}

.alert-occurrence-detail {
    grid-column: 2 / -1;
    padding: 12px 0 2px;
    border-top: 1px dashed #dce2e8;
}

.alert-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.alert-detail-grid div {
    min-width: 0;
}

.alert-detail-grid small,
.alert-detail-grid strong {
    display: block;
}

.alert-detail-grid small {
    color: #778391;
    font-size: 0.67rem;
}

.alert-detail-grid strong {
    overflow-wrap: anywhere;
    font-size: 0.77rem;
}

.alert-detail-values {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin-top: 10px;
    color: #657281;
    font-size: 0.7rem;
}

.alert-treatment-form {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-top: 12px;
}

.alert-treatment-form > div:first-of-type {
    flex: 0 0 170px;
}

.alert-rule-editor > summary,
.alert-automation-panel > summary,
.alert-detected-groups details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.alert-rule-editor > summary::-webkit-details-marker,
.alert-automation-panel > summary::-webkit-details-marker,
.alert-detected-groups details > summary::-webkit-details-marker {
    display: none;
}

.alert-rule-editor > summary span,
.alert-automation-panel > summary span,
.alert-detected-groups details > summary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.alert-rule-editor[open] > summary,
.alert-automation-panel[open] > summary {
    margin-bottom: 17px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e5e9ed;
}

.alert-rule-editor[open] > summary > i:last-child,
.alert-automation-panel[open] > summary > i:last-child {
    transform: rotate(180deg);
}

.alert-rule-form-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.8fr) minmax(160px, 0.7fr) minmax(240px, 1.2fr);
    gap: 12px;
}

.alert-rule-options-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 16px;
    border: 1px solid #e0e5ea;
    border-radius: 7px;
}

.alert-option-group {
    min-width: 0;
    padding: 14px;
    border: 0;
    border-right: 1px solid #e5e9ed;
}

.alert-option-group:last-child {
    border-right: 0;
}

.alert-option-group legend {
    width: auto;
    margin: 0 0 10px;
    color: #354250;
    font-size: 0.78rem;
    font-weight: 700;
}

.alert-checkbox-list {
    display: grid;
    max-height: 150px;
    gap: 5px;
    overflow-y: auto;
}

.alert-checkbox-list > label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    color: #4e5b68;
    font-size: 0.76rem;
}

.alert-checkbox-list small {
    display: block;
    overflow: hidden;
    color: #7a8693;
    font-size: 0.66rem;
    text-overflow: ellipsis;
}

.alert-severity-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dce2e8;
    border-radius: 6px;
}

.alert-severity-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.alert-severity-options span {
    display: block;
    padding: 8px 5px;
    border-right: 1px solid #e2e7ec;
    color: #657281;
    font-size: 0.69rem;
    font-weight: 650;
    text-align: center;
    cursor: pointer;
}

.alert-severity-options label:last-child span {
    border-right: 0;
}

.alert-severity-options input:checked + .is-info { background: #e8eef2; color: #334e5d; }
.alert-severity-options input:checked + .is-warning { background: #fff3d5; color: #8b5a00; }
.alert-severity-options input:checked + .is-critical { background: #fdebed; color: #a81f2d; }

.alert-rules-table {
    font-size: 0.76rem;
}

.alert-rules-table td > strong,
.alert-rules-table td > small {
    display: block;
}

.alert-rules-table td > small {
    max-width: 320px;
    overflow: hidden;
    color: #74808d;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-department-tags {
    display: flex;
    max-width: 280px;
    flex-wrap: wrap;
    gap: 4px;
}

.alert-department-tags span {
    padding: 2px 6px;
    border: 1px solid #dce3e9;
    border-radius: 5px;
    background: #f6f8fa;
    color: #5f6c79;
    font-size: 0.65rem;
}

.alert-automation-content {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto auto;
    align-items: end;
    gap: 18px;
}

.alert-last-run small,
.alert-last-run strong {
    display: block;
}

.alert-last-run small {
    color: #75818e;
    font-size: 0.68rem;
}

.alert-last-run strong {
    font-size: 0.78rem;
}

.alert-detected-groups {
    border-top: 1px solid #e4e9ed;
}

.alert-detected-groups details {
    border-bottom: 1px solid #e4e9ed;
}

.alert-detected-groups details > summary {
    min-height: 48px;
    padding: 8px 4px;
}

.alert-detected-groups details .table {
    margin-bottom: 10px;
    font-size: 0.74rem;
}

.alert-detected-groups td > strong,
.alert-detected-groups td > small {
    display: block;
    max-width: 430px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 42px 16px;
    color: #74808d;
    text-align: center;
}

.empty-state i {
    color: #2d8b69;
    font-size: 1.6rem;
}

.empty-state strong {
    color: #3e4b57;
    font-size: 0.88rem;
}

.empty-state span {
    font-size: 0.75rem;
}

@media (max-width: 1199.98px) {
    .alert-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .alert-summary-item:nth-child(3) {
        border-right: 0;
    }

    .alert-summary-item:nth-child(n + 4) {
        border-top: 1px solid #e6eaee;
    }

    .alert-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .alert-filter-search {
        grid-column: span 2;
    }

    .alert-rule-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .alert-center-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .alert-center-tabs {
        display: flex;
        width: 100%;
    }

    .alert-center-tabs a {
        flex: 1 0 auto;
        justify-content: center;
    }

    .alert-summary-grid,
    .alert-filter-grid,
    .alert-rule-form-grid,
    .alert-rule-options-grid,
    .alert-automation-content {
        grid-template-columns: 1fr;
    }

    .alert-summary-item,
    .alert-summary-item:nth-child(3) {
        border-top: 1px solid #e6eaee;
        border-right: 0;
    }

    .alert-summary-item:first-child {
        border-top: 0;
    }

    .alert-filter-search {
        grid-column: auto;
    }

    .alert-occurrence-item {
        grid-template-columns: minmax(0, 1fr) 36px;
        padding-left: 9px;
    }

    .alert-occurrence-level {
        grid-column: 1 / -1;
    }

    .alert-occurrence-detail {
        grid-column: 1 / -1;
    }

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

    .alert-treatment-form {
        align-items: stretch;
        flex-direction: column;
    }

    .alert-treatment-form > div:first-of-type {
        flex-basis: auto;
    }

    .alert-option-group {
        border-right: 0;
        border-bottom: 1px solid #e5e9ed;
    }

    .alert-option-group:last-child {
        border-bottom: 0;
    }

    .alert-rules-table th:nth-child(2),
    .alert-rules-table td:nth-child(2),
    .alert-rules-table th:nth-child(5),
    .alert-rules-table td:nth-child(5) {
        display: none;
    }
}

.rules-review-table th {
    white-space: nowrap;
}

.rules-review-title {
    max-width: 520px;
    overflow-wrap: anywhere;
}

.rules-review-impact {
    white-space: nowrap;
}

.rules-review-impact strong,
.rules-review-impact small,
.rules-review-table td > small {
    display: block;
}

.rules-review-actions {
    display: flex;
    min-width: 270px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.rules-review-table .form-control {
    min-width: 220px;
}

@media (max-width: 767.98px) {
    .rules-page .collapse-panel-body {
        padding: 12px;
    }

    .rules-page .rules-review-responsive {
        overflow: visible;
    }

    .rules-review-table,
    .rules-review-table tbody,
    .rules-review-table tr,
    .rules-review-table td {
        display: block;
        width: 100%;
    }

    .rules-review-table thead {
        display: none;
    }

    .rules-review-table tr {
        padding: 10px 0;
        border-bottom: 1px solid #e6eaf0;
    }

    .rules-review-table tr:last-child {
        border-bottom: 0;
    }

    .rules-page .rules-review-table td {
        padding: 3px 0;
        border: 0;
    }

    .rules-review-title {
        max-width: none;
    }

    .rules-review-impact strong,
    .rules-review-impact small {
        display: inline;
    }

    .rules-review-impact small::before {
        content: " / ";
    }

    .rules-review-actions {
        min-width: 0;
        justify-content: stretch;
        padding-top: 3px;
    }

    .rules-review-actions .btn {
        flex: 1 1 0;
    }

    .rules-review-table .form-control {
        width: 100%;
        min-width: 0;
    }
}

.monitoring-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.monitoring-profile-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #dce2e8;
    border-left: 4px solid #287a70;
    border-radius: 7px;
    background: #fff;
}

.monitoring-profile-card.is-inactive {
    opacity: 0.62;
}

.monitoring-profile-card h3 {
    margin: 0;
    font-size: 0.96rem;
}

.monitoring-profile-card p {
    min-height: 38px;
    margin: 0;
    color: #697583;
    font-size: 0.78rem;
}

.monitoring-profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #edf0f3;
}

.monitoring-profile-facts span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: #455362;
    font-size: 0.74rem;
}

.monitoring-profile-facts i {
    color: #287a70;
}

.monitoring-settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #dfe4ea;
}

.monitoring-settings-grid > section {
    min-width: 0;
    padding: 18px;
    border-right: 1px solid #e6eaee;
    border-bottom: 1px solid #e6eaee;
}

.monitoring-settings-grid > section:nth-child(4) {
    border-right: 0;
}

.monitoring-settings-grid h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    color: #2f3c48;
    font-size: 0.88rem;
}

.monitoring-settings-grid h3 i {
    color: #b02a37;
}

.monitoring-settings-wide {
    grid-column: 1 / -1;
    border-right: 0 !important;
}

.security-event-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #dde3e8;
    border-radius: 7px;
    background: #fff;
}

.security-event-summary > div {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 12px 16px;
    border-right: 1px solid #e6eaee;
}

.security-event-summary > div:last-child {
    border-right: 0;
}

.security-event-summary small {
    color: #697583;
    font-weight: 600;
}

.security-event-summary strong {
    font-size: 1.15rem;
}

.security-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6c757d;
}

.security-dot.is-critical {
    background: #b42333;
}

.security-dot.is-warning {
    background: #d68a00;
}

.security-dot.is-info {
    background: #287a70;
}

.security-events-table {
    font-size: 0.78rem;
}

.security-events-table td {
    max-width: 310px;
}

@media (max-width: 991.98px) {
    .monitoring-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monitoring-settings-grid > section:nth-child(2) {
        border-right: 0;
    }
}

@media (max-width: 575.98px) {
    .monitoring-profile-grid,
    .monitoring-settings-grid,
    .security-event-summary {
        grid-template-columns: 1fr;
    }

    .monitoring-settings-grid > section,
    .security-event-summary > div {
        border-right: 0;
    }

    .security-event-summary > div {
        border-bottom: 1px solid #e6eaee;
    }

    .security-event-summary > div:last-child {
        border-bottom: 0;
    }

    .monitoring-profile-facts {
        grid-template-columns: 1fr;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex: 0 0 260px;
    background: var(--sidebar-bg);
    color: #fff;
    padding: 18px 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 10px 12px 20px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #21a67a;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--sidebar-link);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(33, 166, 122, 0.18);
}

.sidebar-nav a.active {
    border-left: 3px solid var(--sidebar-active);
}

.mobile-bottom-nav,
.mobile-dashboard {
    display: none;
}

.mobile-menu-offcanvas {
    --bs-offcanvas-width: min(86vw, 340px);
}

.mobile-menu-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 8px 14px 18px;
}

.mobile-menu-list {
    display: grid;
    gap: 3px;
}

.mobile-menu-list a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #425164;
    text-decoration: none;
}

.mobile-menu-list a.active {
    color: #0f6f50;
    background: rgba(33, 166, 122, 0.1);
    font-weight: 700;
}

.mobile-menu-list a > i:last-child {
    color: #9aa6b2;
    font-size: 0.75rem;
}

.mobile-menu-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 16px 4px 0;
    border-top: 1px solid var(--panel-border);
}

.mobile-menu-account > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mobile-menu-account strong,
.mobile-menu-account span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-menu-account span {
    color: #738091;
    font-size: 0.75rem;
}

.app-main {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 28px;
    background: #fff;
    border-bottom: 1px solid var(--panel-border);
}

.content-wrap {
    padding: 24px 28px 34px;
}

.metric-card {
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    height: 100%;
}

.metric-card .metric-label {
    color: #6b7785;
    font-size: 0.83rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-card .metric-value {
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 750;
    margin-top: 8px;
}

.panel {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 18px;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.table {
    vertical-align: middle;
}

.table thead th {
    color: #637083;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    word-break: break-all;
}

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

.timeline-item {
    border-left: 3px solid #21a67a;
    padding: 10px 12px;
    background: #f9fbfd;
    border-radius: 0 8px 8px 0;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.screenshot-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.screenshot-day-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    color: #425164;
    background: #f9fbfd;
    font-size: 0.86rem;
    text-decoration: none;
}

.screenshot-day-link:hover,
.screenshot-day-link.active {
    color: #0f6f50;
    border-color: rgba(33, 166, 122, 0.45);
    background: rgba(33, 166, 122, 0.08);
}

.screenshot-day-link strong {
    color: #637083;
    font-size: 0.75rem;
    font-weight: 700;
}

.screenshot-thumb {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.screenshot-thumb-item {
    position: relative;
    min-width: 0;
}

.screenshot-delete-form {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
}

.screenshot-delete-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 6px;
    color: #fff;
    background: rgba(163, 29, 44, 0.9);
    box-shadow: 0 2px 8px rgba(16, 24, 32, 0.24);
}

.screenshot-delete-button:hover,
.screenshot-delete-button:focus-visible {
    color: #fff;
    background: #c4283d;
}

.screenshot-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: #eef3f7;
}

.screenshot-thumb:hover img,
.screenshot-thumb:focus-visible img {
    border-color: rgba(33, 166, 122, 0.65);
}

.screenshot-thumb span {
    color: #637083;
    font-size: 0.82rem;
}

.screenshot-viewer-modal .modal-content {
    background: #101820;
    color: #fff;
}

.screenshot-viewer-modal .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.screenshot-viewer-modal .btn-close {
    filter: invert(1) grayscale(100%);
}

.screenshot-viewer-modal .modal-body {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 18px 76px;
}

.screenshot-viewer-modal img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 116px);
    object-fit: contain;
    border-radius: 8px;
    background: #000;
}

.screenshot-nav {
    position: absolute;
    top: 50%;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    transform: translateY(-50%);
}

.screenshot-nav:hover:not(:disabled) {
    background: rgba(33, 166, 122, 0.72);
}

.screenshot-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.screenshot-prev {
    left: 18px;
}

.screenshot-next {
    right: 18px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #eef3f7;
}

.login-box {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 28px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-success { background: #198754; }
.status-warning { background: #f0ad4e; }
.status-secondary { background: #6c757d; }

.chart-box {
    min-height: 280px;
}

.dashboard-page .app-shell,
.dashboard-page .app-main {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.dashboard-page .topbar {
    min-height: 60px;
    padding: 10px 20px;
}

.dashboard-page .topbar h1 {
    font-size: 1.15rem;
}

.dashboard-page .content-wrap {
    height: calc(100vh - 60px);
    padding: 12px 16px;
    overflow: hidden;
}

.dashboard-screen {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    flex: 0 0 auto;
}

.dashboard-page .metric-card {
    padding: 10px 12px;
}

.dashboard-page .metric-card .metric-label {
    font-size: 0.72rem;
}

.dashboard-page .metric-card .metric-value {
    font-size: clamp(1rem, 1.35vw, 1.45rem);
    margin-top: 3px;
    line-height: 1.15;
}

.dashboard-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
}

.dashboard-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    grid-auto-rows: clamp(190px, 25vh, 240px);
    gap: 10px;
    flex: 0 0 auto;
    min-height: 0;
}

.chart-panel,
.dashboard-table-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
}

.chart-domains,
.chart-hourly {
    width: 100%;
}

.dashboard-insights > .panel {
    height: 100%;
}

.dashboard-table-panel {
    flex: 1 1 auto;
}

.dashboard-productivity-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
}

.dashboard-productivity-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.dashboard-productivity-header > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.dashboard-productivity-header small {
    color: #738091;
    font-size: 0.61rem;
}

.dashboard-productivity-header > i {
    color: #a66b00;
    font-size: 1rem;
}

.dashboard-productivity-list {
    display: grid;
    gap: 1px;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.dashboard-productivity-list a {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-height: 27px;
    padding: 2px 0;
    color: #344054;
    text-decoration: none;
}

.dashboard-productivity-list a:hover .dashboard-productivity-person strong {
    color: #0f6f50;
}

.dashboard-productivity-position {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #667085;
    background: #eef1f4;
    font-size: 0.58rem;
    font-weight: 800;
}

.dashboard-productivity-list li:first-child .dashboard-productivity-position {
    color: #805b00;
    background: #fff1bd;
}

.dashboard-productivity-person,
.dashboard-productivity-score {
    display: grid;
    min-width: 0;
    gap: 0;
}

.dashboard-productivity-person strong,
.dashboard-productivity-person small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-productivity-person strong {
    font-size: 0.66rem;
}

.dashboard-productivity-person small,
.dashboard-productivity-score small {
    color: #7c8795;
    font-size: 0.55rem;
}

.dashboard-productivity-score {
    text-align: right;
}

.dashboard-productivity-score strong {
    color: #137955;
    font-size: 0.7rem;
}

.dashboard-customize-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.dashboard-topbar-period {
    display: flex;
    align-items: center;
}

.dashboard-topbar-period a {
    padding: 5px 9px;
    border: 1px solid #cfd8e3;
    color: #425164;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-topbar-period a + a {
    margin-left: -1px;
}

.dashboard-topbar-period a:first-child {
    border-radius: 6px 0 0 6px;
}

.dashboard-topbar-period a:last-child {
    border-radius: 0 6px 6px 0;
}

.dashboard-topbar-period a:hover,
.dashboard-topbar-period a.active {
    position: relative;
    z-index: 1;
    border-color: #17835f;
    color: #0f6f50;
    background: #edf8f4;
}

.dashboard-preferences-list {
    display: grid;
    gap: 5px;
}

.dashboard-preference-option {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px solid #e1e6ec;
    border-radius: 6px;
    cursor: pointer;
}

.dashboard-preference-option:hover {
    border-color: #b8c5d3;
    background: #fafbfd;
}

.dashboard-preference-option > i {
    color: #294c60;
    font-size: 1rem;
    text-align: center;
}

.dashboard-preference-option > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.dashboard-preference-option strong,
.dashboard-preference-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-preference-option strong {
    font-size: 0.8rem;
}

.dashboard-preference-option small {
    color: #738091;
    font-size: 0.68rem;
}

.dashboard-preference-option .form-check-input {
    margin: 0;
}

.dashboard-ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    min-width: 0;
    flex-wrap: wrap;
}

.dashboard-ranking-header > div {
    min-width: 0;
}

.dashboard-ranking-header small {
    color: #6c757d;
    font-size: 0.62rem;
}

.dashboard-ranking-header > a {
    flex: 0 0 auto;
    color: #b02a37;
    font-size: 0.66rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-site-ranking {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-site-ranking a {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-height: 20px;
    min-width: 0;
    color: #344054;
    font-size: 0.66rem;
    text-decoration: none;
}

.dashboard-site-ranking a:hover strong {
    color: #b02a37;
}

.dashboard-ranking-position {
    color: #98a2b3;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
}

.dashboard-ranking-domain {
    position: relative;
    overflow: hidden;
    padding-bottom: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-ranking-domain strong {
    display: block;
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
}

.dashboard-ranking-domain i {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: #dc3545;
}

.dashboard-ranking-count {
    color: #667085;
    font-size: 0.6rem;
    white-space: nowrap;
}

.dashboard-ranking-empty {
    padding: 12px 0;
    color: #667085;
    font-size: 0.78rem;
}

.dashboard-page .panel-title {
    font-size: 0.82rem;
    margin-bottom: 5px;
}

.chart-canvas {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.chart-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.chart-empty-state {
    display: grid;
    place-items: center;
    border: 1px dashed #d7dee7;
    border-radius: 6px;
    color: #738091;
    background: #fafbfd;
    font-size: 0.82rem;
}

.dashboard-table-panel .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.dashboard-page .table {
    margin-bottom: 0;
    font-size: 0.86rem;
}

.dashboard-page .table > :not(caption) > * > * {
    padding: 0.34rem 0.42rem;
}

.dashboard-time-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 0.78rem;
    line-height: 1.15;
    white-space: nowrap;
}

.dashboard-team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.dashboard-team-filters {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(130px, 170px) auto;
    gap: 6px;
}

.dashboard-employee-cell {
    display: grid;
    min-width: 145px;
    gap: 1px;
}

.dashboard-employee-cell a {
    overflow: hidden;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-employee-cell span,
.dashboard-table-panel td > small {
    display: block;
    color: #738091;
    font-size: 0.7rem;
}

.dashboard-value {
    font-weight: 750;
    white-space: nowrap;
}

.inventory-page .inventory-panel {
    padding: 14px;
}

.inventory-page .inventory-table,
.inventory-page .inventory-version-table {
    margin-bottom: 0;
    font-size: 0.82rem;
}

.inventory-page .inventory-table {
    table-layout: fixed;
}

.inventory-page .inventory-table > :not(caption) > * > * {
    padding: 0.34rem 0.45rem;
}

.inventory-page .inventory-table thead th {
    font-size: 0.68rem;
}

.inventory-page .inventory-table .small {
    font-size: 0.72rem;
}

.inventory-page .inv-col-host {
    width: 19%;
}

.inventory-page .inv-col-windows {
    width: 23%;
}

.inventory-page .inv-col-cpu {
    width: 24%;
}

.inventory-page .inv-col-disk {
    width: 12%;
}

.inventory-page .inv-col-apps {
    width: 7%;
}

.inventory-page .inv-col-date {
    width: 15%;
}

.inventory-page .inv-truncate {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-page .inventory-table .mono {
    word-break: normal;
}

.device-page .device-status-row .metric-card {
    padding: 10px 12px;
}

.device-page .device-status-row .metric-card .metric-label {
    font-size: 0.68rem;
}

.device-page .device-status-row .metric-card .metric-value {
    margin-top: 3px;
    font-size: 0.95rem !important;
    line-height: 1.2;
}

.inventory-summary-panel {
    padding: 12px 14px;
}

.inventory-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.inventory-summary-item {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: #f9fbfd;
}

.inventory-summary-item span,
.inventory-summary-item small {
    display: block;
    overflow: hidden;
    color: #637083;
    font-size: 0.7rem;
    font-weight: 700;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.inventory-summary-item small {
    margin-top: 2px;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: none;
}

.inventory-summary-item strong {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    font-size: 0.9rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collapse-stack {
    display: grid;
    gap: 10px;
}

.collapse-panel {
    overflow: hidden;
    padding: 0;
}

.collapse-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    color: var(--text-main);
    background: #fff;
    text-align: left;
    text-decoration: none;
}

.collapse-toggle:hover,
.collapse-toggle:focus-visible {
    background: #f9fbfd;
}

.collapse-toggle:not(.collapsed) {
    border-bottom: 1px solid var(--panel-border);
}

.collapse-toggle > span {
    display: inline-flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 8px;
    font-weight: 750;
}

.collapse-toggle > small {
    flex: 0 0 auto;
    margin-left: auto;
    color: #637083;
    font-size: 0.78rem;
    white-space: nowrap;
}

.collapse-chevron {
    color: #637083;
    transition: transform 0.18s ease;
}

.collapse-toggle:not(.collapsed) .collapse-chevron {
    transform: rotate(180deg);
}

.collapse-panel-body {
    padding: 14px;
}

.employee-page .metric-card {
    padding: 13px 14px;
}

.employee-page .metric-card .metric-label {
    font-size: 0.72rem;
}

.employee-page .metric-card .metric-value {
    margin-top: 4px;
    font-size: 1.35rem;
}

.employee-day-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.65fr);
    gap: 14px;
    align-items: stretch;
}

.employee-day-panel {
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

.employee-day-panel-header {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--panel-border);
}

.employee-day-panel-header > div {
    min-width: 0;
}

.employee-day-panel-header h2 {
    margin: 2px 0 0;
    font-size: 1rem;
    font-weight: 750;
}

.employee-day-panel-header > small {
    flex: 0 0 auto;
    color: #637083;
    font-size: 0.78rem;
    text-align: right;
}

.employee-day-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f6f50;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-condensed-timeline {
    display: grid;
    max-height: 520px;
    overflow-y: auto;
    padding: 6px 14px 12px;
}

.employee-timeline-period {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: 68px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 9px 8px 9px 13px;
    border-bottom: 1px solid #e8edf1;
}

.employee-timeline-period::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 4px;
    border-radius: 3px;
    background: #8b98a6;
    content: "";
}

.employee-timeline-period.is-productive::before {
    background: #16866c;
}

.employee-timeline-period.is-unproductive::before {
    background: #dc3545;
}

.employee-timeline-period.is-neutral::before {
    background: #2f7da8;
}

.employee-timeline-period.is-idle::before {
    background: #c88716;
}

.employee-timeline-period time,
.employee-timeline-period time strong,
.employee-timeline-period time small,
.employee-timeline-context strong,
.employee-timeline-context small,
.employee-timeline-duration strong,
.employee-timeline-duration small {
    display: block;
    min-width: 0;
}

.employee-timeline-period time strong {
    font-size: 0.9rem;
}

.employee-timeline-period time small,
.employee-timeline-context small,
.employee-timeline-duration small {
    color: #637083;
    font-size: 0.72rem;
}

.employee-timeline-context {
    min-width: 0;
}

.employee-timeline-context strong {
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-timeline-context small {
    overflow: hidden;
    margin-top: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-timeline-duration {
    min-width: 0;
    text-align: right;
}

.employee-timeline-duration strong {
    color: #35475a;
    font-size: 0.82rem;
}

.employee-timeline-duration small {
    margin-top: 2px;
}

.employee-day-screenshots {
    display: flex;
    flex-direction: column;
}

.employee-screenshot-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.employee-screenshot-preview .screenshot-thumb span {
    overflow: hidden;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-gallery-button {
    align-self: flex-start;
    margin: auto 14px 14px;
}

.employee-empty-state {
    display: flex;
    min-height: 120px;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #637083;
    font-size: 0.86rem;
    text-align: center;
}

.employee-analysis-heading > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.employee-analysis-heading strong {
    font-size: 0.92rem;
}

.employee-analysis-heading small {
    color: #637083;
    font-size: 0.78rem;
}

.employee-analysis-stack {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    align-items: start;
}

.employee-analysis-stack .collapse-panel {
    min-width: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.employee-analysis-stack .employee-sites-panel {
    grid-column: 1 / -1;
}

.employee-sites-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--panel-border);
}

.employee-sites-toolbar > div:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.employee-sites-toolbar strong {
    font-size: 0.86rem;
}

.employee-sites-toolbar small {
    color: #637083;
    font-size: 0.72rem;
}

.employee-sites-search {
    width: min(280px, 100%);
}

.employee-sites-table th,
.employee-sites-table td {
    padding: 0.48rem 0.62rem !important;
    font-size: 0.8rem;
}

.employee-sites-table th {
    padding: 0 !important;
}

.employee-site-sort {
    display: inline-flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.48rem 0.62rem;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.employee-site-sort:hover,
.employee-site-sort:focus-visible,
.employee-site-sort.is-active {
    color: #0b5ed7;
    background: #f2f7ff;
}

.employee-site-sort:focus-visible {
    outline: 2px solid #86b7fe;
    outline-offset: -2px;
}

.employee-site-sort i {
    flex: 0 0 auto;
    font-size: 0.72rem;
}

.employee-site-link {
    display: inline-flex;
    max-width: 360px;
    align-items: center;
    gap: 7px;
    color: #1464c0;
    font-weight: 650;
    text-decoration: none;
}

.employee-site-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-site-link:hover span {
    text-decoration: underline;
}

.employee-site-count {
    display: inline-flex;
    min-width: 34px;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.74rem;
    font-weight: 700;
}

.employee-site-count.is-productive {
    color: #08734f;
    background: #e9f8f1;
}

.employee-site-count.is-unproductive {
    color: #b42335;
    background: #fff0f2;
}

.employee-site-count.is-neutral {
    color: #566477;
    background: #eef1f4;
}

.employee-analysis-stack .collapse-panel.is-open,
.employee-analysis-stack .collapse-panel:has(.collapse.show),
.employee-analysis-stack .collapse-panel:has(.collapsing) {
    grid-column: 1 / -1;
}

.employee-analysis-stack .collapse-toggle {
    position: relative;
    min-height: 72px;
    flex-wrap: wrap;
    align-content: center;
    gap: 3px 8px;
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
}

.employee-analysis-stack .collapse-toggle > span {
    flex-basis: 100%;
    font-size: 0.86rem;
}

.employee-analysis-stack .collapse-toggle > small {
    margin-left: 25px;
    font-size: 0.72rem;
}

.employee-analysis-stack .collapse-chevron {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
}

.employee-analysis-stack .collapse-toggle:not(.collapsed) {
    border-bottom: 1px solid var(--panel-border);
    background: #f5faf8;
}

.employee-analysis-stack .collapse-toggle:not(.collapsed) .collapse-chevron {
    transform: translateY(-50%) rotate(180deg);
}

.employee-analysis-stack .collapse-panel-body {
    margin-top: 8px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: #fff;
}

.employee-period-shortcuts {
    margin: 0;
}

.employee-period-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 235px;
    gap: 12px;
}

.employee-period-chart {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
}

.employee-period-chart > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.employee-period-chart > header > div {
    min-width: 0;
}

.employee-period-chart h2 {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 750;
}

.employee-period-chart header small {
    display: block;
    margin-top: 2px;
    color: #637083;
    font-size: 0.66rem;
}

.employee-period-chart header > strong,
.employee-period-chart header > i {
    flex: 0 0 auto;
    color: #35475a;
    font-size: 0.76rem;
    white-space: nowrap;
}

.employee-unproductive-chart header > strong {
    color: #b42335;
}

.employee-fixed-chart-canvas {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.employee-fixed-chart-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.employee-chart-empty {
    display: grid;
    min-height: 0;
    place-items: center;
    align-items: center;
    color: #637083;
    background: #fafbfd;
    font-size: 0.76rem;
    text-align: center;
}

.device-page .collapse-panel .table,
.employee-page .collapse-panel .table,
.rules-page .collapse-panel .table,
.agent-page .collapse-panel .table,
.reports-page .collapse-panel .table,
.settings-page .collapse-panel .table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

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

.agent-page-intro > div {
    display: grid;
    gap: 2px;
}

.agent-page-intro span {
    color: #697583;
    font-size: 0.82rem;
}

.agent-release-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(360px, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid #dce2e8;
    border-left: 4px solid #b02a37;
    border-radius: 7px;
    background: #fff;
}

.agent-release-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.agent-release-main small {
    display: block;
    margin-top: 3px;
    color: #697583;
    font-size: 0.76rem;
}

.agent-release-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid #ecd3d6;
    border-radius: 6px;
    color: #b02a37;
    background: #fff5f6;
    font-size: 1.2rem;
}

.agent-release-facts {
    display: grid;
    grid-template-columns: 70px 125px minmax(100px, 1fr);
    min-width: 0;
    border-left: 1px solid #e2e6ea;
}

.agent-release-facts > div {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 0 14px;
}

.agent-release-facts span {
    color: #697583;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.agent-release-facts strong,
.agent-release-facts code {
    overflow: hidden;
    color: #25313c;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-release-actions {
    white-space: nowrap;
}

.agent-config-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.8fr) minmax(420px, 1.2fr);
    gap: 0;
}

.agent-config-summary,
.agent-config-preview {
    min-width: 0;
    padding: 18px;
}

.agent-config-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    border-right: 1px solid #e3e7eb;
}

.agent-config-summary > div:not(.agent-config-actions) {
    display: grid;
    align-content: start;
    gap: 3px;
    min-width: 0;
}

.agent-config-summary span {
    color: #697583;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.agent-config-summary strong,
.agent-config-summary code {
    overflow-wrap: anywhere;
    color: #26333f;
    font-size: 0.82rem;
}

.agent-config-actions {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.agent-config-note {
    grid-column: 1 / -1;
    margin: -2px 0 0;
    color: #697583;
    font-size: 0.75rem;
}

.agent-config-preview {
    background: #f7f9fb;
}

.agent-config-preview-title {
    margin-bottom: 9px;
    color: #4d5b69;
    font-size: 0.76rem;
    font-weight: 700;
}

.agent-config-preview pre {
    max-height: 280px;
    margin: 0;
    padding: 14px;
    overflow: auto;
    border: 1px solid #dfe4e9;
    border-radius: 5px;
    color: #26333f;
    background: #fff;
    font-size: 0.72rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.agent-settings-grid > section {
    min-height: 205px;
}

.agent-settings-grid > .monitoring-settings-wide {
    min-height: 0;
}

.agent-toggle-list {
    display: grid;
    align-content: center;
    gap: 11px;
}

.agent-settings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
}

.agent-settings-footer p {
    margin: 0;
    color: #697583;
    font-size: 0.78rem;
}

@media (max-width: 1199.98px) {
    .agent-release-panel {
        grid-template-columns: 1fr auto;
    }

    .agent-release-facts {
        grid-column: 1 / -1;
        grid-row: 2;
        border-top: 1px solid #e2e6ea;
        border-left: 0;
        padding-top: 14px;
    }
}

@media (max-width: 991.98px) {
    .agent-config-layout {
        grid-template-columns: 1fr;
    }

    .agent-config-summary {
        border-right: 0;
        border-bottom: 1px solid #e3e7eb;
    }
}

@media (max-width: 575.98px) {
    .agent-page-intro,
    .agent-settings-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .agent-release-panel {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .agent-release-actions,
    .agent-release-actions .btn {
        width: 100%;
    }

    .agent-release-facts {
        grid-column: auto;
        grid-row: auto;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .agent-release-facts > div {
        padding: 0;
    }

    .agent-config-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .agent-config-summary {
        grid-template-columns: 1fr;
    }

    .agent-config-actions .btn,
    .agent-settings-footer .btn {
        width: 100%;
    }
}

.settings-page .audit-table {
    font-size: 0.82rem;
}

.settings-page .audit-table td,
.settings-page .audit-table th {
    padding: 0.38rem 0.5rem;
    vertical-align: top;
}

.settings-recipient-table {
    margin-bottom: 0;
    font-size: 0.82rem !important;
}

.settings-recipient-table td,
.settings-recipient-table th {
    padding: 0.38rem 0.5rem !important;
}

.report-control-panel {
    padding: 14px;
}

.report-section-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid #dee2e6;
    border-radius: 0.85rem;
    background: #fff;
}

.report-section-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.65rem;
    color: #52606d;
    font-weight: 600;
    text-decoration: none;
}

.report-section-tabs a:hover,
.report-section-tabs a.active {
    color: #fff;
    background: #294c60;
}

.report-web-focus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-left: 4px solid #294c60;
}

.report-web-focus h2 {
    margin: 0.1rem 0 0.2rem;
    font-size: 1.35rem;
}

.report-web-focus p {
    margin: 0;
    color: #6c757d;
}

.report-web-eyebrow {
    color: #294c60;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-domain-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.report-domain-link > span {
    display: flex;
    flex-direction: column;
}

.report-domain-link small {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 400;
}

.chart-action-hint {
    margin: -0.2rem 0 0.45rem;
    color: #6c757d;
    font-size: 0.75rem;
}

.mobile-highlight-content li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

@media (max-width: 700px) {
    .report-section-tabs {
        display: flex;
    }

    .report-section-tabs a {
        flex: 1;
        justify-content: center;
    }

    .report-web-focus {
        align-items: flex-start;
        flex-direction: column;
    }

}

.report-control-header,
.report-executive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.report-period-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 14px 0;
}

.report-period-shortcuts a,
.report-view-switch button {
    padding: 7px 11px;
    border: 1px solid #cfd8e3;
    color: #425164;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.report-period-shortcuts a + a,
.report-view-switch button + button {
    margin-left: -1px;
}

.report-period-shortcuts a:first-child,
.report-view-switch button:first-child {
    border-radius: 6px 0 0 6px;
}

.report-period-shortcuts a:last-child,
.report-view-switch button:last-child {
    border-radius: 0 6px 6px 0;
}

.report-period-shortcuts a:hover,
.report-period-shortcuts a.active,
.report-view-switch button:hover,
.report-view-switch button.active {
    position: relative;
    z-index: 1;
    border-color: #17835f;
    color: #0f6f50;
    background: #edf8f4;
}

.report-filter-grid {
    display: grid;
    grid-template-columns: 150px 150px minmax(190px, 1fr) minmax(180px, 0.8fr) auto;
    gap: 10px;
    align-items: end;
}

.report-filter-grid-web {
    grid-template-columns: 140px 140px minmax(170px, 1fr) minmax(150px, 0.8fr) minmax(180px, 1fr) auto;
}

.report-filter-grid .form-label,
.report-advanced-filter .form-label {
    margin-bottom: 4px;
    color: #637083;
    font-size: 0.76rem;
    font-weight: 700;
}

.report-filter-actions {
    display: flex;
    gap: 6px;
}

.report-advanced-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(600px, 100%);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e7ebf0;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.report-web-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reports-page .report-metrics .metric-card {
    min-width: 0;
    padding: 12px 14px;
}

.reports-page .report-metrics .metric-value {
    margin-top: 4px;
    font-size: 1.25rem;
    line-height: 1.15;
}

.metric-note {
    margin-top: 4px;
    overflow: hidden;
    color: #6b7785;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-executive-panel {
    padding: 0;
    overflow: hidden;
}

.report-executive-header {
    padding: 14px;
    border-bottom: 1px solid var(--panel-border);
}

.report-view-switch {
    display: inline-flex;
    flex: 0 0 auto;
}

.report-client-filters {
    display: grid;
    width: min(390px, 100%);
    grid-template-columns: minmax(150px, 1fr) 170px;
    gap: 8px;
}

.report-summary-table {
    min-width: 900px;
    margin-bottom: 0;
    font-size: 0.84rem;
}

.report-summary-table > tbody > tr:first-child > td {
    padding: 0.58rem 0.65rem;
}

.report-summary-table td > strong,
.report-summary-table td > small,
.report-technical-table td > small {
    display: block;
}

.report-summary-table td > small,
.report-technical-table td > small {
    margin-top: 2px;
    color: #738091;
    font-size: 0.7rem;
}

.report-person-cell {
    display: grid;
    min-width: 180px;
    gap: 2px;
}

.report-person-cell a,
.report-person-cell strong {
    font-weight: 750;
}

.report-person-cell span {
    overflow: hidden;
    max-width: 260px;
    color: #738091;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-distribution {
    display: flex;
    width: 110px;
    height: 9px;
    overflow: hidden;
    border-radius: 4px;
    background: #edf1f5;
}

.report-distribution span {
    display: block;
    height: 100%;
}

.report-distribution .productive { background: #198754; }
.report-distribution .unproductive { background: #dc3545; }
.report-distribution .neutral { background: #50a6b4; }
.report-distribution .idle { background: #e2a93b; }

.report-expand-button i {
    display: block;
    transition: transform 0.18s ease;
}

.report-expand-button:not(.collapsed) i {
    transform: rotate(180deg);
}

.report-detail-row > td {
    padding: 0 !important;
    border-top: 0;
    background: #f7f9fb;
}

.report-detail-body {
    padding: 12px 14px 14px;
    border-top: 1px solid #e7ebf0;
}

.report-detail-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.report-detail-facts span {
    min-width: 0;
}

.report-detail-facts small,
.report-detail-facts strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-detail-facts small {
    color: #738091;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.report-detail-facts strong {
    margin-top: 2px;
    font-size: 0.82rem;
}

.report-technical-table {
    min-width: 1500px;
    font-size: 0.78rem !important;
}

tbody[data-report-group][hidden] {
    display: none;
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 12px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .topbar {
        align-items: flex-start;
        padding: 16px;
    }

    .content-wrap {
        padding: 16px;
    }

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

    .report-filter-actions {
        grid-column: 1 / -1;
    }

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

    .report-executive-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .report-client-filters {
        width: 100%;
    }
}

@media (max-width: 1199px) {
    .inventory-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-page .app-shell,
    .dashboard-page .app-main {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .dashboard-page .content-wrap {
        height: auto;
        min-height: calc(100vh - 60px);
        overflow: visible;
    }

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

    .dashboard-board {
        min-height: 0;
    }

    .dashboard-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 230px;
    }

    .dashboard-table-panel {
        min-height: 360px;
    }

    .chart-hourly {
        width: 100%;
    }

    .dashboard-site-ranking {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .dashboard-team-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }

    .report-advanced-filter {
        grid-template-columns: 1fr;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1020;
        min-height: 56px;
        align-items: center;
        padding: 9px 14px;
    }

    .topbar-eyebrow,
    .topbar-admin-meta,
    .topbar-logout {
        display: none;
    }

    .dashboard-topbar-period {
        display: none;
    }

    .topbar h1,
    .dashboard-page .topbar h1 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .content-wrap,
    .dashboard-page .content-wrap {
        min-height: calc(100vh - 56px);
        padding: 12px 12px calc(82px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: calc(62px + env(safe-area-inset-bottom));
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
        border-top: 1px solid #d7dee7;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -6px 18px rgba(23, 32, 41, 0.08);
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 2px;
        min-width: 0;
        min-height: 50px;
        padding: 3px;
        border: 0;
        color: #66758a;
        background: transparent;
        font: inherit;
        text-decoration: none;
    }

    .mobile-bottom-nav i {
        font-size: 1.15rem;
        line-height: 1;
    }

    .mobile-bottom-nav span {
        overflow: hidden;
        width: 100%;
        font-size: 0.64rem;
        line-height: 1.15;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav a.active {
        border-radius: 6px;
        color: #0f6f50;
        background: rgba(33, 166, 122, 0.1);
        font-weight: 700;
    }

    .dashboard-screen {
        display: none;
    }

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

    .dashboard-mobile-period {
        display: flex;
        width: 100%;
        margin: 0;
    }

    .dashboard-mobile-period a {
        flex: 1 1 0;
        text-align: center;
    }

    .dashboard-mobile-period + .mobile-overview {
        margin-top: 0;
    }

    .mobile-overview {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin: -12px -12px 0;
        padding: 12px;
        border-bottom: 1px solid var(--panel-border);
        background: #fff;
    }

    .mobile-overview > div {
        display: grid;
        gap: 2px;
        padding: 2px 10px;
        border-right: 1px solid #e5eaf0;
        text-align: center;
    }

    .mobile-overview > div:last-child {
        border-right: 0;
    }

    .mobile-overview span,
    .mobile-work-summary span,
    .mobile-employee-times small,
    .mobile-employee-observation small {
        color: #738091;
        font-size: 0.66rem;
    }

    .mobile-overview strong {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .mobile-work-summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1px;
        overflow: hidden;
        border: 1px solid var(--panel-border);
        border-radius: 8px;
        background: var(--panel-border);
    }

    .mobile-work-summary > div {
        display: grid;
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 1px 4px;
        min-width: 0;
        padding: 10px 8px;
        background: #fff;
    }

    .mobile-work-summary i {
        grid-row: 1 / span 2;
        align-self: center;
        font-size: 0.85rem;
    }

    .mobile-work-summary strong {
        overflow: hidden;
        font-size: 0.76rem;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-quick-actions a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 42px;
        padding: 8px 10px;
        border: 1px solid #b8c5d3;
        border-radius: 6px;
        color: #294c60;
        background: #fff;
        font-size: 0.78rem;
        font-weight: 700;
        text-decoration: none;
    }

    .dashboard-customize-trigger span {
        display: none;
    }

    .dashboard-customize-trigger {
        width: 36px;
        height: 36px;
        justify-content: center;
        padding: 0;
    }

    .mobile-productivity-ranking {
        margin: 0 -12px;
        padding: 12px 14px;
        border-top: 1px solid var(--panel-border);
        border-bottom: 1px solid var(--panel-border);
        background: #fff;
    }

    .mobile-productivity-ranking > header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 7px;
    }

    .mobile-productivity-ranking > header > div {
        display: grid;
        gap: 1px;
    }

    .mobile-productivity-ranking h2 {
        margin: 0;
        font-size: 0.86rem;
    }

    .mobile-productivity-ranking > header span {
        color: #738091;
        font-size: 0.66rem;
    }

    .mobile-productivity-ranking > header > i {
        color: #a66b00;
        font-size: 1rem;
    }

    .mobile-productivity-ranking ol {
        display: grid;
        gap: 1px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mobile-productivity-ranking li > a {
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        min-height: 38px;
        color: #344054;
        text-decoration: none;
    }

    .mobile-productivity-position {
        display: grid;
        place-items: center;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        color: #667085;
        background: #eef1f4;
        font-size: 0.65rem;
        font-weight: 800;
    }

    .mobile-productivity-ranking li:first-child .mobile-productivity-position {
        color: #805b00;
        background: #fff1bd;
    }

    .mobile-productivity-person,
    .mobile-productivity-result {
        display: grid;
        min-width: 0;
        gap: 0;
    }

    .mobile-productivity-person strong,
    .mobile-productivity-person small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-productivity-person strong {
        font-size: 0.76rem;
    }

    .mobile-productivity-person small,
    .mobile-productivity-result small {
        color: #738091;
        font-size: 0.62rem;
    }

    .mobile-productivity-result {
        text-align: right;
    }

    .mobile-productivity-result strong {
        color: #137955;
        font-size: 0.78rem;
    }

    .mobile-month-highlights {
        overflow: hidden;
        margin: 0 -12px;
        border-top: 1px solid var(--panel-border);
        border-bottom: 1px solid var(--panel-border);
        background: #fff;
    }

    .mobile-month-highlights summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 46px;
        padding: 10px 14px;
        color: #294c60;
        font-size: 0.82rem;
        font-weight: 750;
        cursor: pointer;
        list-style: none;
    }

    .mobile-month-highlights summary::-webkit-details-marker {
        display: none;
    }

    .mobile-month-highlights summary span {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-month-highlights[open] summary > i {
        transform: rotate(180deg);
    }

    .mobile-highlight-content {
        display: grid;
        gap: 16px;
        padding: 4px 14px 14px;
        border-top: 1px solid #eef1f5;
    }

    .mobile-highlight-content h2 {
        margin: 12px 0 6px;
        color: #637083;
        font-size: 0.68rem;
        text-transform: uppercase;
    }

    .mobile-highlight-content ol {
        display: grid;
        gap: 2px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mobile-highlight-content li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 30px;
        border-bottom: 1px solid #f0f2f5;
        font-size: 0.76rem;
    }

    .mobile-highlight-content li span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-highlight-content li strong {
        flex: 0 0 auto;
        color: #425164;
        font-size: 0.72rem;
    }

    .mobile-highlight-content .mobile-empty-item {
        justify-content: flex-start;
        color: #738091;
    }

    .mobile-team-section {
        display: grid;
        gap: 10px;
    }

    .mobile-section-heading {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
    }

    .mobile-section-heading h2 {
        margin: 0;
        font-size: 0.95rem;
    }

    .mobile-section-heading span {
        color: #738091;
        font-size: 0.7rem;
    }

    .mobile-team-filters {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.8fr);
        gap: 7px;
    }

    .mobile-team-filters .form-control,
    .mobile-team-filters .form-select,
    .mobile-team-filters .input-group-text {
        min-height: 40px;
        font-size: 0.78rem;
    }

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

    .mobile-employee-card {
        display: grid;
        gap: 10px;
        padding: 12px;
        border: 1px solid var(--panel-border);
        border-radius: 8px;
        background: #fff;
    }

    .mobile-employee-card[hidden] {
        display: none;
    }

    .mobile-employee-card > header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .mobile-employee-identity {
        display: grid;
        min-width: 0;
        gap: 1px;
    }

    .mobile-employee-identity strong {
        overflow: hidden;
        font-size: 0.88rem;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-employee-identity span {
        color: #738091;
        font-size: 0.68rem;
    }

    .mobile-employee-status {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        flex: 0 0 auto;
        padding: 4px 6px;
        border-radius: 6px;
        color: #5f6b78;
        background: #eef1f4;
        font-size: 0.65rem;
        font-weight: 700;
    }

    .mobile-employee-status i {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }

    .mobile-employee-status.status-success {
        color: #137955;
        background: #e9f7f1;
    }

    .mobile-employee-status.status-warning {
        color: #946200;
        background: #fff5d9;
    }

    .mobile-employee-observation {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .mobile-employee-observation > span,
    .mobile-employee-times > span {
        display: grid;
        min-width: 0;
        gap: 1px;
    }

    .mobile-employee-observation strong {
        overflow: hidden;
        font-size: 0.76rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-employee-times {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 9px 0;
        border-top: 1px solid #edf0f4;
        border-bottom: 1px solid #edf0f4;
    }

    .mobile-employee-times strong {
        overflow: hidden;
        font-size: 0.73rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-employee-card > footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .mobile-employee-card > footer a,
    .mobile-employee-card > footer button {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 36px;
        padding: 6px 8px;
        border: 1px solid #cbd5df;
        border-radius: 6px;
        color: #294c60;
        background: #fff;
        font: inherit;
        font-size: 0.72rem;
        font-weight: 700;
        text-decoration: none;
    }

    .mobile-employee-card > footer button:disabled {
        color: #98a3af;
        background: #f7f8fa;
    }

    .mobile-load-more {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 40px;
        border: 1px solid #b8c5d3;
        border-radius: 6px;
        color: #294c60;
        background: #fff;
        font-size: 0.76rem;
        font-weight: 700;
    }

    .mobile-load-more[hidden],
    .mobile-team-empty[hidden] {
        display: none;
    }

    .mobile-team-empty {
        padding: 24px 12px;
        color: #738091;
        font-size: 0.78rem;
        text-align: center;
    }

    .inventory-summary-grid {
        grid-template-columns: 1fr;
    }

    .collapse-toggle {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .collapse-toggle > small {
        flex-basis: 100%;
        margin-left: 0;
        padding-left: 24px;
        white-space: normal;
    }

    .screenshot-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .screenshot-viewer-modal .modal-body {
        padding: 12px 52px;
    }

    .screenshot-nav {
        width: 38px;
        height: 38px;
    }

    .screenshot-prev {
        left: 8px;
    }

    .screenshot-next {
        right: 8px;
    }

    .dashboard-metrics,
    .dashboard-board {
        grid-template-columns: 1fr;
    }

    .dashboard-board {
        grid-template-rows: 300px auto 260px minmax(360px, auto);
    }

    .chart-domains,
    .chart-hourly,
    .chart-unproductive,
    .dashboard-table-panel {
        grid-column: 1;
        grid-row: auto;
    }

    .chart-hourly {
        width: 100%;
    }

    .dashboard-site-ranking {
        grid-template-columns: 1fr;
    }

    .dashboard-team-filters {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .report-filter-grid,
    .report-metrics,
    .report-detail-facts {
        grid-template-columns: 1fr;
    }

    .report-period-shortcuts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .report-period-shortcuts a,
    .report-period-shortcuts a + a {
        margin-left: 0;
        border-radius: 6px;
        text-align: center;
    }

    .report-client-filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .employee-day-workspace {
        grid-template-columns: 1fr;
    }

    .employee-screenshot-preview {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .employee-period-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .employee-metric-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
        margin-right: 0;
        margin-left: 0;
    }

    .employee-metric-row > .col-md {
        width: auto;
        padding: 0;
    }

    .employee-page .metric-card {
        min-height: 76px;
        padding: 10px 11px;
    }

    .employee-page .metric-card .metric-value {
        font-size: 1.12rem;
    }

    .employee-day-panel-header {
        min-height: 58px;
        align-items: flex-start;
        padding: 10px 11px;
    }

    .employee-day-panel-header > small {
        max-width: 130px;
        font-size: 0.68rem;
    }

    .employee-condensed-timeline {
        max-height: none;
        padding: 4px 10px 10px;
    }

    .employee-timeline-period {
        grid-template-columns: 52px minmax(0, 1fr) 68px;
        gap: 7px;
        min-height: 60px;
        padding-right: 2px;
        padding-left: 10px;
    }

    .employee-timeline-period time strong,
    .employee-timeline-context strong {
        font-size: 0.78rem;
    }

    .employee-timeline-period time small,
    .employee-timeline-context small,
    .employee-timeline-duration small {
        font-size: 0.64rem;
    }

    .employee-timeline-duration strong {
        font-size: 0.72rem;
    }

    .employee-screenshot-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px;
    }

    .employee-gallery-button {
        width: calc(100% - 20px);
        margin: 0 10px 10px;
    }

    .employee-analysis-heading > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 1px;
    }

    .employee-analysis-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .employee-analysis-stack .collapse-toggle {
        min-height: 78px;
        padding-right: 30px;
    }

    .employee-analysis-stack .collapse-toggle > small {
        margin-left: 24px;
        padding-left: 0;
    }

    .employee-sites-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .employee-sites-search {
        width: 100%;
    }

    .employee-period-insights {
        grid-template-columns: 1fr;
        grid-auto-rows: 230px;
        gap: 8px;
    }

    .employee-period-shortcuts {
        width: 100%;
    }

    .employee-period-shortcuts a {
        flex: 1 1 0;
        text-align: center;
    }

    .employee-profile-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
    }

    .employee-profile-actions,
    .employee-screenshot-request,
    .employee-date-filter {
        width: 100%;
        min-width: 0;
    }

    .employee-screenshot-request,
    .employee-date-filter {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .employee-screenshot-request .form-select,
    .employee-date-filter .form-control {
        min-width: 0;
    }

    .employee-screenshot-request .btn {
        grid-column: 1 / -1;
    }

    .employee-page,
    .employee-page .app-main,
    .employee-page .content-wrap {
        max-width: 100%;
        overflow-x: hidden;
    }
}
.work-days-selector {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
}

.work-days-selector > .btn {
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
    margin-left: 0 !important;
    border-radius: 4px !important;
}
