/**
 * SGI Platform — shared styles for stats home (login + app shell).
 * Linked from templates that use stats-login-*, stats-app-*, sidebar, top bar.
 */
:root {
    --stats-brand-slate: #17202c;
}
table {
    border-collapse: collapse;
}
td {
    border-left: 1px solid black;
    padding-left: 8px;
    padding-right: 8px;
}
td:first-child {
    border-left: none;
}

ul {
    list-style-type: disc;
    margin: 0;
    padding: 0;
}
ul li {
    padding: 5px 10px;
}
ul li a {
    text-decoration: none;
    color: #333;
}
.collapsible {
    cursor: pointer;
    background-color: #f1f1f1;
    padding: 10px;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    width: 100%;
}
.collapsible.active,
.collapsible:hover {
    background-color: #ccc;
}
.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
}

body.stats-login-body {
    margin: 0;
    min-height: 100vh;
}
.stats-login-root {
    display: flex;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.stats-login-brand {
    flex: 0 0 30%;
    max-width: 420px;
    min-width: 240px;
    background: var(--stats-brand-slate);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    box-sizing: border-box;
}
.stats-login-logo {
    width: min(92%, 440px);
    max-height: min(58vh, 520px);
    height: auto;
    display: block;
    object-fit: contain;
}
.stats-login-panel {
    flex: 1;
    background: #f7f8fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}
.stats-login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(23, 32, 44, 0.08);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}
.stats-login-heading {
    margin: 0 0 28px;
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
}
.stats-login-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: #2362b8;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.stats-login-google:hover {
    background: #1a4f9a;
}
.stats-login-google:focus-visible {
    outline: 2px solid #00beb1;
    outline-offset: 2px;
}
.stats-login-google:active {
    transform: scale(0.99);
}
.stats-login-google-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.stats-login-google-icon svg {
    display: block;
}
.stats-access-denied-copy {
    font-size: 14px;
    line-height: 1.55;
    color: #3d444d;
    margin: 0 0 12px;
}
.stats-access-denied-email {
    margin: 16px 0 8px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f4f6f8;
    border: 1px solid #e4e8ed;
}
.stats-access-denied-email-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5c6570;
    margin-bottom: 4px;
}
.stats-access-denied-email-value {
    font-size: 15px;
    color: #1c1e22;
    word-break: break-all;
}
.stats-access-denied-mailto {
    color: #2362b8;
    font-weight: 600;
    text-decoration: none;
}
.stats-access-denied-mailto:hover {
    text-decoration: underline;
}
.stats-access-denied-actions {
    margin-top: 20px;
}
.stats-access-denied-signout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #d8dde3;
    background: #fff;
    color: #1c1e22;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.stats-access-denied-signout:hover {
    background: #f4f6f8;
}
.stats-access-denied-signout:focus-visible {
    outline: 2px solid #00beb1;
    outline-offset: 2px;
}
@media (max-width: 768px) {
    .stats-login-root {
        flex-direction: column;
    }
    .stats-login-brand {
        flex: none;
        max-width: none;
        min-height: 38vh;
        padding: 32px 24px;
    }
    .stats-login-panel {
        flex: 1;
        align-items: flex-start;
        padding-top: 24px;
    }
}

