/* DataQ M11 UAT polish: interaction clarity, pagination, notifications and dense workspace UX. */
.workspace-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.m11-topbar-clock {
    display: grid;
    justify-items: end;
    gap: 1px;
    min-width: 118px;
    padding-right: 9px;
    border-right: 1px solid var(--dq-line);
    color: var(--dq-muted);
    line-height: 1.1;
}
.m11-topbar-clock strong { color: var(--dq-night); font-size: 12px; }
.m11-topbar-clock span { font-size: 8px; font-weight: 700; }
.topbar-action[data-notification-link] { gap: 6px; }
.m11-notification-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    min-height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--dq-green);
    color: #fff;
    font-size: 8px;
    font-weight: 850;
}
.m11-sidebar-profile {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}
.m11-sidebar-profile img,
.m11-profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.m11-sidebar-profile span:last-child { display: grid; min-width: 0; }
.m11-sidebar-profile small { color: #9fb9c1; font-size: 8px; }

.m11-toast-region {
    position: fixed;
    z-index: 1500;
    top: 62px;
    right: 18px;
    display: grid;
    gap: 8px;
    width: min(370px, calc(100vw - 32px));
    pointer-events: none;
}
.m11-live-toast,
.m11-inline-toast {
    display: grid;
    gap: 3px;
    padding: 11px 13px;
    border: 1px solid #c9ded9;
    border-left: 4px solid var(--dq-green);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(11, 10, 11, .14);
    color: var(--dq-night);
    text-decoration: none;
}
.m11-live-toast {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: auto;
}
.m11-live-toast.is-visible { opacity: 1; transform: translateY(0); }
.m11-live-toast strong { font-size: 10px; }
.m11-live-toast span { color: #49545c; font-size: 10px; line-height: 1.45; }
.m11-live-toast.is-error,
.m11-inline-toast.is-error { border-color: #efcaca; border-left-color: #bb4545; }
.m11-live-toast.is-notification { border-left-color: var(--dq-blue); }
.m11-inline-toast {
    position: fixed;
    z-index: 1500;
    top: 64px;
    right: 18px;
}

.m11-board-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
.m11-collapse-all-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 29px;
    padding: 4px 9px;
    border: 1px solid var(--dq-line);
    border-radius: 6px;
    background: #fff;
    color: var(--dq-blue);
    font: inherit;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}
.m11-collapse-all-button:hover { background: #f4f7fb; }
.m11-collapse-all-button svg { width: 13px; height: 13px; fill: currentColor; transition: transform .16s ease; }
.m11-collapse-all-button[data-collapsed="1"] svg { transform: rotate(-90deg); }
.m11-group-caret {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
.m11-group-caret svg { width: 14px; height: 14px; fill: currentColor; transition: transform .16s ease; }
.m11-board-group.is-collapsed .m11-group-caret svg { transform: rotate(-90deg); }
.mine-label.is-paused { color: #96661a; }
.m11-updated-cell {
    white-space: nowrap;
    color: var(--dq-muted);
    font-size: 9px;
    font-weight: 700;
}
.m11-task-focus,
.m11-board-table tr:target { animation: m11TaskFocus 5.5s ease-out; }
@keyframes m11TaskFocus {
    0%, 18% { box-shadow: inset 4px 0 0 var(--dq-blue); background: #edf3ff; }
    100% { box-shadow: inset 4px 0 0 transparent; background: inherit; }
}

/* Employee My Work hierarchy */
.m11-my-work-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 14px;
}
.m11-my-work-stat {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border: 1px solid var(--dq-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--dq-shadow);
}
.m11-my-work-stat strong { font-size: 19px; }
.m11-my-work-stat span { color: var(--dq-muted); font-size: 9px; font-weight: 750; }
.m11-my-work-services { display: grid; gap: 11px; }
.m11-my-work-service {
    border: 1px solid var(--dq-line);
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--dq-shadow);
    overflow: hidden;
}
.m11-my-work-service > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--dq-line);
    background: #f8fbfb;
}
.m11-my-work-service > header h2 { margin: 0; font-size: 14px; }
.m11-my-work-service > header span { color: var(--dq-muted); font-size: 9px; }
.m11-my-work-clients { display: grid; gap: 0; }
.m11-my-work-client { padding: 10px 13px; border-bottom: 1px solid var(--dq-line-soft, #edf0f2); }
.m11-my-work-client:last-child { border-bottom: 0; }
.m11-my-work-client-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.m11-my-work-client-heading strong { font-size: 11px; }
.m11-my-work-year { display: grid; grid-template-columns: 54px 1fr; gap: 9px; align-items: start; margin-top: 6px; }
.m11-my-work-year > strong { padding-top: 7px; color: var(--dq-muted); font-size: 9px; }
.m11-my-work-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 7px; }
.m11-my-work-month {
    display: grid;
    gap: 4px;
    padding: 9px 10px;
    border: 1px solid var(--dq-line);
    border-radius: 7px;
    color: var(--dq-night);
    text-decoration: none;
}
.m11-my-work-month:hover { border-color: #9fc9c1; background: #f7fbfa; }
.m11-my-work-month > strong { font-size: 11px; }
.m11-my-work-month > span { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.m11-my-work-month small { color: var(--dq-muted); font-size: 8px; }

/* Better notification scanning. */
.notification-card { position: relative; border-left: 4px solid #cbd2d7; }
.notification-card.type-support_opened,
.notification-card.type-support_resolved { border-left-color: #2f81c7; }
.notification-card.type-escalation_opened,
.notification-card.type-escalation_resolved { border-left-color: #c95555; }
.notification-card.type-high_priority { border-left-color: #e04e73; }
.notification-card.type-stale_task_reminder { border-left-color: #b8872e; }
.m11-notification-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef1f3;
    color: #59656d;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.type-support_opened .m11-notification-tag,
.type-support_resolved .m11-notification-tag { background: #e8f3fb; color: #236aa0; }
.type-escalation_opened .m11-notification-tag,
.type-escalation_resolved .m11-notification-tag { background: #fff0f0; color: #a34343; }
.type-high_priority .m11-notification-tag { background: #fdebf0; color: #b84061; }
.type-stale_task_reminder .m11-notification-tag { background: #fff6df; color: #8f681b; }

/* Advanced Django permissions remain available but read like operational capabilities. */
.management-permissions {
    border: 1px dashed #cfd7dc;
    border-radius: 8px;
    background: #fafbfc;
}
.management-permissions > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    color: var(--dq-muted);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}
.management-permissions-body { padding: 0 12px 12px; }
.management-checkbox-list {
    max-height: 260px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--dq-line);
    border-radius: 7px;
    background: #fff;
}
.management-checkbox-list label {
    display: grid;
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    min-height: 42px;
    padding: 6px 7px;
    border: 1px solid #edf0f2;
    border-radius: 6px;
    background: #fcfdfd;
    font-size: 9px;
    line-height: 1.35;
}
.management-checkbox-list label:has(input:checked) { border-color: #9fcdc5; background: #f1faf8; }
.management-checkbox-list input { width: 15px; height: 15px; }
.m11-permission-copy { display: grid; gap: 1px; }
.m11-permission-copy strong { color: var(--dq-night); font-size: 9px; }
.m11-permission-copy small { color: var(--dq-muted); font-size: 8px; }
.m11-permission-count {
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef3f5;
    color: #52616a;
    font-size: 8px;
}

/* Report and long-table containment. */
.report-history-card { overflow: hidden; }
.report-history-card .dashboard-table-wrap { border: 0; border-radius: 0; overflow-x: auto; overflow-y: visible; }
.report-history-table { position: relative; min-width: 760px; }
.report-history-table thead { position: static !important; top: auto !important; }
.report-history-card .m11-pagination { position: sticky; left: 0; min-width: min(100%, 760px); }

.m11-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 9px 11px;
    border-top: 1px solid var(--dq-line);
    background: #fafbfc;
}
.m11-pagination span { color: var(--dq-muted); font-size: 9px; font-weight: 700; }
.m11-pagination button {
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--dq-line);
    border-radius: 6px;
    background: #fff;
    color: var(--dq-blue);
    font: inherit;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}
.m11-pagination button:disabled { opacity: .45; cursor: default; }

/* Dashboard controls and generated visual summaries use persisted dashboard data only. */
.m11-dashboard-heading .dashboard-filter {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 760px;
}
.m11-dashboard-extra-filter {
    display: grid;
    gap: 3px;
    color: var(--dq-muted);
    font-size: 8px;
    font-weight: 800;
}
.m11-dashboard-extra-filter select,
.m11-dashboard-extra-filter input {
    min-height: 31px;
    min-width: 112px;
    padding: 5px 8px;
    border: 1px solid var(--dq-line);
    border-radius: 6px;
    background: #fff;
    color: var(--dq-night);
    font: inherit;
    font-size: 9px;
}
.m11-dashboard-search input { width: 165px; }
.m11-generated-chart,
.m11-weekly-generated-chart {
    display: grid;
    gap: 7px;
    margin: 0 0 10px;
    padding: 11px 12px;
    border: 1px solid #e2e8eb;
    border-radius: 7px;
    background: linear-gradient(180deg, #fbfdfd, #f7fafb);
}
.m11-generated-chart-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e8edef;
}
.m11-generated-chart-heading strong { font-size: 10px; }
.m11-generated-chart-heading span { color: var(--dq-muted); font-size: 8px; }
.m11-generated-chart-row {
    display: grid;
    grid-template-columns: minmax(100px, 180px) minmax(120px, 1fr) 48px;
    gap: 8px;
    align-items: center;
}
.m11-generated-chart-row > span {
    overflow: hidden;
    color: #3f4a51;
    font-size: 9px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.m11-generated-chart-row > i {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef0;
}
.m11-generated-chart-row > i > b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--dq-green);
}
.m11-generated-chart-row > strong { font-size: 9px; text-align: right; }
.m11-weekly-generated-row {
    display: grid;
    grid-template-columns: 55px 1fr 1fr;
    gap: 8px;
    align-items: center;
}
.m11-weekly-generated-row > strong { font-size: 8px; }
.m11-weekly-generated-row > span {
    position: relative;
    display: grid;
    align-items: center;
    height: 22px;
    overflow: hidden;
    border-radius: 4px;
    background: #edf1f3;
}
.m11-weekly-generated-row i { position: absolute; inset: 0 auto 0 0; opacity: .78; }
.m11-weekly-generated-row .is-started i { background: var(--dq-blue); }
.m11-weekly-generated-row .is-completed i { background: var(--dq-green); }
.m11-weekly-generated-row b { position: relative; z-index: 1; padding: 0 6px; font-size: 8px; }

/* Compact DataQ native helper treatment. */
.m11-native-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dq-muted);
    font-size: 9px;
    font-weight: 700;
}

@media (max-width: 1050px) {
    .m11-dashboard-heading { align-items: flex-start; flex-direction: column; }
    .m11-dashboard-heading .dashboard-filter { justify-content: flex-start; max-width: none; }
}
@media (max-width: 900px) {
    .m11-topbar-clock { display: none; }
    .m11-my-work-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .management-checkbox-list { grid-template-columns: 1fr; }
    .m11-generated-chart-row { grid-template-columns: 120px 1fr 42px; }
}
@media (max-width: 620px) {
    .m11-toast-region { right: 10px; top: 54px; width: calc(100vw - 20px); }
    .m11-my-work-overview { grid-template-columns: 1fr 1fr; }
    .m11-my-work-year { grid-template-columns: 1fr; }
    .m11-board-toolbar-actions { justify-content: flex-start; }
    .m11-dashboard-heading .dashboard-filter { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .m11-dashboard-extra-filter select,
    .m11-dashboard-extra-filter input,
    .m11-dashboard-search input { width: 100%; min-width: 0; }
    .m11-generated-chart-row { grid-template-columns: 90px 1fr 38px; }
    .m11-weekly-generated-row { grid-template-columns: 42px 1fr; }
    .m11-weekly-generated-row > span:last-child { grid-column: 2; }
}
