html, body {
    margin: 0;
    height: 100%;
    background-color: #F4F6F8;
}

/* Fixed AppBar (64px) â keep page content fully clear of it. */
.assistify-main.mud-main-content {
    padding-top: 88px !important; /* 64px app bar + 24px gap */
    padding-right: 24px !important;
    padding-bottom: 24px !important;
    padding-left: 24px !important;
    transition: margin-left 280ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.assistify-page {
    max-width: 100%;
}

.assistify-appbar.mud-appbar,
.assistify-appbar .mud-toolbar {
    min-height: 64px !important;
    height: 64px !important;
    overflow: hidden;
    /* Exact DVA logo blue (#0046B9) â logo bg merges into the bar */
    background-color: #0046B9 !important;
    background-image: none !important;
}

.assistify-drawer.mud-drawer {
    background-color: #0046B9 !important;
}

.assistify-brand-logo {
    display: block;
    height: 52px;
    width: auto;
    max-width: 140px;
    margin-left: 4px;
    margin-right: 0;
    object-fit: contain;
    object-position: left center;
    /* Transparent mark â white DVA sits directly on nav blue */
    background: transparent !important;
    border: 0;
    outline: 0;
    box-shadow: none;
    border-radius: 0;
    pointer-events: none;
    user-select: none;
}

.assistify-product-name {
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.95;
    white-space: nowrap;
}

.assistify-login-display {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    line-height: 1;
}

.assistify-user-name {
    font-size: 0.875rem;
    color: #fff;
}

.assistify-auth-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.assistify-auth-link:hover {
    text-decoration: underline;
    color: #E3F2FD;
}

/* Smooth mini-drawer expand / collapse on hover */
.assistify-drawer.mud-drawer,
.assistify-drawer .mud-drawer-content,
.mud-drawer.mud-drawer-mini {
    transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.assistify-drawer .mud-nav-link,
.assistify-drawer .mud-nav-link-text,
.assistify-drawer .mud-nav-group-title {
    transition: background-color 160ms ease, border-color 160ms ease, opacity 200ms ease, max-width 280ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.assistify-nav {
    padding-top: 0.25rem !important;
}

.assistify-nav-group .mud-nav-group-button {
    min-height: 40px;
}

/* Drawer links stay readable on brand blue â no solid fill that washes out text */
.assistify-drawer .mud-nav-link,
.assistify-drawer .mud-nav-link .mud-nav-link-icon,
.assistify-drawer .mud-nav-link .mud-nav-link-text,
.assistify-drawer .mud-nav-group-button,
.assistify-drawer .mud-nav-group-title {
    color: #E8F0FF !important;
}

.assistify-drawer .mud-nav-link:hover:not(.mud-nav-link-disabled),
.assistify-drawer .mud-nav-group-button:hover {
    background-color: rgba(255, 255, 255, 0.10) !important;
    color: #FFFFFF !important;
}

.assistify-drawer .mud-nav-link:hover:not(.mud-nav-link-disabled) .mud-nav-link-icon,
.assistify-drawer .mud-nav-link:hover:not(.mud-nav-link-disabled) .mud-nav-link-text {
    color: #FFFFFF !important;
}

/* Active: left accent + soft wash â text/icons stay white */
.assistify-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: rgba(255, 255, 255, 0.14) !important;
    color: #FFFFFF !important;
    border-radius: 6px;
    box-shadow: inset 3px 0 0 0 #FFFFFF;
    font-weight: 600;
}

.assistify-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon,
.assistify-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-text {
    color: #FFFFFF !important;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .reload {
    margin-right: 1rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* SLA status panel */
.sla-status-panel {
    border-left-width: 4px !important;
    border-left-style: solid !important;
    border-radius: 10px !important;
    overflow: hidden;
}

.sla-overall-met { border-left-color: var(--mud-palette-success) !important; }
.sla-overall-on-track { border-left-color: var(--mud-palette-info) !important; }
.sla-overall-at-risk { border-left-color: var(--mud-palette-warning) !important; }
.sla-overall-breached { border-left-color: var(--mud-palette-error) !important; }
.sla-overall-pending,
.sla-overall-na { border-left-color: var(--mud-palette-lines-default) !important; }

.sla-status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: #fafbfc;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.sla-status-head-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sla-status-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sla-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.sla-metrics-single {
    grid-template-columns: 1fr;
}

@media (max-width: 720px) {
    .sla-metrics {
        grid-template-columns: 1fr;
    }
}

.sla-metric {
    padding: 14px 16px;
    border-right: 1px solid var(--mud-palette-lines-default);
    background: #fff;
}

.sla-metrics .sla-metric:last-child,
.sla-metrics-single .sla-metric {
    border-right: 0;
}

@media (max-width: 720px) {
    .sla-metric {
        border-right: 0;
        border-top: 1px solid var(--mud-palette-lines-default);
    }

    .sla-metrics .sla-metric:first-child {
        border-top: 0;
    }
}

.sla-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sla-metric-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sla-bar-track {
    height: 10px;
    border-radius: 999px;
    background: #e8ecf1;
    overflow: hidden;
}

.sla-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.35s ease;
    position: relative;
}

.sla-bar-fill.on-track {
    background: linear-gradient(90deg, #0288d1, #0046b9);
}

.sla-bar-fill.at-risk {
    background: linear-gradient(90deg, #ffb74d, #ed6c02);
}

.sla-bar-fill.breached {
    background: linear-gradient(90deg, #ef5350, #d32f2f);
}

.sla-bar-fill.met {
    background: linear-gradient(90deg, #66bb6a, #2e7d32);
}

.sla-bar-fill.paused {
    background: repeating-linear-gradient(
        -45deg,
        #90a4ae,
        #90a4ae 6px,
        #b0bec5 6px,
        #b0bec5 12px
    );
    transition: none;
}

.sla-bar-fill.live::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: rgba(255, 255, 255, 0.55);
    animation: sla-pulse 1.6s ease-in-out infinite;
}

@keyframes sla-pulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.95; }
}

.sla-bar-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.sla-bar-remain {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.sla-bar-remain.on-track { color: #0288d1; }
.sla-bar-remain.at-risk { color: #ed6c02; }
.sla-bar-remain.breached { color: #d32f2f; }
.sla-bar-remain.met { color: #2e7d32; }
.sla-bar-remain.paused { color: #78909c; }

.sla-metric-detail {
    margin-top: 8px;
}

.sla-metric-paused {
    background: #fafbfc;
}

/* Compact fact list (replaces icon fact cards on Summary / Overview) */
.ticket-fact-list {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.ticket-fact-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 0.875rem;
}

.ticket-fact-row:first-child {
    border-top: 0;
}

.ticket-fact-label {
    color: var(--mud-palette-text-secondary);
}

.ticket-fact-value {
    font-weight: 550;
    min-width: 0;
}

.ticket-fact-sub {
    display: block;
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    margin-top: 2px;
}

.ticket-section-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mud-palette-text-secondary);
    font-weight: 700;
    margin: 0 0 8px;
}

.ticket-report-prose {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    padding: 14px 16px;
    background: #fafbfc;
    margin-bottom: 1rem;
}

.ticket-report-split {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 16px;
}

@media (max-width: 800px) {
    .ticket-fact-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .ticket-report-split {
        grid-template-columns: 1fr;
    }
}

/* User action required (waiting on requester) */
.user-action-required-panel {
    border: 1px solid rgba(237, 108, 2, 0.45);
    border-left: 4px solid var(--mud-palette-warning);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.07) 0%, rgba(255, 255, 255, 1) 55%);
    border-radius: 12px;
}

.user-action-required-icon {
    flex-shrink: 0;
}

.user-action-required-request {
    background: #fff;
    border: 1px solid rgba(237, 108, 2, 0.25);
    border-radius: 8px;
}

.user-action-required-label {
    color: var(--mud-palette-warning-darken);
    font-weight: 600;
    letter-spacing: 0.06em;
}

/* User incident detail (My Requests) */
.user-incident-detail {
    max-width: 960px;
}

.user-incident-back {
    text-transform: none;
    font-weight: 500;
}

.user-incident-header {
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(25, 118, 210, 0.06) 0%, #fff 100%);
    border-left: 4px solid var(--mud-palette-primary);
}

.user-incident-identity {
    flex: 1;
    min-width: 0;
}

.user-incident-number-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.user-incident-number-icon {
    color: var(--mud-palette-primary);
}

.user-incident-number {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--mud-palette-primary-darken);
    background: rgba(25, 118, 210, 0.12);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(25, 118, 210, 0.28);
}

.user-incident-title {
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.user-incident-tabs {
    border-radius: 12px;
    overflow: hidden;
}

.user-incident-tab-panel {
    min-height: 200px;
}

.user-incident-fact {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: #fafbfc;
    height: 100%;
}

.user-incident-fact .mud-icon-root {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.user-incident-resolution {
    border: 1px solid rgba(46, 125, 50, 0.35);
    background: rgba(46, 125, 50, 0.05);
    border-radius: 8px;
}

/* Requestor Resolved / Closed — single Outcome card */
.req-outcome {
    border: 1px solid #A5D6A7;
    background: linear-gradient(180deg, #F1F8F2 0%, #fff 48%);
    border-radius: 10px;
    padding: 18px 18px 14px;
}
.req-outcome-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.req-outcome-icon {
    color: #2E7D32 !important;
    font-size: 28px !important;
    margin-top: 2px;
}
.req-outcome-kicker {
    margin: 0 0 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2E7D32;
}
.req-outcome-title {
    font-weight: 650 !important;
    line-height: 1.3 !important;
}
.req-outcome-body { margin: 0 0 16px; }
.req-outcome-label {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5E6C84;
}
.req-outcome-text {
    white-space: pre-wrap;
    line-height: 1.55 !important;
}
.req-outcome-rate {
    border-top: 1px solid #C8E6C9;
    padding-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.req-outcome-rate-copy {
    flex: 1;
    min-width: 200px;
}
.req-outcome-rate-copy strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.req-outcome-rate-copy span {
    font-size: 0.8125rem;
    color: #5E6C84;
}
.req-outcome-stars {
    display: flex;
    gap: 2px;
    align-items: center;
}
.req-outcome-foot {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #C8E6C9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.req-outcome-foot p {
    margin: 0;
    font-size: 0.8125rem;
    color: #5E6C84;
    flex: 1;
    min-width: 180px;
}
.req-outcome-reopen {
    text-decoration: underline !important;
    text-underline-offset: 3px;
    font-weight: 650 !important;
    font-size: 0.8125rem !important;
}

/* Agent incident detail */
.agent-incident-detail {
    max-width: 1100px;
}

.agent-incident-header {
    border-left-color: var(--mud-palette-secondary);
}

.agent-incident-actions {
    border-radius: 12px;
    background: #f8f9fb;
}

/* Admin */
.admin-hub-card {
    height: 100%;
}

.admin-user-search {
    min-width: 280px;
}

/* Change-log area filter chips */
.admin-audit-filters {
    max-width: 100%;
}

.admin-sla-table .mud-table-cell {
    vertical-align: top;
}

.admin-matrix-scroll {
    overflow-x: auto;
}

.admin-matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-matrix-table th,
.admin-matrix-table td {
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: middle;
}

.admin-matrix-table thead th {
    background: #f5f7fa;
    font-weight: 600;
    text-align: center;
}

.admin-matrix-corner {
    min-width: 140px;
    text-align: left !important;
}

.admin-matrix-table tbody th {
    background: #fafbfc;
    text-align: left;
    white-space: nowrap;
}

.admin-matrix-table td {
    min-width: 180px;
}

.admin-holiday-name {
    min-width: 220px;
}

.my-requests-filter {
    min-width: 160px;
}

.my-requests-search {
    flex: 1;
    min-width: 220px;
}

/* Service catalog (end-user) */
.service-catalog {
    max-width: 960px;
}

.service-catalog-search {
    max-width: 100%;
}

.service-catalog-topic {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    text-align: left;
    padding: 1rem 1rem 1rem 0.85rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-height: 108px;
}

.service-catalog-topic:hover {
    border-color: var(--mud-palette-primary);
    background: rgba(25, 118, 210, 0.04);
    box-shadow: 0 1px 4px rgba(15, 40, 80, 0.08);
}

.service-catalog-topic:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.service-catalog-topic-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 118, 210, 0.1);
    color: var(--mud-palette-primary);
}

.service-catalog-topic-body {
    flex: 1;
    min-width: 0;
}

.service-catalog-topic-count {
    display: block;
    margin-top: 0.35rem;
    color: var(--mud-palette-text-secondary);
}

.service-catalog-topic-chevron {
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary);
}

.service-catalog-item {
    border-radius: 10px;
}

.service-catalog-item-text {
    flex: 1;
    min-width: 12rem;
}

.service-catalog-item-note {
    color: #b26a00;
}

/* Change Request journey + checklist + audit (enterprise) */
.change-journey {
    margin-bottom: 1.25rem;
}

.change-journey-header {
    margin-bottom: 0.75rem;
}

.change-journey-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0;
    align-items: stretch;
}

.change-journey-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 5.5rem;
    min-width: 4.75rem;
    max-width: 8rem;
    text-align: center;
    padding: 0 0.25rem 0.5rem;
}

.change-journey-marker {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid #c5d4eb;
    background: #fff;
    color: #616161;
    z-index: 1;
}

.change-journey-step--done .change-journey-marker {
    background: #0046B9;
    border-color: #0046B9;
    color: #fff;
}

.change-journey-step--current .change-journey-marker {
    background: #fff;
    border-color: #0046B9;
    color: #0046B9;
    box-shadow: 0 0 0 3px rgba(0, 70, 185, 0.18);
}

.change-journey-step--attention .change-journey-marker {
    background: #fff;
    border-color: #ED6C02;
    color: #ED6C02;
    box-shadow: 0 0 0 3px rgba(237, 108, 2, 0.18);
}

.change-journey-title {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #212121;
    line-height: 1.2;
}

.change-journey-hint {
    display: block;
    font-size: 0.68rem;
    color: #757575;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.change-journey-step--todo .change-journey-title,
.change-journey-step--todo .change-journey-hint {
    color: #9e9e9e;
}

.change-journey-connector {
    position: absolute;
    top: 0.85rem;
    left: calc(50% + 0.95rem);
    width: calc(100% - 1.9rem);
    height: 2px;
    background: #d7e0ec;
}

.change-journey-connector--done {
    background: #0046B9;
}

.change-checklist-header {
    margin-bottom: 1rem;
}

.change-checklist-bar {
    height: 6px;
    border-radius: 4px;
}

.change-checklist-phase {
    border-radius: 10px;
    border-left: 4px solid #c5d4eb;
    background: #fff;
}

.change-checklist-phase--active {
    border-left-color: #0046B9;
    background: linear-gradient(180deg, rgba(0, 70, 185, 0.05) 0%, #fff 55%);
}

.change-checklist-phase--done {
    border-left-color: #2E7D32;
    background: linear-gradient(180deg, rgba(46, 125, 50, 0.06) 0%, #fff 55%);
}

.change-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.change-checklist-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.35rem 0.15rem;
}

.change-checklist-item-icon {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.change-checklist-item.is-pending .change-checklist-item-body {
    opacity: 0.92;
}

.change-audit-header {
    margin-bottom: 0.25rem;
}

.change-audit-list {
    display: flex;
    flex-direction: column;
}

.change-audit-item {
    display: flex;
    gap: 0.85rem;
    min-height: 3.5rem;
}

.change-audit-rail {
    width: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.change-audit-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    margin-top: 0.35rem;
    background: #90a4ae;
    flex-shrink: 0;
}

.change-audit-dot--primary { background: #0046B9; }
.change-audit-dot--warning { background: #ED6C02; }
.change-audit-dot--info { background: #0288D1; }
.change-audit-dot--success { background: #2E7D32; }
.change-audit-dot--secondary { background: #455A64; }
.change-audit-dot--dark { background: #37474f; }

.change-audit-line {
    flex: 1;
    width: 2px;
    background: #d7e0ec;
    margin: 0.25rem 0 0;
}

.change-audit-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
}

.change-audit-item.is-latest .change-audit-card {
    border-color: rgba(0, 70, 185, 0.35);
    box-shadow: 0 1px 0 rgba(0, 70, 185, 0.06);
}

.change-audit-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .change-journey-rail {
        flex-direction: column;
        align-items: stretch;
    }

    .change-journey-step {
        flex-direction: row;
        align-items: center;
        max-width: none;
        text-align: left;
        gap: 0.75rem;
        padding: 0.35rem 0;
    }

    .change-journey-copy {
        flex: 1;
    }

    .change-journey-connector {
        display: none;
    }
}


/* Analyst workspace  module switcher */
.analyst-workspace-eyebrow {
    letter-spacing: 0.12em;
    color: #0046B9;
    font-weight: 600;
}

.analyst-module-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.analyst-module-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #d7e0ec;
    background: #fff;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.analyst-module-card:hover:not(:disabled) {
    border-color: rgba(0, 70, 185, 0.45);
    background: rgba(0, 70, 185, 0.03);
}

.analyst-module-card:disabled {
    opacity: 0.7;
    cursor: wait;
}

.analyst-module-card.is-active {
    border-color: #0046B9;
    background: linear-gradient(180deg, rgba(0, 70, 185, 0.08) 0%, #fff 70%);
    box-shadow: 0 0 0 1px rgba(0, 70, 185, 0.2);
}

.analyst-module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: #eef3fb;
    color: #0046B9;
    flex-shrink: 0;
}

.analyst-module-card.is-active .analyst-module-icon {
    background: #0046B9;
    color: #fff;
}

.analyst-module-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.analyst-module-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #212121;
}

.analyst-module-desc {
    font-size: 0.75rem;
    color: #757575;
    line-height: 1.3;
}

.analyst-module-active-tag {
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0046B9;
    background: rgba(0, 70, 185, 0.1);
    border: 1px solid rgba(0, 70, 185, 0.25);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.analyst-workspace-context {
    border-radius: 12px;
    border-left: 4px solid #0046B9;
    background: linear-gradient(180deg, rgba(0, 70, 185, 0.04) 0%, #fff 100%);
}

.analyst-workspace-queues {
    border-radius: 12px;
    overflow: hidden;
}

.analyst-change-pipeline {
    background: #fafbfc;
}

@media (max-width: 900px) {
    .analyst-module-switch {
        grid-template-columns: 1fr;
    }
}

.analyst-group-queue-switch {
    display: flex;
    flex-flow: row nowrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: var(--mud-palette-background);
}

.analyst-group-queue-option {
    appearance: none;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0.45rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.analyst-group-queue-option.is-selected {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-color: var(--mud-palette-lines-default);
}

.analyst-ticket-number {
    font-variant-numeric: tabular-nums;
}

.ticket-prose {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ticket-prose a,
.mud-chip.ticket-prose {
    overflow-wrap: anywhere;
    max-width: 100%;
    height: auto;
    white-space: normal;
}

.sla-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 16rem;
    padding: 0.12rem 0.5rem 0.12rem 0.4rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
}

.sla-pill::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    flex: 0 0 auto;
    background: currentColor;
}

.sla-pill.is-healthy,
.sla-pill.is-met {
    color: #1b5e20;
    background: rgba(46, 125, 50, 0.08);
    border-color: rgba(46, 125, 50, 0.28);
}

.sla-pill.is-steady {
    color: #01579b;
    background: rgba(2, 136, 209, 0.08);
    border-color: rgba(2, 136, 209, 0.28);
}

.sla-pill.is-tight {
    color: #e65100;
    background: rgba(237, 108, 2, 0.1);
    border-color: rgba(237, 108, 2, 0.35);
}

.sla-pill.is-breached {
    color: #b71c1c;
    background: rgba(211, 47, 47, 0.08);
    border-color: rgba(211, 47, 47, 0.4);
}

.sla-pill.is-idle {
    color: #616161;
    background: transparent;
    border-color: rgba(0, 0, 0, 0.12);
    font-weight: 500;
}

.analyst-group-queue-option:focus-visible {
    outline: 2px solid var(--mud-palette-text-primary);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .analyst-group-queue-switch {
        flex-flow: row nowrap;
    }

    .analyst-group-queue-option {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* Approvals inbox (user-facing) */
.approvals-eyebrow {
    letter-spacing: 0.12em;
    color: #0046B9;
    font-weight: 600;
}

.approvals-inbox-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 1280px) {
    .approvals-inbox-switch {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .approvals-inbox-switch {
        grid-template-columns: 1fr;
    }
}

.approvals-inbox-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #d7e0ec;
    background: #fff;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.approvals-inbox-card:hover {
    border-color: rgba(0, 70, 185, 0.45);
    background: rgba(0, 70, 185, 0.03);
}

.approvals-inbox-card.is-active {
    border-color: #0046B9;
    background: linear-gradient(180deg, rgba(0, 70, 185, 0.08) 0%, #fff 70%);
    box-shadow: 0 0 0 1px rgba(0, 70, 185, 0.2);
}

.approvals-inbox-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: #eef3fb;
    color: #0046B9;
    flex-shrink: 0;
}

.approvals-inbox-card.is-active .approvals-inbox-icon {
    background: #0046B9;
    color: #fff;
}

.approvals-inbox-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.approvals-inbox-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.approvals-inbox-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #212121;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.approvals-inbox-desc {
    font-size: 0.72rem;
    color: #757575;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.approvals-inbox-count {
    flex-shrink: 0;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: #616161;
    background: #eceff1;
}

.approvals-inbox-count.has-items {
    color: #fff;
    background: #0046B9;
}

.approvals-context {
    border-radius: 12px;
    border-left: 4px solid #0046B9;
    background: linear-gradient(180deg, rgba(0, 70, 185, 0.04) 0%, #fff 100%);
}

.approvals-item {
    border-radius: 12px;
    background: #fff;
}

.approvals-item-main {
    flex: 1;
    min-width: 14rem;
}

.approvals-ticket-number {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #0046B9;
    background: rgba(0, 70, 185, 0.1);
    border: 1px solid rgba(0, 70, 185, 0.22);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
}

.approvals-actions {
    flex-shrink: 0;
}

.approvals-empty {
    border-radius: 12px;
    text-align: center;
    background: #fafbfc;
}

.approvals-meta {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.approvals-meta > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.approvals-meta span {
    font-size: 0.75rem;
    color: #757575;
}

.approvals-meta strong {
    font-size: 0.9rem;
    font-weight: 600;
}

.approvals-meta small {
    font-size: 0.75rem;
    color: #9e9e9e;
}

.approvals-details-panel .mud-expand-panel {
    background: transparent;
    box-shadow: none !important;
}

/* Assessment read-only overview (analyst) */
.assessment-readonly-header {
    margin-bottom: 0.85rem;
}

.assessment-readonly-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid #d7e0ec;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(0, 70, 185, 0.04) 0%, #fff 70%);
}

@media (min-width: 900px) {
    .assessment-readonly-facts {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.assessment-fact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.assessment-fact span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #757575;
}

.assessment-fact strong {
    font-size: 0.9rem;
    font-weight: 650;
    color: #212121;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.assessment-fact small {
    font-size: 0.72rem;
    color: #9e9e9e;
    overflow-wrap: anywhere;
}

.assessment-readonly-notes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 900px) {
    .assessment-readonly-notes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.assessment-note {
    min-width: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #fff;
}

.assessment-note--wide {
    grid-column: 1 / -1;
}

.assessment-note-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0046B9;
}

.assessment-note p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #424242;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 9.5rem;
    overflow: auto;
}

/* Home */
.home-page {
    max-width: 100%;
}

.home-hello {
    margin: 0 0 22px;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: #212121;
}

.home-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 28px;
}

.home-modules a.approvals-inbox-card {
    text-decoration: none;
}

.home-modules .approvals-inbox-desc {
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-line-clamp: unset;
}

.home-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.home-cell {
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(33, 33, 33, 0.14);
    border-radius: 8px;
    padding: 14px 16px 8px;
    transition: background 180ms ease, border-color 180ms ease;
}

.home-cell:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(33, 33, 33, 0.22);
}

.home-cell header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "title count" "hint count";
    align-items: center;
    column-gap: 12px;
    margin-bottom: 8px;
}

.home-cell h2 {
    grid-area: title;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #212121;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-cell header p {
    grid-area: hint;
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #616161;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-count {
    grid-area: count;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 2.75rem;
    height: 1.75rem;
    padding: 0 10px 0 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.home-count::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.home-approvals .home-count {
    color: #8F6B00;
    border-color: #E6B325;
    background: #FFF6CC;
}

.home-replies .home-count {
    color: #D32F2F;
    border-color: #E57373;
    background: #FDECEC;
}

.home-raised .home-count {
    color: #0046B9;
    border-color: #64B5F6;
    background: #E8F1FC;
}

.home-solved .home-count {
    color: #2E7D32;
    border-color: #81C784;
    background: #E8F5E9;
}

.home-cell.is-clear .home-count {
    color: #616161;
    border-color: rgba(33, 33, 33, 0.18);
    background: rgba(255, 255, 255, 0.6);
}

.home-cell table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.8125rem;
}

.home-cell th {
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    color: #455A64;
    background: transparent;
}

.home-cell td {
    padding: 8px;
    border-top: 1px solid rgba(33, 33, 33, 0.08);
    vertical-align: middle;
}

.home-cell th,
.home-cell td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-cell th:first-child,
.home-cell td:first-child {
    width: 11.5rem;
}

.home-cell th:last-child,
.home-cell td:last-child {
    width: 9.5rem;
    text-align: right;
}

.home-cell tbody tr:hover {
    background: rgba(0, 70, 185, 0.05);
}

.home-cell td a {
    color: #0046B9;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-more {
    display: inline-block;
    margin: 8px 8px 6px;
    color: #0046B9;
    font-size: 0.8125rem;
    font-weight: 600;
}

@media (max-width: 720px) {
    .home-modules,
    .home-board {
        grid-template-columns: 1fr;
    }
}

.home-layout-loading .home-skel,
.home-layout-loading .home-skel-card,
.home-layout-loading .home-skel-section {
    background: rgba(33, 33, 33, 0.06);
    animation: home-layout-pulse 1.4s ease-in-out infinite;
}

.home-skel-hello {
    width: 11rem;
    height: 1.5rem;
    margin: 0 0 22px;
    border-radius: 6px;
}

.home-skel-card {
    min-height: 4.75rem;
    pointer-events: none;
    border-radius: 12px;
}

.home-skel-section {
    min-height: 16rem;
    pointer-events: none;
}

.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;
}

@keyframes home-layout-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .home-cell {
        transition: none;
    }

    .home-layout-loading .home-skel,
    .home-layout-loading .home-skel-card,
    .home-layout-loading .home-skel-section {
        animation: none;
    }
}


/* Technical notes — Jira-style handoff log (shared panel) */
.tn-panel {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    max-height: min(70vh, 720px);
    border: 1px solid #DFE1E6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.tn-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #DFE1E6;
    background: #FAFBFC;
}

.tn-title-block { flex: 1; min-width: 200px; }
.tn-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tn-title { font-weight: 600 !important; margin: 0 !important; }
.tn-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #FFFAE6;
    color: #974F0C;
    border: 1px solid #FFE380;
}
.tn-pill .mud-icon-root { font-size: 14px !important; }

.tn-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.tn-search { min-width: 180px; max-width: 220px; }
.tn-sort { min-width: 140px; max-width: 160px; }
.tn-count { white-space: nowrap; }

.tn-feed {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 12px;
}

.tn-day {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 6px;
    color: #5E6C84;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.tn-day::before,
.tn-day::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #DFE1E6;
}

.tn-entry {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    padding: 10px 16px;
    border-left: 3px solid #FF8B00;
}
.tn-entry:hover { background: #F4F5F7; }

.tn-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

.tn-entry-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin-bottom: 4px;
}
.tn-author { font-size: 0.875rem; font-weight: 600; }
.tn-action { font-size: 0.8125rem; color: #5E6C84; }
.tn-time {
    font-size: 0.75rem;
    color: #5E6C84;
    margin-left: auto;
    white-space: nowrap;
    cursor: help;
}

.tn-body {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #172B4D;
}
.tn-body.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tn-more {
    border: 0;
    background: transparent;
    color: #0046B9;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 4px 0 0;
    cursor: pointer;
}
.tn-more:hover { text-decoration: underline; }

.tn-files {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tn-file {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 440px;
    padding: 6px 10px;
    border: 1px solid #DFE1E6;
    border-radius: 3px;
    background: #fff;
    text-decoration: none;
    color: #172B4D;
    font-size: 0.8125rem;
}
.tn-file:hover {
    background: #F4F5F7;
    border-color: #C1C7D0;
}
.tn-file-name {
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tn-file-meta { color: #5E6C84; font-size: 0.75rem; }

.tn-empty {
    margin: 28px 16px;
    padding: 28px;
    text-align: center;
    border: 1px dashed #C1C7D0;
    border-radius: 8px;
    background: #FAFBFC;
}
.tn-empty-icon {
    font-size: 40px !important;
    opacity: 0.4;
    margin-bottom: 8px;
}

.tn-compose {
    border-top: 1px solid #DFE1E6;
    padding: 12px 16px 14px;
    background: #fff;
    flex-shrink: 0;
}
.tn-compose-box {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
}
.tn-compose-main {
    border: 1px solid #DFE1E6;
    border-radius: 3px;
    background: #FAFBFC;
}
.tn-compose-main:focus-within {
    background: #fff;
    border-color: #4C9AFF;
    box-shadow: 0 0 0 1px #4C9AFF;
}
.tn-compose-field .mud-input-outlined-border { border: 0 !important; }
.tn-compose-field .mud-input-control { margin: 0 !important; }
.tn-compose-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 8px;
    border-top: 1px solid #DFE1E6;
}
.tn-compose-hint { flex: 1; min-width: 140px; }
.tn-pending {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px 6px;
}

@media (max-width: 900px) {
    .tn-time { margin-left: 0; width: 100%; }
    .tn-panel { max-height: none; }
}

/* —— Activity stream (Incident / Service Request) —— */
.act-panel {
    display: flex;
    flex-direction: column;
    min-height: 280px;
    max-height: min(70vh, 720px);
    background: #F6F7F9;
    border: 1px solid #E2E5EA;
    border-radius: 8px;
    overflow: hidden;
}
.act-toolbar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #DFE1E6;
    background: #fff;
}
.act-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}
.act-toolbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.act-toolbar-title .mud-icon-root { color: #4F6A92; }
.act-count { margin-left: auto; }
.act-toolbar-filters .act-filter-check { margin: 0; }
.act-role-select { min-width: 160px; max-width: 200px; }
.act-search { min-width: 180px; max-width: 260px; flex: 1; }

.act-feed {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 8px;
    position: relative;
}
.act-entry {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}
.act-entry:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: -10px;
    width: 2px;
    background: #C8CED5;
}
.act-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    position: relative;
    z-index: 1;
    border: 2px solid #F6F7F9;
}
.act-icon .mud-icon-root { font-size: 18px !important; color: #fff !important; }
.act-icon.updates { background: #4F6A92; }
.act-icon.submitted { background: #2E7D32; }
.act-icon.automatic { background: #6B778C; }

.act-card {
    background: #fff;
    border: 1px solid #E2E5EA;
    border-radius: 2px;
    padding: 10px 12px 12px;
    box-shadow: 0 1px 0 rgba(29, 35, 41, 0.04);
}
.act-card-head { margin-bottom: 4px; }
.act-type { font-weight: 700 !important; color: #1D2329; }
.act-meta {
    font-size: 0.75rem;
    color: #5E6A75;
    line-height: 1.4;
    margin-top: 2px;
}
.act-meta strong { color: #4A5560; font-weight: 600; }
.act-sep { margin: 0 6px; color: #BDC4CC; }

.act-fields {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #EEF0F3;
}
.act-fields li {
    display: grid;
    grid-template-columns: minmax(7rem, 9rem) 1fr;
    gap: 8px 12px;
    padding: 7px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 0.8125rem;
    line-height: 1.45;
}
.act-fields li:last-child { border-bottom: 0; padding-bottom: 0; }
.act-field-name { color: #5E6A75; font-weight: 500; }
.act-field-values {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.act-arrow { color: #5E6A75; font-size: 0.875rem; }

/* Status chips — match TicketActivityPanel / Mud StatusColor */
.act-st-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    color: #fff;
}
.act-st-pill.st-new { background: #607d8b; }
.act-st-pill.st-progress { background: #0288d1; }
.act-st-pill.st-waiting { background: #ed6c02; }
.act-st-pill.st-solved { background: #2e7d32; }
.act-st-pill.st-closed { background: #455a64; }
.act-st-pill.st-cancelled { background: #d32f2f; }
.act-st-pill.is-old { background: #fff !important; font-weight: 600; }
.act-st-pill.is-old.st-new { color: #607d8b !important; border-color: #607d8b; }
.act-st-pill.is-old.st-progress { color: #0288d1 !important; border-color: #0288d1; }
.act-st-pill.is-old.st-waiting { color: #ed6c02 !important; border-color: #ed6c02; }
.act-st-pill.is-old.st-solved { color: #2e7d32 !important; border-color: #2e7d32; }
.act-st-pill.is-old.st-closed { color: #455a64 !important; border-color: #455a64; }
.act-st-pill.is-old.st-cancelled { color: #d32f2f !important; border-color: #d32f2f; }

.act-pri-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #ed6c02;
    color: #fff;
}
.act-pri-pill.is-old {
    background: #fff;
    color: #ed6c02;
    border: 1px solid #ed6c02;
}
.act-val-plain {
    font-size: 0.8125rem;
    color: #1D2329;
    font-weight: 600;
}
.act-val-plain.is-old {
    color: #5E6A75;
    font-weight: 400;
    text-decoration: line-through;
    opacity: 0.85;
}

.act-note {
    margin: 8px 0 0;
    padding: 8px 10px;
    background: #F8F9FB;
    border-left: 3px solid #BDC4CC;
    font-size: 0.8125rem;
    color: #1D2329;
    line-height: 1.45;
}
.act-note-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5E6A75;
    margin-bottom: 2px;
}

.act-footer {
    flex-shrink: 0;
    border-top: 1px solid #DFE1E6;
    padding: 8px 14px;
    background: #fff;
}
.act-empty {
    margin: 28px 8px;
    padding: 28px;
    text-align: center;
    border: 1px dashed #C1C7D0;
    border-radius: 8px;
    background: #FAFBFC;
    color: #5E6A75;
}
.act-empty-icon {
    font-size: 40px !important;
    opacity: 0.45;
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .act-fields li { grid-template-columns: 1fr; gap: 2px; }
    .act-search { max-width: none; width: 100%; }
    .act-panel { max-height: none; }
}

/* —— Messages conversation (Incident / SR / Change) —— */
.msg-panel {
    display: flex;
    flex-direction: column;
    min-height: 280px;
    max-height: min(70vh, 720px);
    background: #F7F8FA;
    border: 1px solid #E2E5EA;
    border-radius: 8px;
    overflow: hidden;
}
.msg-toolbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #DFE1E6;
    background: #fff;
}
.msg-toolbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.msg-toolbar-title .mud-icon-root { color: #0046B9; }
.msg-count { margin-left: auto; }
.msg-toolbar-sub {
    width: 100%;
    margin-top: -2px;
}
.msg-waiting {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: #FFF3E0;
    border-bottom: 1px solid #FFCC80;
    color: #E65100;
    font-size: 0.8125rem;
    line-height: 1.45;
}
.msg-waiting .mud-icon-root { color: #E65100; flex-shrink: 0; margin-top: 1px; }
.msg-waiting strong { color: #BF360C; }
.msg-resolution {
    flex-shrink: 0;
    padding: 10px 14px;
    border-bottom: 1px solid #DFE1E6;
    background: #fff;
}
.msg-feed {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 8px;
}
.msg-feed-end { height: 1px; outline: none; }
.msg-day {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 12px;
    color: #5E6C84;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.msg-day::before,
.msg-day::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #DFE1E6;
}
.msg-row {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    margin-bottom: 14px;
    max-width: 820px;
}
.msg-row.is-mine {
    margin-left: auto;
    grid-template-columns: 1fr 40px;
}
.msg-row.is-mine .msg-bubble-wrap { order: 1; }
.msg-row.is-mine .msg-avatar { order: 2; }
.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}
.msg-bubble-wrap { min-width: 0; }
.msg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
    margin-bottom: 4px;
}
.msg-row.is-mine .msg-meta { justify-content: flex-end; }
.msg-author { font-size: 0.8125rem; font-weight: 600; }
.msg-role {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.msg-role.requestor { background: #E3FCEF; color: #00875A; }
.msg-role.analyst { background: #DEEBFF; color: #0052CC; }
.msg-role.you { background: #E8F0FF; color: #0046B9; }
.msg-time {
    font-size: 0.75rem;
    color: #5E6C84;
    margin-left: auto;
}
.msg-row.is-mine .msg-time { margin-left: 0; margin-right: auto; order: -1; }
.msg-bubble {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #DFE1E6;
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    box-shadow: 0 1px 0 rgba(9, 30, 66, 0.04);
}
.msg-row.is-mine .msg-bubble {
    background: #E8F0FF;
    border-color: #B3D4FF;
    border-bottom-right-radius: 2px;
}
.msg-row:not(.is-mine) .msg-bubble { border-bottom-left-radius: 2px; }
.msg-bubble.is-requestor { background: #fff; }
.msg-files { margin-top: 8px; }
.msg-files .mud-list { margin-bottom: 0 !important; padding: 0; }
.msg-empty {
    margin: 32px 8px;
    padding: 28px;
    text-align: center;
    border: 1px dashed #C1C7D0;
    border-radius: 8px;
    background: #FAFBFC;
    color: #5E6C84;
}
.msg-empty-icon {
    font-size: 40px !important;
    opacity: 0.45;
    margin-bottom: 8px;
}
.msg-compose {
    flex-shrink: 0;
    border-top: 1px solid #DFE1E6;
    padding: 12px 14px 14px;
    background: #fff;
}
.msg-compose-box {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
}
.msg-compose-main {
    border: 1px solid #DFE1E6;
    border-radius: 3px;
    background: #FAFBFC;
}
.msg-compose-main:focus-within {
    background: #fff;
    border-color: #4C9AFF;
    box-shadow: 0 0 0 1px #4C9AFF;
}
.msg-compose-field .mud-input-control { margin: 0 !important; }
.msg-compose-field .mud-input { padding: 10px 12px !important; }
.msg-pending {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px 6px;
}
.msg-compose-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 8px;
    border-top: 1px solid #DFE1E6;
}
.msg-compose-hint { flex: 1; min-width: 120px; }

@media (max-width: 900px) {
    .msg-row,
    .msg-row.is-mine {
        grid-template-columns: 40px 1fr;
        margin-left: 0;
    }
    .msg-row.is-mine .msg-bubble-wrap,
    .msg-row.is-mine .msg-avatar { order: unset; }
    .msg-row.is-mine .msg-avatar { display: none; }
    .msg-row.is-mine { grid-template-columns: 1fr; }
    .msg-panel { max-height: none; }
}

/* Satisfaction feedback (in-ticket modal + sticky chip) */
.sat-stars {
    display: flex;
    gap: 4px;
    align-items: center;
}
.sat-star {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 4px;
    cursor: pointer;
    color: #B0BEC5;
    border-radius: 8px;
    line-height: 0;
    transition: color 0.12s ease, transform 0.12s ease;
}
.sat-star:hover,
.sat-star.is-on {
    color: #F9A825;
}
.sat-star:hover {
    transform: scale(1.08);
}
.sat-star:disabled {
    cursor: default;
    transform: none;
}
.sat-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #FFE082;
    border-radius: 10px;
    background: linear-gradient(180deg, #FFFDE7 0%, #FFF8E1 100%);
    color: #5D4037;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sat-chip:hover {
    border-color: #FFCA28;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.sat-chip-stars {
    letter-spacing: 1px;
    color: #F9A825;
    font-size: 14px;
    line-height: 1;
}
.sat-chip-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}
.sat-result {
    border-color: #FFE082 !important;
    background: #FFFDE7;
}