body.stats-app-body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #eef0f2;
}
.stats-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 8px 16px;
    background: #00beb1;
    color: #fff;
    font-weight: 600;
    z-index: 100;
    border-radius: 0 0 4px 0;
}
.stats-skip:focus {
    left: 0;
    outline: none;
}
.stats-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.stats-app {
    /* Match login brand — dark blue shell, not neutral black */
    --stats-sidebar-surface: var(--stats-brand-slate);
    --stats-sidebar-border: #2c3d54;
    --stats-sidebar-content: #1a283a;
    --stats-sidebar-panel: #162435;
    --stats-sidebar-deep: #121e2e;
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: var(--stats-sidebar-surface);
    transition: grid-template-columns 0.22s ease;
}
@media (min-width: 901px) {
    .stats-app--sidebar-collapsed {
        grid-template-columns: 72px 1fr;
    }
}
.stats-app-sidebar {
    background: var(--stats-sidebar-surface);
    color: #e8eaed;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--stats-sidebar-border);
    z-index: 40;
    min-width: 0;
    transition: border-color 0.2s ease;
}
.stats-app-sidebar-brand {
    padding: 4px 6px 5px;
    border-bottom: 1px solid var(--stats-sidebar-border);
    flex-shrink: 0;
}
.stats-app-sidebar-brand-link {
    display: block;
    text-decoration: none;
    line-height: 0;
}
.stats-app-sidebar-brand-link:focus-visible {
    outline: 2px solid #00beb1;
    outline-offset: 3px;
    border-radius: 4px;
}
.stats-app-sidebar-brand img {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 56px;
    display: block;
    object-fit: contain;
    object-position: left center;
    transition: width 0.2s ease, max-height 0.2s ease, object-position 0.2s ease;
}
@media (min-width: 901px) {
    .stats-app--sidebar-collapsed .stats-app-sidebar-brand {
        padding: 4px 4px 5px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .stats-app--sidebar-collapsed .stats-app-sidebar-brand-link {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .stats-app--sidebar-collapsed .stats-app-sidebar-brand-link img {
        width: 44px;
        height: 44px;
        max-width: none;
        max-height: none;
        object-fit: cover;
        object-position: 17% 50%;
    }
}
.stats-app-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 28px;
}
.stats-sidebar-nav .collapsible {
    background: transparent;
    color: #c4c9d4;
    padding: 10px 14px;
    font-size: 13px;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 0;
    border-left: 3px solid transparent;
}
.stats-sidebar-nav .collapsible.stats-nav-item--iconic {
    display: flex;
    align-items: center;
    gap: 10px;
}
.stats-nav-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b929e;
}
.stats-nav-icon svg {
    display: block;
}
.stats-sidebar-nav .collapsible.stats-nav-item--iconic:hover .stats-nav-icon,
.stats-sidebar-nav .collapsible.stats-nav-item--iconic.active .stats-nav-icon {
    color: #00beb1;
}
.stats-nav-label {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.stats-nav-reports-panel,
.stats-nav-com-panel {
    padding: 2px 0 10px;
    background: var(--stats-sidebar-panel);
}
.stats-nav-reports-direct {
    padding: 4px 0 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.stats-nav-reports-direct-link {
    display: block;
    padding: 8px 14px 8px 22px;
    color: #c4c9d4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}
.stats-nav-reports-direct-link:hover {
    color: #00beb1;
    background: rgba(255, 255, 255, 0.04);
}
.stats-nav-reports-panel > .stats-nav-sub,
.stats-nav-com-panel > .stats-nav-sub {
    padding: 8px 12px 8px 22px;
    font-size: 12.5px;
    font-weight: 500;
    color: #b8bdc6;
    border-left: 3px solid transparent;
}
.stats-nav-reports-panel > .stats-nav-sub:hover,
.stats-nav-com-panel > .stats-nav-sub:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}
.stats-nav-reports-panel > .stats-nav-sub.active,
.stats-nav-com-panel > .stats-nav-sub.active {
    color: #fff;
    border-left-color: #00beb1;
    background: rgba(0, 190, 177, 0.1);
}
.stats-nav-reports-panel > .content,
.stats-nav-com-panel > .content {
    background: var(--stats-sidebar-deep);
}
.stats-nav-reports-panel > .content a,
.stats-nav-com-panel > .content a {
    padding-left: 32px;
    font-size: 12.5px;
}
.stats-sidebar-nav .collapsible:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.stats-sidebar-nav .collapsible.active {
    background: rgba(0, 190, 177, 0.12);
    color: #fff;
    border-left-color: #00beb1;
}
.stats-sidebar-nav .collapsible.stats-nav-item--iconic.stats-nav-section--current {
    background: rgba(0, 190, 177, 0.2);
    color: #fff;
    border-left-color: #00beb1;
}
.stats-sidebar-nav
    .collapsible.stats-nav-item--iconic.stats-nav-section--current
    .stats-nav-icon {
    color: #00beb1;
}
.stats-sidebar-nav .content {
    display: none;
    background: var(--stats-sidebar-content);
    padding: 4px 0 12px 0;
    overflow: hidden;
}
.stats-sidebar-nav .content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.stats-sidebar-nav .content li {
    padding: 0;
}
.stats-sidebar-nav .content a {
    display: block;
    padding: 7px 14px 7px 22px;
    color: #9aa0a9;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.35;
}
.stats-sidebar-nav .content a:hover {
    color: #00beb1;
    background: rgba(255, 255, 255, 0.04);
}
/* Current page (see stats_platform.js initNavHighlightForCurrentRoute) */
.stats-sidebar-nav .content a.stats-nav-link--current {
    color: #fff;
    font-weight: 600;
    background: rgba(0, 190, 177, 0.14);
    border-left: 3px solid #00beb1;
    padding-left: 19px;
}
.stats-nav-reports-direct-link.stats-nav-link--current {
    color: #00beb1;
    font-weight: 600;
    background: rgba(0, 190, 177, 0.12);
    border-left: 3px solid #00beb1;
    padding-left: 19px;
}
@media (min-width: 901px) {
    .stats-sidebar-pin-btn {
        display: flex;
    }
    .stats-app--sidebar-collapsed .stats-sidebar-nav > .collapsible.stats-nav-item--iconic {
        justify-content: center;
        padding: 10px 6px;
        min-height: 42px;
        border-left-width: 0;
        gap: 0;
    }
    .stats-app--sidebar-collapsed .stats-sidebar-nav > .collapsible.stats-nav-item--iconic.active {
        border-left-width: 3px;
        padding-left: 3px;
    }
    .stats-app--sidebar-collapsed .stats-sidebar-nav > .collapsible.stats-nav-item--iconic::after {
        content: none;
    }
    .stats-app--sidebar-collapsed .stats-sidebar-nav > .collapsible.stats-nav-item--iconic .stats-nav-label {
        display: none;
    }
    .stats-app--sidebar-collapsed .stats-sidebar-nav > .collapsible.stats-nav-item--iconic .stats-nav-icon {
        margin: 0;
    }
    .stats-app--sidebar-collapsed .stats-sidebar-nav > .collapsible.stats-nav-item--iconic .stats-nav-icon svg {
        width: 22px;
        height: 22px;
    }
    .stats-app--sidebar-collapsed .stats-nav-reports-panel > .stats-nav-sub,
    .stats-app--sidebar-collapsed .stats-nav-com-panel > .stats-nav-sub {
        font-size: 0 !important;
        letter-spacing: 0;
        padding: 8px 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        border-left-width: 0;
    }
    .stats-app--sidebar-collapsed .stats-nav-reports-panel > .stats-nav-sub.active,
    .stats-app--sidebar-collapsed .stats-nav-com-panel > .stats-nav-sub.active {
        border-left-width: 2px;
        padding-left: 2px;
    }
    .stats-app--sidebar-collapsed .stats-nav-reports-panel > .stats-nav-sub::after,
    .stats-app--sidebar-collapsed .stats-nav-com-panel > .stats-nav-sub::after {
        content: attr(data-abbr);
        font-size: 9px;
        font-weight: 700;
        color: #b8bdc6;
        line-height: 1.15;
        text-align: center;
        max-width: 64px;
        overflow: hidden;
    }
    .stats-app--sidebar-collapsed .stats-nav-reports-panel > .stats-nav-sub.active::after,
    .stats-app--sidebar-collapsed .stats-nav-com-panel > .stats-nav-sub.active::after {
        color: #fff;
    }
    .stats-app--sidebar-collapsed .stats-office-collapsible {
        padding: 8px 4px;
        font-size: 10px;
        font-weight: 700;
        text-align: center;
        line-height: 1.2;
    }
    .stats-app--sidebar-collapsed .stats-sidebar-nav .content a {
        padding-left: 10px;
        padding-right: 8px;
        font-size: 12px;
    }
    .stats-app--sidebar-collapsed .stats-nav-reports-direct-link {
        padding-left: 10px;
        padding-right: 8px;
        font-size: 12px;
    }
}
.stats-office-nested {
    padding-bottom: 4px;
}
.stats-office-nested .stats-office-collapsible {
    padding: 8px 14px 8px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #b8bdc6;
    border-left: 3px solid transparent;
}
.stats-office-nested .stats-office-collapsible:hover {
    color: #fff;
}
.stats-office-nested .stats-office-collapsible.active {
    border-left-color: #2362b8;
    background: rgba(35, 98, 184, 0.15);
    color: #fff;
}
.stats-office-nested .content {
    background: var(--stats-sidebar-panel);
    padding-left: 0;
}
.stats-office-nested .content ul {
    padding-bottom: 6px;
}
.stats-office-nested .content a {
    padding-left: 28px;
    font-size: 12px;
}
.stats-app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background: #eef0f2;
    border-top-left-radius: 14px;
    overflow: hidden;
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.1);
}
.stats-app-topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #dfe3e8;
    position: sticky;
    top: 0;
    z-index: 30;
    flex-shrink: 0;
}
.stats-topbar-row-primary {
    display: grid;
    /* auto + 1fr + auto: center column grows; "auto" center was ~min-content (~135px) */
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    min-height: 44px;
    box-sizing: border-box;
}
.stats-topbar-left {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
}
.stats-sidebar-pin-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: -4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #1c1e22;
    cursor: pointer;
    flex-shrink: 0;
}
.stats-sidebar-pin-btn:hover {
    background: #f0f2f4;
}
.stats-sidebar-pin-btn:focus-visible {
    outline: 2px solid #00beb1;
    outline-offset: 2px;
}
.stats-sidebar-pin-icon {
    width: 20px;
    height: 20px;
    display: block;
    transition: transform 0.22s ease;
}
.stats-app--sidebar-collapsed .stats-sidebar-pin-icon {
    transform: scaleX(-1);
}
.stats-mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: -4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #1c1e22;
    cursor: pointer;
    flex-shrink: 0;
}
.stats-mobile-menu-btn:hover {
    background: #f0f2f4;
}
.stats-mobile-menu-btn:focus-visible {
    outline: 2px solid #00beb1;
    outline-offset: 2px;
}
.stats-mobile-menu-btn svg {
    width: 22px;
    height: 22px;
}
.stats-topbar-left .stats-breadcrumb {
    flex: 1;
    min-width: 0;
}
.stats-breadcrumb {
    font-size: 13px;
    color: #5c6570;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-breadcrumb strong {
    color: #1c1e22;
    font-weight: 600;
}
.stats-topbar-omni {
    grid-column: 2;
    justify-self: stretch;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stats-topbar-right {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 0;
}
.stats-topbar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}
.stats-topbar-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #1c1e22;
    text-decoration: none;
    flex-shrink: 0;
}
.stats-topbar-icon-link:hover {
    background: #f0f2f4;
    color: #0f172a;
}
.stats-topbar-icon-link:focus-visible {
    outline: 2px solid #00beb1;
    outline-offset: 2px;
}
.stats-topbar-icon-svg {
    width: 22px;
    height: 22px;
    display: block;
}
.stats-topbar-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
    pointer-events: none;
}
.stats-topbar-badge--hidden {
    display: none !important;
}
.stats-topbar-notif-wrap {
    position: relative;
    flex-shrink: 0;
}
button.stats-topbar-notif-trigger.stats-topbar-icon-link {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.stats-topbar-notif-trigger[aria-expanded="true"] {
    background: #f0f2f4;
}
.stats-topbar-notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(380px, calc(100vw - 24px));
    max-height: min(420px, 72vh);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(23, 32, 44, 0.14);
    z-index: 65;
    text-align: left;
}
.stats-topbar-notif-panel[hidden] {
    display: none !important;
}
.stats-topbar-notif-panel-head {
    flex-shrink: 0;
    padding: 10px 14px 6px;
    border-bottom: 1px solid #eef0f2;
}
.stats-topbar-notif-panel-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5c6570;
}
.stats-topbar-notif-panel-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.stats-topbar-notif-panel-foot {
    flex-shrink: 0;
    padding: 10px 14px;
    border-top: 1px solid #eef0f2;
    background: #fafbfc;
    border-radius: 0 0 10px 10px;
}
.stats-topbar-notif-history-link {
    font-size: 13px;
    font-weight: 600;
    color: #2362b8;
    text-decoration: none;
}
.stats-topbar-notif-history-link:hover {
    text-decoration: underline;
}
.stats-topbar-notif-loading,
.stats-topbar-notif-empty,
.stats-topbar-notif-error {
    padding: 16px 14px;
    font-size: 13px;
    color: #5c6570;
    margin: 0;
}
.stats-topbar-notif-error {
    color: #b91c1c;
}
.stats-topbar-notif-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f2;
}
.stats-topbar-notif-row:last-child {
    border-bottom: none;
}
.stats-topbar-notif-row-main {
    flex: 1;
    min-width: 0;
}
.stats-topbar-notif-row-title {
    font-size: 14px;
    font-weight: 600;
    color: #1c1e22;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.stats-topbar-notif-row-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #8b929e;
}
.stats-topbar-notif-row-meta code {
    font-size: 11px;
    background: #f0f2f4;
    padding: 1px 5px;
    border-radius: 4px;
}
.stats-topbar-notif-row-open {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #2362b8;
    text-decoration: none;
}
.stats-topbar-notif-row-open:hover {
    text-decoration: underline;
}
.stats-topbar-notif-row-body {
    margin-top: 6px;
    font-size: 12px;
    color: #5c6570;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.stats-topbar-notif-read {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 2px;
}
.stats-topbar-notif-read input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.stats-topbar-notif-read span {
    font-size: 10px;
    color: #5c6570;
    max-width: 52px;
    text-align: center;
    line-height: 1.2;
}
.stats-omni-wrap {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}
.stats-omni-form {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
}
.stats-omni-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    max-height: min(320px, 55vh);
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d8dde3;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
}
.stats-omni-suggest-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #5c6570;
}
.stats-omni-suggest-item {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
}
.stats-omni-suggest-item:hover,
.stats-omni-suggest-item:focus {
    background: #f0f9f8;
    outline: none;
}
.stats-omni-suggest-title {
    font-weight: 600;
    font-size: 13px;
    color: #1c1e22;
}
.stats-omni-suggest-meta {
    font-size: 12px;
    color: #5c6570;
    margin-top: 2px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.stats-omni-form input[type="search"] {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
    height: 34px;
    line-height: 1.2;
    padding: 0 12px 0 32px;
    border: 1px solid #d8dde3;
    border-radius: 999px;
    font-size: 13px;
    color: #1c1e22;
    appearance: none;
    -webkit-appearance: none;
    background: #f4f6f8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235c6570' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 10px center;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.stats-omni-form input[type="search"]::placeholder {
    color: #8b929e;
}
.stats-omni-form input[type="search"]:focus {
    outline: none;
    border-color: #00beb1;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 190, 177, 0.2);
}
.stats-user-menu {
    position: relative;
    flex-shrink: 0;
}
.stats-user-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #2362b8;
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.stats-user-menu-trigger:hover {
    box-shadow: 0 2px 8px rgba(35, 98, 184, 0.45);
}
.stats-user-menu-trigger:focus-visible {
    outline: 2px solid #00beb1;
    outline-offset: 2px;
}
.stats-user-menu-trigger[aria-expanded="true"] {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2362b8;
}
.stats-user-avatar {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}
.stats-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 10px 0;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(23, 32, 44, 0.12);
    z-index: 60;
}
.stats-user-dropdown[hidden] {
    display: none;
}
.stats-user-dropdown-email {
    padding: 4px 14px 10px;
    font-size: 12px;
    color: #5c6570;
    word-break: break-all;
    border-bottom: 1px solid #eef0f2;
}
.stats-user-dropdown-logout {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #2362b8;
    text-decoration: none;
}
.stats-user-dropdown-logout:hover {
    background: #f4f6f8;
}
.stats-app-content {
    padding: 24px 28px 48px;
    flex: 1;
}
.stats-dashboard-welcome h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: #1c1e22;
}
.stats-dashboard-welcome p {
    margin: 0 0 18px;
    font-size: 14px;
    color: #5c6570;
    line-height: 1.5;
}
.stats-search-panel {
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    padding: 20px 22px 22px;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
/* Completed task: primary request / summary block (task detail pages) */
.stats-search-panel.stats-search-panel--task-complete {
    background: #ecf9f0;
    border-color: #c5e6d0;
}
.stats-search-panel-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    color: #1c1e22;
}
.stats-search-panel-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: #5c6570;
}
.stats-task-overview-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    margin-top: 4px;
}
.stats-task-filter-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #1c1e22;
}
.stats-task-filter-select {
    min-width: 12rem;
    padding: 6px 10px;
    border: 1px solid #c9d0d6;
    border-radius: 6px;
    font-size: 14px;
}
.stats-search-catalog tbody tr.stats-task-row--overdue td {
    background: rgba(220, 53, 69, 0.08);
}
.stats-search-catalog tbody tr.stats-task-row--due-soon td {
    background: rgba(255, 193, 7, 0.12);
}
.stats-task-new-form .stats-task-new-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 0 1.25rem;
}
.stats-task-new-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1c1e22;
}
.stats-task-new-form .stats-task-new-grid > label:first-child {
    margin-top: 0;
}
.stats-task-new-form .stats-task-new-full {
    grid-column: 1 / -1;
}
.stats-task-new-form input[type="text"],
.stats-task-new-form input[type="email"],
.stats-task-new-form input[type="date"],
.stats-task-new-form input[type="time"],
.stats-task-new-form select,
.stats-task-new-form textarea {
    width: 100%;
    max-width: 40rem;
    padding: 8px 10px;
    border: 1px solid #c9d0d6;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
}
.stats-task-due-et-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--stats-text-muted, #5c6370);
}
.stats-assign-email-wrap {
    position: relative;
    max-width: 40rem;
}
.stats-assign-email-wrap input {
    width: 100%;
}
.stats-assign-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #c9d0d6;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.stats-assign-suggest li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}
.stats-assign-suggest li:hover,
.stats-assign-suggest li[aria-selected="true"] {
    background: #eef2f7;
}
.stats-task-new-form input[type="file"] {
    font-size: 14px;
    font-weight: 400;
}
.stats-task-new-submit {
    margin-top: 20px;
}
.stats-task-new-message {
    margin-top: 12px;
    margin-bottom: 0;
}
.stats-task-type-table .stats-task-type-category-row th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stats-text-muted, #5c6370);
  padding: 1.1rem 0.75rem 0.35rem;
  border-bottom: none;
  background: transparent;
}

.stats-task-type-table tbody tr.stats-task-type-category-row:first-child th {
  padding-top: 0.35rem;
}

.stats-task-catalog-actions-head {
    white-space: nowrap;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--stats-text-muted, #5c6370);
}
.stats-task-catalog-links {
    white-space: nowrap;
    font-size: 13px;
}
.stats-task-catalog-links a {
    font-weight: 500;
    color: #2362b8;
    text-decoration: none;
}
.stats-task-catalog-links a:hover {
    text-decoration: underline;
}
.stats-task-catalog-link-sep {
    margin: 0 0.35em;
    color: #8b929e;
    font-weight: 400;
    user-select: none;
}
.stats-task-type-table td.stats-search-catalog-desc {
    max-width: 36rem;
    line-height: 1.45;
}
.stats-task-type-meta-cell {
    max-width: 14rem;
    font-size: 13px;
}
.stats-task-type-owner {
    word-break: break-all;
}
.stats-task-type-sla {
    margin-top: 0.25rem;
    font-size: 12px;
    color: var(--stats-text-muted, #5c6370);
}
.stats-task-type-meta-muted {
    color: var(--stats-text-muted, #5c6370);
}
.stats-search-panel-links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.stats-search-panel-links li {
    padding: 0;
    margin: 0 0 8px;
}
.stats-search-panel-links a {
    color: #2362b8;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}
.stats-search-panel-links a:hover {
    text-decoration: underline;
}
.stats-search-panel-subhint {
    margin: 20px 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1c1e22;
}
.stats-search-panel-hint--empty {
    margin-bottom: 16px;
}
.stats-search-table-wrap {
    overflow-x: auto;
    margin-bottom: 4px;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
}
.stats-search-catalog {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.stats-search-catalog th,
.stats-search-catalog td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #eef0f2;
}
.stats-search-catalog th {
    font-weight: 600;
    color: #1c1e22;
    background: #f7f8fa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stats-search-catalog tbody tr:last-child td {
    border-bottom: none;
}
.stats-search-catalog-name {
    font-weight: 500;
    white-space: nowrap;
}
.stats-search-catalog-name a {
    color: #2362b8;
    text-decoration: none;
}
.stats-search-catalog-name a:hover {
    text-decoration: underline;
}
.stats-search-catalog-cat {
    color: #5c6570;
    font-size: 13px;
    white-space: nowrap;
    max-width: 12rem;
}
.stats-search-catalog-desc {
    color: #5c6570;
    font-size: 13px;
    line-height: 1.45;
}
.stats-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 35;
}
@media (max-width: 900px) {
    .stats-app {
        grid-template-columns: 1fr;
    }
        .stats-app-sidebar {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            width: min(300px, 92vw);
            transform: translateX(-100%);
            transition: transform 0.2s ease;
            box-shadow: none;
        }
    .stats-app--nav-open .stats-app-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25);
    }
    .stats-app--nav-open .stats-nav-overlay {
        display: block;
    }
        .stats-sidebar-pin-btn {
            display: none !important;
        }
        .stats-mobile-menu-btn {
            display: flex;
        }
        .stats-topbar-row-primary {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            row-gap: 8px;
            padding: 8px 12px;
        }
        .stats-topbar-left {
            flex: 1 1 auto;
            min-width: 0;
            order: 1;
        }
        .stats-topbar-omni {
            order: 3;
            flex: 1 1 100%;
            width: 100%;
            max-width: none;
        }
        .stats-omni-form {
            max-width: none;
        }
        .stats-omni-wrap {
            max-width: none;
        }
        .stats-topbar-right {
            order: 2;
            margin-left: auto;
        }
    }

/* Scheduled SMS reminders — appointment ID Denticon detail tooltip */
.stats-appt-id-trigger {
    font: inherit;
    color: var(--stats-brand-slate, #17202c);
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
    background: none;
    border: none;
    padding: 0;
}
.stats-appt-id-trigger:hover,
.stats-appt-id-trigger:focus-visible {
    color: #0d6efd;
    outline: none;
}
.stats-appt-tooltip {
    position: fixed;
    z-index: 10050;
    max-width: min(22rem, calc(100vw - 24px));
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    line-height: 1.45;
    color: #212529;
    pointer-events: none;
}
.stats-appt-tooltip strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.stats-appt-tooltip dl {
    margin: 0;
}
.stats-appt-tooltip dt {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
}
.stats-appt-tooltip dd {
    margin: 0 0 6px 0;
}
.stats-appt-tooltip p {
    margin: 0;
}

/* Scheduled reminders — full message + row metadata hover */
.stats-msg-preview-btn {
    font: inherit;
    color: inherit;
    text-align: left;
    width: 100%;
    max-width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}
.stats-msg-preview-btn:hover,
.stats-msg-preview-btn:focus-visible {
    color: #0d6efd;
    outline: none;
}
.stats-reminder-hover-panel {
    max-width: min(36rem, calc(100vw - 24px));
    max-height: min(70vh, 36rem);
    overflow-y: auto;
    pointer-events: none;
}
.stats-reminder-hover-panel .stats-reminder-msg-pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1.45;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.stats-reminder-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 240px;
    height: 280px;
}

/* Platform notification settings */
.stats-flash {
    margin: 0 0 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}
.stats-flash--success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}
.stats-flash--error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}
.stats-notif-toggle {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}
.stats-notif-toggle input {
    margin-top: 3px;
}
.stats-notif-office-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}
.stats-notif-office-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}
.stats-notif-oid {
    color: #6c757d;
    font-size: 0.85em;
}
.stats-btn-primary {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: var(--stats-brand-slate, #17202c);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.stats-btn-primary:hover {
    filter: brightness(1.08);
}
/* Notification settings: browser permission already granted */
.stats-btn-push {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.stats-btn-push--granted {
    background: #15803d;
    color: #fff;
    cursor: pointer;
}
.stats-btn-push--granted:hover {
    filter: brightness(1.06);
}
.stats-btn-push-check {
    flex-shrink: 0;
    opacity: 0.95;
}
.stats-btn-push--denied {
    background: #64748b;
    color: #fff;
    cursor: default;
}
.stats-btn-push--denied:hover {
    filter: none;
}
.stats-user-dropdown a[role="menuitem"]:not(.stats-user-dropdown-logout) {
    display: block;
    padding: 10px 14px;
    color: var(--stats-brand-slate, #17202c);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.stats-user-dropdown a[role="menuitem"]:not(.stats-user-dropdown-logout):hover {
    background: #f4f6f8;
}
