* {
    box-sizing: border-box;
}

:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;

    color: #183540;
    background: #f3f7f9;
    font-synthesis: none;

    --ink: #183540;
    --muted: #6d848d;
    --line: #dce7eb;
    --surface: #ffffff;
    --surface-soft: #f7fafb;
    --brand: #176b78;
    --brand-dark: #125b66;
    --sidebar: #12313f;
    --sidebar-soft: #1a4352;
}

body {
    margin: 0;
    min-height: 100vh;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(23, 107, 120, .10), transparent 32%),
        #f3f7f9;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 36px;
    background: #fff;
    border: 1px solid #d9e6eb;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(24, 53, 64, .10);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.brand-overline {
    display: block;
    color: #69818a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.brand strong {
    display: block;
    font-size: 21px;
}

.auth-copy {
    margin: 34px 0 25px;
}

.auth-copy h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.auth-copy p,
.page-heading p,
.panel-heading p {
    color: #607983;
    line-height: 1.55;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
}

.field input,
.ticket-filters input,
.ticket-filters select {
    width: 100%;
    border: 1px solid #c9d9df;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    outline: none;
}

.field input {
    padding: 12px 13px;
}

.ticket-filters input,
.ticket-filters select {
    min-height: 40px;
    padding: 8px 10px;
}

.field input:focus,
.ticket-filters input:focus,
.ticket-filters select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(23, 107, 120, .10);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 15px;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
}

.button-primary {
    background: var(--brand);
    color: #fff;
}

.button-primary:hover {
    background: var(--brand-dark);
}

.button-secondary {
    background: #edf3f5;
    color: #284b57;
}

.button-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.alert {
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 14px;
}

.alert-error {
    border: 1px solid #f0c5c5;
    background: #fff1f1;
    color: #8a3030;
}

.auth-help {
    margin: 23px 0 0;
    text-align: center;
    color: #7c9097;
    font-size: 12px;
}

/* APP LAYOUT */

.app-page {
    background: #f3f7f9;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    color: #eaf3f5;
    background: var(--sidebar);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 5px 7px 22px;
    text-decoration: none;
}

.sidebar-brand small,
.sidebar-brand strong {
    display: block;
}

.sidebar-brand small {
    color: #9fb8c1;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
}

.sidebar-brand strong {
    margin-top: 2px;
    font-size: 17px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    min-height: 42px;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 3px;
    border-radius: 8px;
    text-decoration: none;
    color: #cfe0e5;
    font-size: 13px;
    font-weight: 700;
}

.nav-item:hover {
    background: rgba(255,255,255,.06);
}

.nav-item.active {
    color: #fff;
    background: var(--sidebar-soft);
}

.nav-icon {
    text-align: center;
    font-size: 16px;
}

.nav-disabled {
    opacity: .55;
    cursor: default;
}

.nav-disabled small {
    color: #a8bdc4;
    font-size: 9px;
    font-weight: 700;
}

.nav-group {
    margin-bottom: 6px;
}

.nav-subitems {
    display: grid;
    margin: 2px 0 9px 43px;
}

.nav-subitems a {
    padding: 5px 6px;
    color: #9fb8c1;
    text-decoration: none;
    font-size: 11px;
}

.nav-subitems a:hover {
    color: #fff;
}

.nav-section {
    display: block;
    padding: 18px 10px 7px;
    color: #7899a5;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-footer {
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.10);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f4f6;
    color: var(--sidebar);
    font-weight: 900;
}

.sidebar-user-copy {
    min-width: 0;
}

.sidebar-user-copy strong,
.sidebar-user-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-copy strong {
    font-size: 12px;
}

.sidebar-user-copy small {
    margin-top: 2px;
    color: #98b2bb;
    font-size: 9px;
}

.sidebar-logout {
    width: 100%;
    min-height: 35px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: transparent;
    color: #cfe0e5;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-logout:hover {
    background: rgba(255,255,255,.06);
}

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

.app-topbar {
    min-height: 62px;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.app-topbar > div:first-child strong {
    font-size: 14px;
}

.session-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: #eaf7f2;
    color: #286c55;
    font-size: 10px;
    font-weight: 900;
}

.content-shell {
    width: min(1440px, calc(100% - 44px));
    margin: 0 auto;
    padding: 30px 0 52px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.08;
}

.page-heading p {
    margin: 8px 0 0;
    font-size: 14px;
}

.eyebrow {
    margin: 0 0 5px !important;
    color: var(--brand) !important;
    text-transform: uppercase;
    font-size: 10px !important;
    font-weight: 900;
    letter-spacing: .13em;
}

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

.stat-card {
    padding: 19px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(30, 57, 69, .04);
}

.stat-link {
    text-decoration: none;
    transition: transform .12s ease, border-color .12s ease;
}

.stat-link:hover {
    transform: translateY(-1px);
    border-color: #b7cdd5;
}

.stat-card span,
.stat-card small {
    display: block;
}

.stat-card span {
    margin-bottom: 8px;
    color: #6f858d;
    font-size: 11px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    font-size: 29px;
}

.stat-card small {
    margin-top: 6px;
    color: #91a2a8;
    font-size: 10px;
}

.panel {
    margin-top: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(30, 57, 69, .04);
}

.panel-heading {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #edf2f4;
}

.panel-heading h2 {
    margin: 0;
    font-size: 16px;
}

.panel-heading p {
    margin: 3px 0 0;
    font-size: 11px;
}

/* DASHBOARD MINI LIST */

.ticket-mini-list {
    display: grid;
}

.ticket-mini-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto 96px;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-top: 1px solid #edf2f4;
    text-decoration: none;
}

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

.ticket-mini-row:hover {
    background: #f9fbfc;
}

.ticket-number {
    color: var(--brand);
    font-size: 11px;
    font-weight: 900;
}

.ticket-mini-main {
    min-width: 0;
}

.ticket-mini-main strong,
.ticket-mini-main span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-mini-main strong {
    font-size: 12px;
}

.ticket-mini-main span {
    margin-top: 3px;
    color: #789098;
    font-size: 10px;
}

.ticket-mini-date {
    color: #768c94;
    text-align: right;
    font-size: 10px;
}

/* TICKETS */

.ticket-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 4px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.ticket-tabs a {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 7px;
    color: #617b84;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.ticket-tabs a.active {
    background: #eaf4f6;
    color: var(--brand);
}

.ticket-filter-panel {
    margin-top: 0;
}

.ticket-filters {
    display: grid;
    grid-template-columns:
        minmax(240px, 2fr)
        repeat(5, minmax(120px, 1fr))
        auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
}

.ticket-filters label:not(.filter-search) {
    display: grid;
    gap: 5px;
    color: #71868e;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

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

.ticket-list-panel {
    overflow: hidden;
}

.ticket-results-heading {
    padding-top: 14px;
    padding-bottom: 14px;
}

.ticket-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1080px;
}

.ticket-table th {
    padding: 10px 12px;
    background: #f8fafb;
    border-bottom: 1px solid #e6eef1;
    color: #789098;
    text-align: left;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ticket-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf2f4;
    vertical-align: middle;
    font-size: 11px;
}

.ticket-table tbody tr:hover {
    background: #fbfcfd;
}

.ticket-subject-cell {
    min-width: 320px;
    max-width: 480px;
}

.ticket-row-link {
    display: block;
    text-decoration: none;
}

.ticket-row-link strong,
.ticket-row-link small,
.ticket-id {
    display: block;
}

.ticket-id {
    margin-bottom: 3px;
    color: var(--brand);
    font-size: 9px;
    font-weight: 900;
}

.ticket-row-link strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.ticket-row-link small {
    margin-top: 4px;
    color: #82969d;
    font-size: 9px;
}

.person-cell strong,
.person-cell small {
    display: block;
}

.person-cell strong {
    font-size: 11px;
}

.person-cell small {
    max-width: 180px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #899ba2;
    white-space: nowrap;
    font-size: 9px;
}

.status-badge,
.priority-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 900;
}

.status-open {
    background: #e9f3ff;
    color: #346b98;
}

.status-pending,
.status-waiting {
    background: #fff5da;
    color: #8a6922;
}

.status-waiting_third_party {
    background: #f4edff;
    color: #6c4a98;
}

.status-resolved {
    background: #eaf7f2;
    color: #34725d;
}

.status-closed {
    background: #eef1f3;
    color: #64747a;
}

.priority-low {
    background: #eef5f7;
    color: #627a83;
}

.priority-normal {
    background: #eaf3ff;
    color: #456e95;
}

.priority-high {
    background: #fff3da;
    color: #8b6923;
}

.priority-urgent {
    background: #ffebeb;
    color: #a64141;
}

.nowrap {
    white-space: nowrap;
}

.empty-state {
    display: grid;
    gap: 5px;
    place-items: center;
    min-height: 160px;
    padding: 30px;
    color: #7b9199;
    text-align: center;
    font-size: 12px;
}

.empty-state strong {
    color: var(--ink);
    font-size: 14px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 18px;
    background: #fafcfc;
}

.pagination a,
.pagination .disabled {
    min-width: 95px;
    color: var(--brand);
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
}

.pagination .disabled {
    color: #b0bec3;
}

.pagination a:last-child,
.pagination .disabled:last-child {
    text-align: right;
}

.pagination-info {
    color: #738990;
    font-size: 10px;
}

/* RESPONSIVE */

@media (max-width: 1180px) {
    .ticket-filters {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

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

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar-brand {
        justify-content: center;
    }

    .sidebar-brand > span:last-child,
    .nav-item > span:nth-child(2),
    .nav-item > small,
    .nav-subitems,
    .nav-section,
    .sidebar-user-copy {
        display: none;
    }

    .nav-item {
        grid-template-columns: 1fr;
    }

    .sidebar-user {
        justify-content: center;
    }

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

    .ticket-mini-row {
        grid-template-columns: 55px minmax(0, 1fr) auto;
    }

    .ticket-mini-date {
        display: none;
    }
}

@media (max-width: 650px) {
    .content-shell {
        width: min(100% - 24px, 1440px);
        padding-top: 20px;
    }

    .app-topbar {
        padding: 0 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-heading {
        flex-direction: column;
    }

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

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

    .ticket-mini-row {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .ticket-mini-row .status-badge {
        display: none;
    }

    .auth-card {
        padding: 27px;
    }
}


/* ================================================================
   PAS 7D - FITXA DE TIQUET
   ================================================================ */

.ticket-detail-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.back-link {
    color: var(--brand);
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
}

.back-link:hover {
    text-decoration: underline;
}

.read-only-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff6dc;
    color: #795f20;
    font-size: 9px;
    font-weight: 900;
}

.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 26px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ticket-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ticket-big-number {
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
}

.ticket-detail-title h1 {
    max-width: 920px;
    margin: 9px 0 0;
    font-size: clamp(25px, 3.5vw, 38px);
    line-height: 1.15;
}

.ticket-detail-title p {
    margin: 9px 0 0;
    color: #718790;
    font-size: 11px;
}

.ticket-readonly-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.ticket-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
    align-items: start;
}

.ticket-detail-main {
    min-width: 0;
}

.ticket-detail-sidebar {
    display: grid;
    gap: 14px;
}

.conversation-panel {
    margin-top: 0;
    overflow: hidden;
}

.conversation-heading {
    position: sticky;
    top: 62px;
    z-index: 4;
    background: #fff;
}

.conversation-list {
    display: grid;
    gap: 0;
}

.message-card {
    position: relative;
    padding: 18px 20px 20px;
    border-top: 1px solid #e9f0f2;
    background: #fff;
}

.message-card:first-child {
    border-top: 0;
}

.message-card.message-internal_note {
    background: #fffaf0;
    border-left: 4px solid #e8b756;
}

.message-card.message-system {
    background: #f7f9fa;
    color: #617780;
}

.message-card.message-customer_reply {
    border-left: 4px solid #7db6cc;
}

.message-card.message-agent_reply {
    border-left: 4px solid #74b59d;
}

.message-card.message-initial {
    border-left: 4px solid #8299bb;
}

.message-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.message-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f3f5;
    color: var(--brand);
    font-size: 11px;
    font-weight: 900;
}

.message-author-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.message-author strong {
    font-size: 12px;
}

.message-author small {
    display: block;
    margin-top: 2px;
    color: #83979e;
    font-size: 9px;
}

.message-type-badge {
    padding: 3px 6px;
    border-radius: 999px;
    background: #edf3f5;
    color: #617b84;
    font-size: 8px;
    font-weight: 900;
}

.message-internal_note .message-type-badge {
    background: #fff0c9;
    color: #80611c;
}

.message-system .message-type-badge {
    background: #e9edef;
    color: #718087;
}

.message-header time {
    flex: 0 0 auto;
    color: #84989f;
    white-space: nowrap;
    font-size: 9px;
}

.message-subject {
    margin: 14px 0 0 44px;
    font-size: 11px;
    font-weight: 900;
}

.message-body {
    margin: 15px 0 0 44px;
    color: #314d58;
    line-height: 1.55;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.imported-message-html > :first-child {
    margin-top: 0 !important;
}

.imported-message-html > :last-child {
    margin-bottom: 0 !important;
}

.imported-message-html img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.imported-message-html table {
    max-width: 100%;
    border-collapse: collapse;
}

.imported-message-html td,
.imported-message-html th {
    padding: 4px 6px;
    border: 1px solid #dce7eb;
}

.imported-message-html blockquote {
    margin-left: 0;
    padding-left: 12px;
    border-left: 3px solid #d8e3e7;
    color: #657c85;
}

.imported-message-html a {
    color: var(--brand);
    overflow-wrap: anywhere;
}

.message-attachments {
    margin: 17px 0 0 44px;
    padding-top: 14px;
    border-top: 1px dashed #d9e5e9;
}

.attachment-heading {
    margin-bottom: 8px;
    color: #70868e;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-card {
    min-width: 210px;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #dce7eb;
    border-radius: 9px;
    background: #fafcfc;
    text-decoration: none;
}

.attachment-card:hover {
    border-color: #b8cdd4;
    background: #f5f9fa;
}

.attachment-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #e8f2f5;
    color: var(--brand);
    font-weight: 900;
}

.attachment-copy {
    min-width: 0;
}

.attachment-copy strong,
.attachment-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-copy strong {
    font-size: 10px;
}

.attachment-copy small {
    margin-top: 2px;
    color: #84989f;
    font-size: 8px;
}

.inline-resource-note {
    margin: 9px 0 0 44px;
    color: #91a1a7;
    font-size: 8px;
}

.detail-card {
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(30, 57, 69, .035);
}

.detail-card h2 {
    margin: 0 0 13px;
    font-size: 13px;
}

.detail-card-muted {
    background: #f8fafb;
}

.detail-list {
    margin: 0;
}

.detail-list > div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #edf2f4;
}

.detail-list > div:first-child {
    padding-top: 0;
    border-top: 0;
}

.detail-list dt {
    color: #83979e;
    font-size: 9px;
    font-weight: 800;
}

.detail-list dd {
    min-width: 0;
    margin: 0;
    color: #304b56;
    font-size: 10px;
    font-weight: 700;
}

.detail-list-compact > div {
    grid-template-columns: 84px minmax(0, 1fr);
}

.requester-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 13px;
    margin-bottom: 5px;
    border-bottom: 1px solid #edf2f4;
}

.requester-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f3f5;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

.requester-profile strong,
.requester-profile a {
    display: block;
}

.requester-profile strong {
    font-size: 11px;
}

.requester-profile a {
    margin-top: 3px;
    color: var(--brand);
    font-size: 9px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.detail-note {
    margin: 10px 0 0;
    color: #8a9ca2;
    line-height: 1.45;
    font-size: 8px;
}

.break-text {
    overflow-wrap: anywhere;
}

.simple-record-list {
    display: grid;
    gap: 7px;
}

.simple-record-list > div {
    padding: 8px 9px;
    border-radius: 8px;
    background: #f6f9fa;
}

.simple-record-list strong,
.simple-record-list small {
    display: block;
}

.simple-record-list strong {
    font-size: 10px;
}

.simple-record-list small {
    margin-top: 3px;
    color: #80949b;
    font-size: 8px;
}

.history-panel {
    overflow: hidden;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.history-block {
    padding: 17px 20px;
    border-right: 1px solid #edf2f4;
}

.history-block:nth-child(even),
.history-block:last-child {
    border-right: 0;
}

.history-block h3 {
    margin: 0 0 13px;
    font-size: 11px;
}

.history-events {
    grid-column: 1 / -1;
    border-top: 1px solid #edf2f4;
}

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

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 8px;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    margin-top: 3px;
    border-radius: 50%;
    background: #7eacba;
}

.timeline-dot-escalation {
    background: #d49b47;
}

.timeline-dot-event {
    background: #95a4aa;
}

.timeline-item strong,
.timeline-item small {
    display: block;
}

.timeline-item strong {
    font-size: 9px;
}

.timeline-item small {
    margin-top: 2px;
    color: #84989f;
    line-height: 1.4;
    font-size: 8px;
}

.not-found-panel {
    margin-top: 0;
}

@media (max-width: 1120px) {
    .ticket-detail-grid {
        grid-template-columns: minmax(0, 1fr) 270px;
    }
}

@media (max-width: 920px) {
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .conversation-heading {
        top: 62px;
    }
}

@media (max-width: 650px) {
    .ticket-detail-toolbar,
    .ticket-detail-header {
        flex-direction: column;
    }

    .ticket-readonly-actions {
        width: 100%;
    }

    .ticket-readonly-actions .button {
        flex: 1;
    }

    .ticket-detail-sidebar {
        grid-template-columns: 1fr;
    }

    .message-header {
        flex-direction: column;
        gap: 8px;
    }

    .message-header time {
        margin-left: 44px;
    }

    .message-body,
    .message-subject,
    .message-attachments,
    .inline-resource-note {
        margin-left: 0;
    }

    .attachment-card {
        min-width: 100%;
    }

    .history-grid {
        grid-template-columns: 1fr;
    }

    .history-block,
    .history-block:nth-child(even) {
        border-right: 0;
        border-top: 1px solid #edf2f4;
    }

    .history-block:first-child {
        border-top: 0;
    }
}


/* ================================================================
   PAS 7E - GESTIÓ INTERNA DEL TIQUET
   ================================================================ */

.app-flash {
    margin-bottom: 16px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
}

.app-flash-success {
    border: 1px solid #b9dfd0;
    background: #edf9f4;
    color: #286852;
}

.app-flash-error {
    border: 1px solid #efc5c5;
    background: #fff1f1;
    color: #8c3737;
}

.management-active-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8f6f0;
    color: #276950;
    font-size: 9px;
    font-weight: 900;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eeeafd;
    color: #5e4c93;
    font-size: 9px;
    font-weight: 900;
}

.message-header-initial {
    min-height: 38px;
}

.management-form,
.compact-form {
    display: grid;
    gap: 9px;
}

.management-form label,
.compact-form label {
    display: grid;
    gap: 5px;
}

.management-form label > span,
.compact-form label > span,
.current-level > span {
    color: #7c9199;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.management-form select,
.compact-form select,
.compact-form input,
.compact-form textarea {
    width: 100%;
    min-height: 36px;
    padding: 8px 9px;
    border: 1px solid #cfdde2;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    outline: none;
    font: inherit;
    font-size: 10px;
}

.compact-form textarea {
    resize: vertical;
    line-height: 1.4;
}

.management-form select:focus,
.compact-form select:focus,
.compact-form input:focus,
.compact-form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(23, 107, 120, .09);
}

.management-save,
.full-button {
    width: 100%;
    margin-top: 2px;
}

.management-help {
    margin: 9px 0 0;
    color: #82959c;
    line-height: 1.4;
    font-size: 8px;
}

.current-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
    padding: 8px 9px;
    border-radius: 8px;
    background: #f6f9fa;
}

.current-level strong {
    color: #57488c;
    font-size: 10px;
}

.third-party-active {
    padding: 10px;
    border: 1px solid #e5d49d;
    border-radius: 9px;
    background: #fffaf0;
}

.third-party-active > strong,
.third-party-active > span,
.third-party-active > a,
.third-party-active > small {
    display: block;
}

.third-party-active > strong {
    margin-top: 7px;
    font-size: 11px;
}

.third-party-active > span:not(.third-party-status),
.third-party-active > a {
    margin-top: 3px;
    color: #6f838b;
    font-size: 9px;
}

.third-party-active > a {
    color: var(--brand);
    text-decoration: none;
}

.third-party-active > p {
    margin: 9px 0;
    color: #445f69;
    line-height: 1.45;
    font-size: 9px;
}

.third-party-active > small {
    color: #8a9ca2;
    line-height: 1.4;
    font-size: 8px;
}

.third-party-status {
    width: fit-content;
    padding: 3px 6px;
    border-radius: 999px;
    background: #f5e7b8;
    color: #765c18;
    font-size: 8px;
    font-weight: 900;
}

.third-party-close-form {
    margin-top: 10px;
}

.follower-list {
    display: grid;
    gap: 6px;
}

.follower-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    background: #f6f9fa;
}

.follower-row strong,
.follower-row small {
    display: block;
}

.follower-row strong {
    font-size: 9px;
}

.follower-row small {
    margin-top: 2px;
    color: #879aa1;
    font-size: 8px;
}

.icon-action {
    width: 25px;
    height: 25px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 900;
}

.danger-action {
    background: #fcecec;
    color: #a44b4b;
}

.follower-add-form {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #edf2f4;
}

.timeline-dot-third {
    background: #c69e48;
}

@media (max-width: 920px) {
    .management-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .management-save {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .management-form {
        grid-template-columns: 1fr;
    }

    .management-save {
        grid-column: auto;
    }
}
/* ================================================================
   PAS 7E - HOTFIX DEFINITIU CAPÇALERA MISSATGE INICIAL
   Afegir AL FINAL de ~/www/support/assets/css/app.css
   ================================================================ */

.message-card.message-initial > .message-header,
.message-card.message-initial > .message-header-initial {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 38px !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.message-card.message-initial > .message-header .message-author {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

.message-card.message-initial > .message-header .message-avatar {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    place-items: center !important;
}

.message-card.message-initial > .message-header .message-author-line {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 7px !important;
}

.message-card.message-initial > .message-header strong,
.message-card.message-initial > .message-header small,
.message-card.message-initial > .message-header .message-type-badge,
.message-card.message-initial > .message-header time {
    visibility: visible !important;
    opacity: 1 !important;
}

.message-card.message-initial > .message-header strong {
    display: inline !important;
}

.message-card.message-initial > .message-header small {
    display: block !important;
}

.message-card.message-initial > .message-header .message-type-badge {
    display: inline-flex !important;
}

.message-card.message-initial > .message-header time {
    display: block !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Manté la separació correcta entre capçalera, assumpte i cos. */
.message-card.message-initial > .message-subject {
    margin-top: 14px !important;
}

@media (max-width: 650px) {
    .message-card.message-initial > .message-header,
    .message-card.message-initial > .message-header-initial {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .message-card.message-initial > .message-header time {
        margin-left: 44px !important;
    }
}


/* ================================================================
   PAS 7E - V7 FINAL
   La capçalera "Conversa" deixa de ser sticky perquè no tapi
   la capçalera del primer missatge.
   ================================================================ */

.conversation-heading {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}

/* Garantim el flux normal de la capçalera pròpia dels missatges. */
.conversation-list > .message-card > .ceeb-msg-meta {
    position: static !important;
    z-index: auto !important;
    transform: none !important;
    translate: none !important;
    inset: auto !important;
    float: none !important;
}


/* ================================================================
   PAS 7E - V8 FORMAT CAPÇALERES ceeb-msg-*
   Recupera el format visual de sol·licitant, agent, sistema i notes.
   ================================================================ */

.conversation-list > .message-card > .ceeb-msg-meta {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    z-index: auto !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 20px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #183540 !important;
    background: transparent !important;
}

.conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

.conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-avatar {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: #e9f3f5 !important;
    color: #176b78 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-author-line {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 7px !important;
    line-height: 1.2 !important;
}

.conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-author-line strong {
    display: inline !important;
    margin: 0 !important;
    color: #183540 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

.conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-author small {
    display: block !important;
    margin: 2px 0 0 !important;
    color: #83979e !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
}

.conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-type-badge {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 18px !important;
    padding: 3px 6px !important;
    border-radius: 999px !important;
    background: #edf3f5 !important;
    color: #617b84 !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.conversation-list > .message-card.message-internal_note
> .ceeb-msg-meta .ceeb-msg-type-badge {
    background: #fff0c9 !important;
    color: #80611c !important;
}

.conversation-list > .message-card.message-system
> .ceeb-msg-meta .ceeb-msg-type-badge {
    background: #e9edef !important;
    color: #718087 !important;
}

.conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-time {
    display: block !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    color: #84989f !important;
    white-space: nowrap !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
}

/* Manté l'assumpte i el cos alineats amb el text de la capçalera. */
.conversation-list > .message-card > .ceeb-msg-meta + .message-subject {
    margin-top: 14px !important;
}

/* El títol "Conversa" continua sense sticky per no tapar el primer missatge. */
.conversation-heading {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}

@media (max-width: 650px) {
    .conversation-list > .message-card > .ceeb-msg-meta {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .conversation-list > .message-card > .ceeb-msg-meta .ceeb-msg-time {
        margin-left: 44px !important;
    }
}


/* ================================================================
   PAS 7E.1 - ESTATS D'ESPERA
   ================================================================ */

.status-waiting_requester {
    background: #fff0e6;
    color: #8a542a;
}

.requester-wait-status {
    background: #ffe6d5;
    color: #89512d;
}


/* ================================================================
   PAS 7F-B - CREACIÓ MANUAL DE TIQUETS
   ================================================================ */

.create-ticket-heading {
    align-items: flex-end;
}

.create-ticket-number {
    display: flex;
    min-width: 150px;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.create-ticket-number small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.create-ticket-number strong {
    color: var(--ink);
    font-size: 24px;
}

.ticket-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.ticket-create-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.ticket-create-side {
    min-width: 0;
}

.create-section {
    padding: 0;
    overflow: visible;
}

.create-section > .panel-heading {
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line);
}

.create-section > .panel-heading h2 {
    margin: 2px 0 0;
    font-size: 18px;
}

.create-section > .form-grid,
.create-section > .compact-form {
    padding: 20px 22px 22px;
}

.form-grid {
    display: grid;
    gap: 15px;
}

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

.form-grid .full-column {
    grid-column: 1 / -1;
}

.form-grid label,
.field-block {
    display: grid;
    gap: 6px;
}

.form-grid label > span,
.field-block > span,
.compact-form label > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.contact-mode-tabs {
    display: flex;
    gap: 6px;
    padding: 18px 22px 0;
}

.contact-mode-button {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f5f9fa;
    color: var(--muted);
    padding: 9px 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.contact-mode-button.active {
    border-color: rgba(23,107,120,.25);
    background: #e8f3f5;
    color: var(--brand);
}

.contact-mode-panel {
    display: none;
    padding: 18px 22px 22px;
}

.contact-mode-panel.active {
    display: block;
}

.contact-search-results {
    display: grid;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.contact-search-results:empty {
    display: none;
}

.contact-search-result {
    display: grid;
    gap: 2px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
    padding: 11px 12px;
    text-align: left;
    cursor: pointer;
}

.contact-search-result:last-child {
    border-bottom: 0;
}

.contact-search-result:hover,
.contact-search-result:focus-visible {
    background: #f1f7f8;
}

.contact-search-result strong {
    color: var(--ink);
    font-size: 12px;
}

.contact-search-result small,
.contact-search-empty {
    color: var(--muted);
    font-size: 10px;
}

.contact-search-empty {
    padding: 11px 12px;
    background: #fff;
}

.selected-contact {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    border: 1px solid #cfe1e5;
    border-radius: 11px;
    background: #f1f8f9;
    padding: 11px 12px;
}

.selected-contact.hidden {
    display: none;
}

.selected-contact-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: #dceff2;
    color: var(--brand);
    font-weight: 900;
}

.selected-contact strong {
    display: block;
    color: var(--ink);
    font-size: 12px;
}

.selected-contact small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.button-small {
    padding: 7px 9px;
    font-size: 10px;
}

.form-help {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.attachment-drop-zone {
    display: grid;
    place-items: center;
    margin: 20px 22px 10px;
    border: 1px dashed #b9d1d6;
    border-radius: 12px;
    background: #f6fafb;
    padding: 26px 18px;
    text-align: center;
    cursor: pointer;
}

.attachment-drop-zone:hover {
    background: #eef7f8;
}

.attachment-drop-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    margin-bottom: 7px;
    border-radius: 50%;
    background: #e0f0f2;
    color: var(--brand);
    font-size: 20px;
    font-weight: 500;
}

.attachment-drop-zone strong {
    color: var(--ink);
    font-size: 12px;
}

.attachment-drop-zone small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.create-attachment-list {
    display: grid;
    gap: 7px;
    padding: 0 22px 22px;
}

.create-attachment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    padding: 9px 11px;
}

.create-attachment-row strong,
.create-attachment-row small {
    display: block;
}

.create-attachment-row strong {
    color: var(--ink);
    font-size: 10px;
}

.create-attachment-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.sticky-create-panel {
    position: sticky;
    top: 82px;
}

.create-notification-note {
    display: grid;
    gap: 3px;
    border-radius: 10px;
    background: #f3f7f8;
    padding: 11px 12px;
}

.create-notification-note strong {
    color: var(--ink);
    font-size: 10px;
}

.create-notification-note span {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.flash-error {
    border: 1px solid #efc2c2;
    background: #fff1f1;
    color: #922d2d;
}

@media (max-width: 1050px) {
    .ticket-create-grid {
        grid-template-columns: 1fr;
    }

    .sticky-create-panel {
        position: static;
    }
}

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

    .create-ticket-heading {
        align-items: flex-start;
    }

    .create-ticket-number {
        align-items: flex-start;
    }

    .selected-contact {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .selected-contact .button-small {
        grid-column: 1 / -1;
    }
}


/* ================================================================
   PAS 7F-C - NOTIFICACIÓ AL SOL·LICITANT
   ================================================================ */

.create-notification-choice {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    border: 1px solid #cfe1e5;
    border-radius: 10px;
    background: #f1f8f9;
    padding: 11px 12px;
    cursor: pointer;
}

.create-notification-choice input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--brand);
}

.create-notification-choice strong,
.create-notification-choice small {
    display: block;
}

.create-notification-choice strong {
    color: var(--ink);
    font-size: 10px;
}

.create-notification-choice small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

/* ================================================================
   PAS 7H-A - SISTEMA VISUAL DE TIQUETS
   Missatges, badges, prioritat, estat, nivell i assignació
   ================================================================ */

/* --- Conversa: separació visual clara per tipus de missatge --- */
.conversation-list > .message-card {
    transition: background-color .16s ease, box-shadow .16s ease;
}

.conversation-list > .message-card.message-initial {
    background: #f5f7fb;
    border-left: 5px solid #7d93b5;
}

.conversation-list > .message-card.message-customer_reply {
    background: #edf9fc;
    border-left: 5px solid #2f91aa;
    box-shadow: inset 0 0 0 1px rgba(47, 145, 170, .10);
}

.conversation-list > .message-card.message-agent_reply {
    background: #f0f8f4;
    border-left: 5px solid #4f9b7d;
    box-shadow: inset 0 0 0 1px rgba(79, 155, 125, .08);
}

.conversation-list > .message-card.message-internal_note {
    background: #fff8e8;
    border-left: 5px solid #d8a536;
    box-shadow: inset 0 0 0 1px rgba(216, 165, 54, .10);
}

.conversation-list > .message-card.message-system {
    background: #f3f6f7;
    border-left: 5px solid #a7b4b9;
}

/* --- Avatar segons el tipus --- */
.conversation-list > .message-card.message-initial
> .ceeb-msg-meta .ceeb-msg-avatar {
    background: #e6ebf4 !important;
    color: #536b91 !important;
}

.conversation-list > .message-card.message-customer_reply
> .ceeb-msg-meta .ceeb-msg-avatar {
    background: #d7f0f6 !important;
    color: #17677a !important;
}

.conversation-list > .message-card.message-agent_reply
> .ceeb-msg-meta .ceeb-msg-avatar {
    background: #dff1e8 !important;
    color: #2f7258 !important;
}

.conversation-list > .message-card.message-internal_note
> .ceeb-msg-meta .ceeb-msg-avatar {
    background: #f8e9bd !important;
    color: #7c5d13 !important;
}

/* --- Tag del tipus de missatge --- */
.conversation-list > .message-card.message-initial
> .ceeb-msg-meta .ceeb-msg-type-badge {
    background: #e5eaf3 !important;
    border: 1px solid #cdd7e7 !important;
    color: #526988 !important;
}

.conversation-list > .message-card.message-customer_reply
> .ceeb-msg-meta .ceeb-msg-type-badge {
    background: #d3eef5 !important;
    border: 1px solid #acdce8 !important;
    color: #155d70 !important;
}

.conversation-list > .message-card.message-agent_reply
> .ceeb-msg-meta .ceeb-msg-type-badge {
    background: #dcefe6 !important;
    border: 1px solid #badfce !important;
    color: #28664e !important;
}

.conversation-list > .message-card.message-internal_note
> .ceeb-msg-meta .ceeb-msg-type-badge {
    background: #f9e7b5 !important;
    border: 1px solid #edcf78 !important;
    color: #73540c !important;
}

.conversation-list > .message-card.message-system
> .ceeb-msg-meta .ceeb-msg-type-badge {
    background: #e4e9eb !important;
    border: 1px solid #d2dadd !important;
    color: #5f7178 !important;
}

/* L'assumpte guanya contrast en les respostes que requereixen atenció. */
.conversation-list > .message-card.message-customer_reply > .message-subject {
    color: #164f5d;
}

.conversation-list > .message-card.message-agent_reply > .message-subject {
    color: #285f4a;
}

/* --- Estat: badges més fàcils de distingir --- */
.status-badge {
    border: 1px solid transparent;
}

.status-open {
    background: #e7f3ff;
    border-color: #c9e1f5;
    color: #275f8b;
}

.status-pending,
.status-waiting {
    background: #fff1cf;
    border-color: #efd99a;
    color: #76570f;
}

.status-waiting_third_party {
    background: #f1e9ff;
    border-color: #d9c8f5;
    color: #5e4088;
}

.status-resolved {
    background: #e4f6ed;
    border-color: #c5e5d5;
    color: #28654f;
}

.status-closed {
    background: #edf1f3;
    border-color: #d8e0e3;
    color: #586c74;
}

/* --- Prioritat: jerarquia visual més clara --- */
.priority-badge {
    border: 1px solid transparent;
}

.priority-low {
    background: #f0f5f7;
    border-color: #dce6e9;
    color: #5d737c;
}

.priority-normal {
    background: #e9f2ff;
    border-color: #ccdef3;
    color: #365f87;
}

.priority-high {
    background: #fff0cf;
    border-color: #efd290;
    color: #805b0b;
}

.priority-urgent {
    background: #ffe5e5;
    border-color: #efbcbc;
    color: #982f2f;
    box-shadow: 0 0 0 2px rgba(152, 47, 47, .05);
}

/* --- Nivell d'escalat --- */
.level-badge {
    border: 1px solid transparent;
}

.level-badge-n1,
.current-level-n1 {
    background: #eaf3ff;
    border-color: #cfdef1;
}

.level-badge-n1,
.current-level-n1 strong {
    color: #35648d;
}

.level-badge-n2,
.current-level-n2 {
    background: #fff2d8;
    border-color: #edd49b;
}

.level-badge-n2,
.current-level-n2 strong {
    color: #805e16;
}

.level-badge-n3,
.current-level-n3 {
    background: #ffe8e8;
    border-color: #eebebe;
}

.level-badge-n3,
.current-level-n3 strong {
    color: #933636;
}

/* --- Agent i grup: informació visible però no d'alerta --- */
.assignment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border: 1px solid #d8e4e8;
    border-radius: 999px;
    background: #f5f8f9;
    color: #566e77;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 900;
}

.assignment-group::before,
.assignment-agent::before {
    margin-right: 4px;
    color: #81949b;
    font-weight: 700;
}

.assignment-group::before {
    content: "Grup ·";
}

.assignment-agent::before {
    content: "Agent ·";
}

/* --- Sidebar: el nivell actual segueix el mateix codi de colors --- */
.current-level {
    border: 1px solid transparent;
}

/* Accessibilitat: el color mai és l'únic indicador; el text/badge es manté. */
@media (prefers-reduced-motion: reduce) {
    .conversation-list > .message-card {
        transition: none;
    }
}

/* ================================================================
   PAS 7H-A2 - COMPLETAR SISTEMA VISUAL DE TIQUETS
   Vista activa: show_pas7e_v7.php
   ================================================================ */

/* --- Correcció de selectors reals de la capçalera dels missatges --- */
.conversation-list > .message-card.message-initial .ceeb-msg-avatar {
    background: #e6ebf4 !important;
    color: #536b91 !important;
}

.conversation-list > .message-card.message-customer_reply .ceeb-msg-avatar {
    background: #d7f0f6 !important;
    color: #17677a !important;
}

.conversation-list > .message-card.message-agent_reply .ceeb-msg-avatar {
    background: #dff1e8 !important;
    color: #2f7258 !important;
}

.conversation-list > .message-card.message-internal_note .ceeb-msg-avatar {
    background: #f8e9bd !important;
    color: #7c5d13 !important;
}

/* Cobertura compatible per al tag del tipus de missatge. */
.conversation-list > .message-card.message-initial .ceeb-msg-type-badge,
.conversation-list > .message-card.message-initial .message-type-badge {
    background: #e5eaf3 !important;
    border: 1px solid #cdd7e7 !important;
    color: #526988 !important;
}

.conversation-list > .message-card.message-customer_reply .ceeb-msg-type-badge,
.conversation-list > .message-card.message-customer_reply .message-type-badge {
    background: #d3eef5 !important;
    border: 1px solid #acdce8 !important;
    color: #155d70 !important;
}

.conversation-list > .message-card.message-agent_reply .ceeb-msg-type-badge,
.conversation-list > .message-card.message-agent_reply .message-type-badge {
    background: #dcefe6 !important;
    border: 1px solid #badfce !important;
    color: #28664e !important;
}

.conversation-list > .message-card.message-internal_note .ceeb-msg-type-badge,
.conversation-list > .message-card.message-internal_note .message-type-badge {
    background: #f9e7b5 !important;
    border: 1px solid #edcf78 !important;
    color: #73540c !important;
}

.conversation-list > .message-card.message-system .ceeb-msg-type-badge,
.conversation-list > .message-card.message-system .message-type-badge {
    background: #e4e9eb !important;
    border: 1px solid #d2dadd !important;
    color: #5f7178 !important;
}

/* --- Nivell a la capçalera --- */
.level-badge-n1 {
    background: #eaf3ff !important;
    border: 1px solid #cfdef1 !important;
    color: #35648d !important;
}

.level-badge-n2 {
    background: #fff2d8 !important;
    border: 1px solid #edd49b !important;
    color: #805e16 !important;
}

.level-badge-n3 {
    background: #ffe8e8 !important;
    border: 1px solid #eebebe !important;
    color: #933636 !important;
}

/* --- Nivell actual a la sidebar --- */
.current-level.current-level-n1 {
    background: #f0f6ff;
    border: 1px solid #d4e2f3;
}

.current-level.current-level-n1 strong {
    color: #35648d;
}

.current-level.current-level-n2 {
    background: #fff7e6;
    border: 1px solid #ecd9aa;
}

.current-level.current-level-n2 strong {
    color: #805e16;
}

.current-level.current-level-n3 {
    background: #fff0f0;
    border: 1px solid #edcaca;
}

.current-level.current-level-n3 strong {
    color: #933636;
}

/* --- Assignació visible a la capçalera --- */
.assignment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border: 1px solid #d8e4e8;
    border-radius: 999px;
    background: #f5f8f9;
    color: #566e77;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 900;
}

.assignment-group {
    background: #f2f6f7;
}

.assignment-agent {
    background: #eef6f5;
    color: #45676d;
}

/* PAS 7H-A2 - evitar duplicació Grup/Agent */
.assignment-group::before,
.assignment-agent::before {
    content: none !important;
    margin-right: 0 !important;
}

/* ================================================================
   PAS 7H-B - SISTEMA VISUAL DE LA LLISTA GENERAL DE TIQUETS
   ================================================================ */

.ticket-table tbody tr.ticket-row-visual > td {
    transition: background-color .14s ease;
}

.ticket-table tbody tr.ticket-row-awaiting-us > td {
    background: #edf9fc;
}

.ticket-table tbody tr.ticket-row-awaiting-us:hover > td {
    background: #e4f5f9;
}

.ticket-table tbody tr.ticket-row-agent-replied > td {
    background: #f7fbf9;
}

.ticket-table tbody tr.ticket-row-agent-replied:hover > td {
    background: #f0f8f4;
}

.ticket-table tbody tr.ticket-row-initial > td {
    background: #fbfcfe;
}

.ticket-table tbody tr.ticket-row-initial:hover > td {
    background: #f5f8fc;
}

.ticket-table tbody tr.ticket-row-awaiting-us .ticket-subject-cell {
    box-shadow: inset 5px 0 0 #2f91aa;
}

.ticket-table tbody tr.ticket-row-agent-replied .ticket-subject-cell {
    box-shadow: inset 5px 0 0 #6aa98f;
}

.ticket-table tbody tr.ticket-row-initial .ticket-subject-cell {
    box-shadow: inset 5px 0 0 #8799b5;
}

.ticket-last-message-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 6px;
    padding: 3px 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}

.ticket-last-message-customer {
    background: #d3eef5;
    border-color: #acdce8;
    color: #155d70;
}

.ticket-last-message-agent {
    background: #dcefe6;
    border-color: #badfce;
    color: #28664e;
}

.ticket-last-message-initial {
    background: #e5eaf3;
    border-color: #cdd7e7;
    color: #526988;
}

.ticket-list-level {
    display: inline-flex;
    align-items: center;
    margin-left: 3px;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.2;
    vertical-align: middle;
}

.ticket-list-level.level-n1 {
    background: #eaf3ff;
    border-color: #cfdef1;
    color: #35648d;
}

.ticket-list-level.level-n2 {
    background: #fff2d8;
    border-color: #edd49b;
    color: #805e16;
}

.ticket-list-level.level-n3 {
    background: #ffe8e8;
    border-color: #eebebe;
    color: #933636;
}

.ticket-list-assignment {
    display: inline-flex;
    align-items: center;
    max-width: 180px;
    padding: 4px 7px;
    border: 1px solid #d8e4e8;
    border-radius: 999px;
    background: #f5f8f9;
    color: #566e77;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-list-assignment.agent {
    background: #eef6f5;
    color: #45676d;
}

.ticket-list-assignment.empty {
    background: #fafbfb;
    color: #91a1a7;
    font-weight: 700;
}

.ticket-table .priority-urgent {
    box-shadow: 0 0 0 2px rgba(152, 47, 47, .05);
}

.ticket-table .priority-high {
    box-shadow: 0 0 0 1px rgba(128, 91, 11, .04);
}

@media (max-width: 900px) {
    .ticket-last-message-badge,
    .ticket-list-assignment {
        white-space: normal;
    }
}

/* ================================================================
   PAS 7H-C - CONVERSA NATIVA: RESPON + NOTA INTERNA
   ================================================================ */

.ticket-conversation-composer {
    margin: 0 0 18px;
    padding: 18px 20px;
    border: 1px solid #dce7eb;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(30, 57, 69, .04);
}

.ticket-conversation-composer.is-reply {
    border-left: 5px solid #6aa98f;
}

.ticket-conversation-composer.is-note {
    border-left: 5px solid #d8a536;
    background: #fffdf7;
}

.ticket-conversation-composer h2 {
    margin: 0;
    font-size: 16px;
}

.ticket-conversation-composer p {
    margin: 6px 0 0;
    color: #718790;
    font-size: 10px;
    line-height: 1.5;
}

.ticket-conversation-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.ticket-conversation-form textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 12px 13px;
    border: 1px solid #c9d9df;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    outline: none;
    font: inherit;
    line-height: 1.5;
}

.ticket-conversation-form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(23, 107, 120, .10);
}

.ticket-conversation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-compose-recipient {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf7f8;
    color: #32646d;
    font-size: 9px;
    font-weight: 800;
}

.ticket-compose-warning {
    margin-top: 12px !important;
    padding: 10px 12px;
    border: 1px solid #efc5c5;
    border-radius: 9px;
    background: #fff1f1;
    color: #8c3737 !important;
    font-weight: 800;
}

.ticket-readonly-actions .button.active-compose {
    box-shadow: 0 0 0 3px rgba(23, 107, 120, .10);
}

@media (max-width: 650px) {
    .ticket-conversation-actions .button {
        flex: 1;
    }
}

/* ================================================================
   PAS 7H-C2 - RESPOSTA DE TERCERS
   ================================================================ */

/* Conversa: resposta rebuda del tercer actiu. */
.conversation-list > .message-card.message-third-party-reply {
    background: #f6f1fc !important;
    border-left-color: #7857a6 !important;
}

.conversation-list > .message-card.message-third-party-reply .ceeb-msg-avatar {
    background: #eadff7 !important;
    color: #68478f !important;
}

.conversation-list > .message-card.message-third-party-reply .ceeb-msg-type-badge,
.conversation-list > .message-card.message-third-party-reply .message-type-badge {
    background: #eadff7 !important;
    border-color: #d4c0eb !important;
    color: #65448d !important;
    font-size: 0 !important;
}

.conversation-list > .message-card.message-third-party-reply .ceeb-msg-type-badge::after,
.conversation-list > .message-card.message-third-party-reply .message-type-badge::after {
    content: "Resposta del tercer";
    font-size: 8px;
    font-weight: 900;
}

/* Llista general. */
.ticket-table tbody tr.ticket-row-third-party > td {
    background: #faf6ff;
}

.ticket-table tbody tr.ticket-row-third-party:hover > td {
    background: #f4edfc;
}

.ticket-table tbody tr.ticket-row-third-party .ticket-subject-cell {
    box-shadow: inset 5px 0 0 #7857a6;
}

.ticket-last-message-third-party {
    background: #eadff7;
    border-color: #d4c0eb;
    color: #65448d;
}

/* ================================================================
   PAS 7H-C4A - NOTA INTERNA: AVISOS I SEGUIMENT
   ================================================================ */

.internal-note-notify-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #ead9a9;
    border-radius: 10px;
    background: #fffaf0;
}

.internal-note-notify-box > strong {
    font-size: 11px;
    color: #604c19;
}

.internal-note-notify-box > p {
    margin: -5px 0 0;
    color: #806d3a;
    font-size: 9px;
    line-height: 1.45;
}

.internal-note-checkbox {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.internal-note-checkbox input {
    width: auto !important;
    margin-top: 2px;
}

.internal-note-checkbox span {
    font-size: 10px;
    line-height: 1.4;
}

.notify-agent-list {
    display: grid;
    gap: 6px;
    max-height: 190px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #eadfbe;
    border-radius: 8px;
    background: #fff;
}

.notify-agent-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 7px;
    border-radius: 7px;
    background: #fbfcfc;
}

.notify-agent-row:hover {
    background: #f4f8f8;
}

.notify-agent-row input {
    width: auto !important;
}

.notify-agent-row span {
    display: block;
    min-width: 0;
}

.notify-agent-row strong,
.notify-agent-row small {
    display: block;
}

.notify-agent-row strong {
    font-size: 9px;
}

.notify-agent-row small {
    margin-top: 2px;
    color: #83969d;
    font-size: 8px;
}

.notify-agent-follower {
    margin-left: auto;
    color: #4f7b69;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

/* ================================================================
   PAS 7H-C4B - ADJUNTS A RESPOSTES I NOTES INTERNES
   ================================================================ */

.ticket-compose-attachments {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid #dce7ea;
    border-radius: 10px;
    background: #f8fbfc;
}

.ticket-compose-attachments > span {
    font-size: 10px;
    font-weight: 800;
    color: #244651;
}

.ticket-compose-attachments input[type="file"] {
    width: 100%;
    font-size: 9px;
}

.ticket-compose-attachments small {
    color: #728890;
    font-size: 8px;
    line-height: 1.45;
}

.ticket-compose-attachment-list {
    display: grid;
    gap: 5px;
    margin-top: 2px;
}

.ticket-compose-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 9px;
    border: 1px solid #d6e4e7;
    border-radius: 8px;
    background: #fff;
    color: #294c58;
    font-size: 9px;
}

.ticket-compose-attachment-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-compose-attachment-item small {
    flex: 0 0 auto;
    margin: 0;
    font-size: 8px;
}

/* ================================================================
   PAS 8A - CONFIGURACIÓ BACKEND
   Disseny encapsulat amb prefix config-* per no interferir amb Tiquets.
   ================================================================ */

.config-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 2px 0 22px;
}

.config-page-head h1 {
    margin: 3px 0 4px;
    color: #14354a;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.02;
    letter-spacing: -.035em;
}

.config-page-head p:not(.config-eyebrow) {
    margin: 0;
    color: #69818e;
    font-size: 14px;
    line-height: 1.5;
}

.config-eyebrow {
    margin: 0 !important;
    color: #176b78 !important;
    font-size: 10px !important;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.config-page-head-actions {
    align-items: center;
}

.config-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.config-button-icon {
    gap: 8px;
}

.config-button-icon .config-svg {
    width: 17px;
    height: 17px;
}

.config-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.config-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    border-radius: 999px;
}

.config-icon.mini {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 14px;
}

.config-icon.mini .config-svg {
    width: 17px;
    height: 17px;
}

.config-icon-green {
    color: #198b67;
    background: #e4f5ee;
}

.config-icon-green-soft {
    color: #16856a;
    background: #e8f6f1;
}

.config-icon-blue {
    color: #1d74c7;
    background: #e7f2fe;
}

.config-icon-purple {
    color: #7a42be;
    background: #f1e8fd;
}

.config-icon-red {
    color: #d34b51;
    background: #fdecee;
}

.config-icon-amber {
    color: #c17b0e;
    background: #fff1d9;
}

.config-icon-slate {
    color: #456676;
    background: #edf3f5;
}

.config-arrow {
    margin-left: auto;
    color: #37616e;
    font-size: 24px;
    line-height: 1;
}

.config-flash {
    margin: -6px 0 18px;
    padding: 12px 15px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 800;
}

.config-flash-success {
    border: 1px solid #bce2d1;
    background: #edf9f4;
    color: #28684f;
}

.config-flash-error {
    border: 1px solid #efc5c5;
    background: #fff1f1;
    color: #8c3737;
}

.config-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.config-summary-card {
    min-height: 104px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px 19px;
    border: 1px solid #dce7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(24, 53, 64, .035);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.config-summary-card:hover {
    transform: translateY(-1px);
    border-color: #bcd3da;
    box-shadow: 0 12px 30px rgba(24, 53, 64, .07);
}

.config-summary-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.config-summary-copy small {
    color: #3b5965;
    font-size: 11px;
    font-weight: 800;
}

.config-summary-copy strong {
    color: #14354a;
    font-size: 28px;
    line-height: 1.05;
}

.config-summary-copy em {
    color: #799099;
    font-size: 9px;
    font-style: normal;
}

.config-section {
    margin-top: 18px;
}

.config-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px;
}

.config-section-title h2,
.config-panel-head h2 {
    margin: 0;
    color: #183d4c;
    font-size: 18px;
    letter-spacing: -.015em;
}

.config-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.config-module-card {
    min-height: 126px;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 13px;
    padding: 17px;
    border: 1px solid #dce7eb;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(24, 53, 64, .025);
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.config-module-card:not(.is-readonly):hover {
    transform: translateY(-1px);
    border-color: #bcd3da;
    box-shadow: 0 10px 24px rgba(24, 53, 64, .055);
}

.config-module-card > span:nth-child(2) {
    display: grid;
    gap: 5px;
}

.config-module-card strong {
    color: #18394a;
    font-size: 14px;
}

.config-module-card small {
    color: #6f8791;
    font-size: 10px;
    line-height: 1.45;
}

.config-module-card em {
    width: fit-content;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4f6;
    color: #55717b;
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
}

.config-module-card b {
    align-self: center;
    color: #2f6573;
    font-size: 20px;
}

.config-module-card.is-readonly {
    background: #fbfcfd;
}

.config-module-card.is-readonly strong,
.config-module-card.is-readonly small {
    opacity: .88;
}

.config-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 14px;
    margin-top: 14px;
}

.config-panel,
.config-editor-card,
.config-filter-bar,
.config-segmented {
    border: 1px solid #dce7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(24, 53, 64, .025);
}

.config-panel {
    overflow: hidden;
}

.config-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e7eef1;
}

.config-panel-head.compact {
    padding: 14px 16px;
}

.config-panel-head p {
    margin: 4px 0 0;
    color: #758b94;
    font-size: 9px;
}

.config-panel-head-action {
    align-items: center;
}

.config-panel-title-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.config-empty {
    padding: 26px 18px;
    color: #7b9199;
    font-size: 11px;
    text-align: center;
}

.config-activity-list {
    display: grid;
}

.config-activity-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 18px;
    border-bottom: 1px solid #edf2f4;
}

.config-activity-row:last-child {
    border-bottom: 0;
}

.config-activity-dot {
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 999px;
    background: #65aeba;
}

.config-activity-row div {
    display: grid;
    gap: 2px;
}

.config-activity-row strong {
    color: #254653;
    font-size: 10px;
}

.config-activity-row small {
    color: #81959d;
    font-size: 8px;
}

.config-quick-list {
    display: grid;
    gap: 7px;
    padding: 12px;
}

.config-quick-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 7px 10px;
    border: 1px solid #e1eaed;
    border-radius: 10px;
    background: #f8fbfc;
    text-decoration: none;
}

.config-quick-list a:hover {
    border-color: #c4d8de;
    background: #f4f9fa;
}

.config-quick-list strong {
    color: #264c59;
    font-size: 10px;
}

.config-quick-list b {
    color: #54727d;
    font-size: 18px;
}

/* AGENTS */

.config-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(150px, .8fr)) auto;
    align-items: end;
    gap: 14px;
    padding: 16px;
    margin-bottom: 14px;
}

.config-filter-bar label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.config-filter-bar label > span,
.config-editor-form label > span,
.config-password-field > span {
    color: #355864;
    font-size: 9px;
    font-weight: 900;
}

.config-filter-bar input,
.config-filter-bar select,
.config-editor-form input[type="text"],
.config-editor-form input[type="email"],
.config-editor-form input[type="password"] {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #cbdbe0;
    border-radius: 9px;
    background: #fff;
    color: #1e4350;
    outline: none;
    font: inherit;
    font-size: 11px;
}

.config-filter-bar input:focus,
.config-filter-bar select:focus,
.config-editor-form input:focus {
    border-color: #3a8995;
    box-shadow: 0 0 0 3px rgba(23, 107, 120, .08);
}

.config-filter-search > div {
    position: relative;
}

.config-filter-search .config-svg,
.config-tag-search .config-svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: #6b8791;
    pointer-events: none;
}

.config-filter-search input,
.config-tag-search input {
    padding-left: 37px !important;
}

.config-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.config-agents-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(265px, .72fr);
    gap: 14px;
}

.config-agents-side {
    display: grid;
    align-content: start;
    gap: 14px;
}

.config-table-panel {
    min-width: 0;
}

.config-table-scroll {
    overflow-x: auto;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.config-table th {
    padding: 10px 13px;
    color: #46636e;
    background: #f7fafb;
    border-bottom: 1px solid #dfe9ed;
    font-size: 8px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .035em;
    white-space: nowrap;
}

.config-table td {
    padding: 11px 13px;
    border-bottom: 1px solid #e8eff2;
    vertical-align: middle;
    font-size: 10px;
}

.config-table tbody tr:last-child td {
    border-bottom: 0;
}

.config-table tbody tr:hover td {
    background: #fcfefe;
}

.config-table tbody tr.is-muted td {
    opacity: .62;
}

.config-agent-cell,
.config-group-name {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 145px;
}

.config-agent-cell > div {
    display: grid;
    gap: 2px;
}

.config-agent-cell strong,
.config-group-name strong {
    color: #1f4350;
    font-size: 10px;
}

.config-agent-cell small {
    color: #8a9ca3;
    font-size: 8px;
}

.config-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.config-avatar.tone-1 { background: #e3f4ed; color: #258367; }
.config-avatar.tone-2 { background: #e7f2fd; color: #2e72b6; }
.config-avatar.tone-3 { background: #efe5fb; color: #7540aa; }
.config-avatar.tone-4 { background: #fde8eb; color: #c74b57; }
.config-avatar.tone-5 { background: #fff0d5; color: #a97518; }

.config-table-muted {
    color: #718891;
    font-size: 9px;
}

.config-group-copy {
    display: block;
    max-width: 180px;
    line-height: 1.4;
}

.config-role-pill,
.config-count-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    color: #325c68;
    background: #e9f4f6;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.config-count-pill-green {
    color: #33735d;
    background: #e9f6f0;
}

.config-state-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.config-state-pill i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.config-state-active {
    color: #2b835d;
    background: #e7f5ee;
}

.config-state-pending {
    color: #9a6912;
    background: #fff0d2;
}

.config-state-inactive {
    color: #667b84;
    background: #edf2f4;
}

.config-table-action {
    width: 42px;
    text-align: right;
}

.config-icon-button {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dce7eb;
    border-radius: 8px;
    color: #486b77;
    background: #fff;
    text-decoration: none;
}

.config-icon-button:hover {
    border-color: #bdd4db;
    background: #f6fafb;
}

.config-icon-button .config-svg {
    width: 14px;
    height: 14px;
}

.config-metric-list {
    display: grid;
    gap: 8px;
    padding: 10px 12px 13px;
}

.config-metric-list > div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid #e3ebee;
    border-radius: 10px;
    background: #fff;
}

.config-metric-list > div > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.config-metric-list small {
    color: #5d7882;
    font-size: 8px;
    font-weight: 800;
}

.config-metric-list strong {
    color: #153c4d;
    font-size: 18px;
    line-height: 1.1;
}

.config-metric-list .config-metric-word {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.config-metric-list em {
    color: #7b929a;
    font-size: 7px;
    font-style: normal;
}

.config-role-list {
    display: grid;
    padding: 7px 12px 12px;
}

.config-role-list > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 9px 3px;
    border-bottom: 1px solid #edf2f4;
}

.config-role-list > div:last-child {
    border-bottom: 0;
}

.config-role-list > div > span:nth-child(2) {
    display: grid;
    gap: 1px;
}

.config-role-list strong {
    color: #2b4d59;
    font-size: 9px;
}

.config-role-list small {
    color: #7d929a;
    font-size: 7px;
}

.config-role-list em {
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf5f7;
    color: #51717b;
    font-size: 7px;
    font-style: normal;
    font-weight: 900;
}

/* EDITORS */

.config-editor-card {
    margin-top: 14px;
    padding: 18px;
    scroll-margin-top: 16px;
}

.config-editor-card.compact-editor {
    max-width: 760px;
}

.config-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.config-editor-head h2 {
    margin: 3px 0 4px;
    color: #173a49;
    font-size: 21px;
}

.config-editor-head > div > p:not(.config-eyebrow) {
    margin: 0;
    color: #7a9098;
    font-size: 9px;
}

.config-close-link {
    color: #68838c;
    font-size: 9px;
    font-weight: 900;
    text-decoration: none;
}

.config-editor-form {
    display: grid;
    gap: 14px;
}

.config-form-grid {
    display: grid;
    gap: 12px;
}

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

.config-form-grid.one {
    grid-template-columns: 1fr;
}

.config-editor-form > .config-form-grid > label,
.config-password-field {
    display: grid;
    gap: 6px;
}

.config-form-box {
    display: grid;
    gap: 10px;
    padding: 13px;
    border: 1px solid #dfe8eb;
    border-radius: 11px;
    background: #f9fbfc;
}

.config-form-box > strong {
    color: #284e5b;
    font-size: 10px;
}

.config-form-box > small {
    margin-top: -6px;
    color: #7b9199;
    font-size: 8px;
}

.config-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.config-check-card,
.config-switch-row,
.config-person-check {
    cursor: pointer;
}

.config-check-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px;
    border: 1px solid #e0e8eb;
    border-radius: 9px;
    background: #fff;
}

.config-check-card input,
.config-switch-row input,
.config-person-check input,
.config-group-selector input {
    margin-top: 2px;
    accent-color: #176b78;
}

.config-check-card span,
.config-switch-row span,
.config-person-check > span:last-child {
    display: grid;
    gap: 2px;
}

.config-check-card strong,
.config-switch-row strong,
.config-person-check strong {
    color: #315460;
    font-size: 9px;
}

.config-check-card small,
.config-switch-row small,
.config-person-check small,
.config-password-field small {
    color: #84979e;
    font-size: 7px;
    line-height: 1.4;
}

.config-switch-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px solid #e8eef0;
}

.config-switch-row:last-of-type {
    border-bottom: 0;
}

.config-switch-inline {
    width: fit-content;
    min-width: 280px;
    padding: 10px 12px;
    border: 1px solid #e0e8eb;
    border-radius: 10px;
    background: #f9fbfc;
}

.config-password-field {
    margin-top: 2px;
}

.config-group-selector {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    max-height: 260px;
    overflow: auto;
    padding: 2px;
}

.config-group-selector label {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #e1e9ec;
    border-radius: 8px;
    background: #fff;
    font-size: 8px;
    cursor: pointer;
}

.config-group-selector span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.config-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* GROUPS + TAGS */

.config-segmented {
    width: min(680px, 100%);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: hidden;
    margin: -4px 0 14px;
}

.config-segmented a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 15px;
    color: #345963;
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
}

.config-segmented a.active {
    color: #166b78;
    background: #e7f3f5;
    box-shadow: inset 0 -2px 0 #176b78;
}

.config-segmented .config-svg {
    width: 17px;
    height: 17px;
}

.config-groups-panel {
    scroll-margin-top: 16px;
}

.config-groups-table td:nth-child(2) {
    min-width: 220px;
    max-width: 360px;
}

.config-tags-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, .65fr);
    gap: 14px;
    margin-top: 14px;
    scroll-margin-top: 16px;
}

.config-tag-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 13px 0;
}

.config-tag-search input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #cbdbe0;
    border-radius: 9px;
    outline: none;
    font: inherit;
    font-size: 10px;
}

.config-tag-search .config-svg {
    left: 25px;
    top: calc(50% + 5px);
}

.config-tag-cloud {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 13px 16px;
}

.config-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none;
    font-size: 9px;
    font-weight: 900;
}

.config-tag-chip em {
    min-width: 22px;
    padding: 3px 5px;
    border-radius: 999px;
    background: rgba(255,255,255,.58);
    font-size: 7px;
    font-style: normal;
    text-align: center;
}

.config-tag-chip b {
    font-size: 14px;
    opacity: .65;
}

.config-tag-chip.tone-1 { color: #2772b1; background: #e7f3fd; border-color: #d5e9fa; }
.config-tag-chip.tone-2 { color: #27795c; background: #e7f5ef; border-color: #d5eadf; }
.config-tag-chip.tone-3 { color: #7040ae; background: #f0e8fc; border-color: #e4d7f8; }
.config-tag-chip.tone-4 { color: #b64049; background: #fdebed; border-color: #f8d7db; }
.config-tag-chip.tone-5 { color: #9b6914; background: #fff1d8; border-color: #f8e4bb; }
.config-tag-chip.tone-6 { color: #496873; background: #edf3f5; border-color: #dfe8eb; }

.config-tag-chip.is-inactive {
    opacity: .48;
    filter: grayscale(.3);
}

.config-tag-new {
    color: #426471;
    background: #fff;
    border-style: dashed;
    border-color: #9fb8c0;
}

.config-tag-stats {
    align-self: start;
}

.config-agent-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.config-person-check {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e0e8eb;
    border-radius: 9px;
    background: #fff;
}

.config-person-check .config-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 9px;
}

@media (max-width: 1220px) {
    .config-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .config-filter-search {
        grid-column: 1 / -1;
    }

    .config-filter-actions {
        justify-content: flex-end;
    }

    .config-agents-layout,
    .config-tags-layout {
        grid-template-columns: 1fr;
    }

    .config-agents-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .config-group-selector {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .config-summary-grid,
    .config-bottom-grid,
    .config-form-grid.two,
    .config-agents-side {
        grid-template-columns: 1fr;
    }

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

    .config-page-head-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .config-module-grid,
    .config-filter-bar,
    .config-agent-selector,
    .config-group-selector {
        grid-template-columns: 1fr;
    }

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

    .config-summary-card {
        min-height: 88px;
    }

    .config-page-head h1 {
        font-size: 31px;
    }

    .config-head-actions,
    .config-editor-actions,
    .config-filter-actions {
        width: 100%;
    }

    .config-head-actions .button,
    .config-editor-actions .button,
    .config-filter-actions .button {
        flex: 1;
    }

    .config-editor-head {
        flex-direction: column;
    }
}

/* ================================================================
   PAS 8B - DEPARTAMENTS I NAVEGACIÓ DE CONFIGURACIÓ
   Extensió visual del PAS 8A. Tot encapsulat amb prefix config-*.
   ================================================================ */

.config-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
    color: #176b78;
    font-size: 9px;
    font-weight: 900;
    text-decoration: none;
}

.config-back-link:hover {
    color: #0e5360;
}

.config-back-link .config-svg {
    width: 13px;
    height: 13px;
}

.config-summary-grid.config-summary-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.config-department-pill,
.config-code-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    max-width: 180px;
    padding: 3px 8px;
    border: 1px solid #cfe2e6;
    border-radius: 999px;
    background: #eef8f9;
    color: #176b78;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.2;
}

.config-department-pill.is-unassigned {
    border-color: #e1e6e8;
    background: #f4f6f7;
    color: #84959b;
}

.config-code-pill {
    border-color: #e2e9eb;
    background: #f8fafb;
    color: #6b8189;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-transform: lowercase;
}

.config-department-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, .7fr);
    gap: 14px;
}

.config-department-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 15px;
}

.config-department-card {
    display: grid;
    gap: 13px;
    padding: 15px;
    border: 1px solid #dfe8eb;
    border-radius: 13px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfd 100%);
    box-shadow: 0 6px 18px rgba(24, 53, 64, .03);
}

.config-department-card.is-muted {
    opacity: .62;
}

.config-department-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.config-department-symbol {
    --department-color: #176b78;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--department-color) 12%, white);
    color: var(--department-color);
}

.config-department-symbol .config-svg {
    width: 21px;
    height: 21px;
}

.config-department-card-head > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.config-department-card-head > div > strong {
    color: #183d4c;
    font-size: 13px;
}

.config-department-card-head > div > small {
    color: #718991;
    font-size: 8px;
    line-height: 1.45;
}

.config-department-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.config-department-metrics a {
    display: grid;
    gap: 2px;
    padding: 10px 11px;
    border: 1px solid #e3ebee;
    border-radius: 10px;
    background: #f8fbfc;
    text-decoration: none;
}

.config-department-metrics a:hover {
    border-color: #bed5db;
    background: #f2f9fa;
}

.config-department-metrics small {
    color: #718991;
    font-size: 8px;
    font-weight: 800;
}

.config-department-metrics strong {
    color: #183d4c;
    font-size: 18px;
}

.config-department-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.config-department-pending .config-metric-list > a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid #e3ebee;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
}

.config-department-pending .config-metric-list > a > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.config-department-pending .config-metric-list > a b {
    color: #7d939b;
    font-size: 17px;
}

.config-info-box {
    margin: 0 12px 13px;
    padding: 11px 12px;
    border: 1px solid #dbe9ed;
    border-radius: 10px;
    background: #f4f9fb;
}

.config-info-box strong {
    display: block;
    margin-bottom: 4px;
    color: #245461;
    font-size: 9px;
}

.config-info-box p {
    margin: 0;
    color: #718990;
    font-size: 8px;
    line-height: 1.5;
}

.config-form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.config-editor-form select,
.config-editor-form input[type="color"] {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cbdbe0;
    border-radius: 9px;
    background: #fff;
    color: #1e4350;
    outline: none;
    font: inherit;
    font-size: 11px;
}

.config-editor-form input[type="color"] {
    padding: 4px;
    cursor: pointer;
}

.config-editor-form select:focus,
.config-editor-form input[type="color"]:focus {
    border-color: #3a8995;
    box-shadow: 0 0 0 3px rgba(23, 107, 120, .08);
}

.config-group-selector label > span {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.config-group-selector label > span small {
    overflow: hidden;
    color: #82969d;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.config-groups-filter {
    grid-template-columns: minmax(220px, .6fr) auto;
}

@media (max-width: 1180px) {
    .config-summary-grid.config-summary-grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .config-department-cards,
    .config-summary-grid.config-summary-grid-four,
    .config-form-grid.three {
        grid-template-columns: 1fr;
    }

    .config-department-card-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .config-department-card-head .config-state-pill {
        grid-column: 1 / -1;
        width: fit-content;
    }
}

/* Agents incorpora un filtre addicional de departament al PAS 8B. */
.config-filter-bar:not(.config-groups-filter) {
    grid-template-columns: minmax(200px, 1.15fr) repeat(4, minmax(130px, .72fr)) auto;
}

@media (max-width: 1280px) {
    .config-filter-bar:not(.config-groups-filter) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .config-filter-bar:not(.config-groups-filter) .config-filter-search {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .config-filter-bar:not(.config-groups-filter),
    .config-groups-filter {
        grid-template-columns: 1fr;
    }

    .config-filter-bar:not(.config-groups-filter) .config-filter-search {
        grid-column: auto;
    }
}

/* ================================================================
   PAS 8B.1 - ETIQUETES PER DEPARTAMENT
   ================================================================ */

.config-tag-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) minmax(210px, .8fr) auto;
    gap: 12px;
    align-items: end;
    padding: 12px 14px;
    margin: 0 0 14px;
    border: 1px solid #dce8eb;
    border-radius: 12px;
    background: #f9fbfc;
}

.config-tag-filter > label {
    display: grid;
    gap: 6px;
}

.config-tag-filter > label > span {
    font-size: 9px;
    font-weight: 800;
    color: #49636d;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.config-tag-filter-search > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid #cadde2;
    border-radius: 9px;
    background: #fff;
}

.config-tag-filter-search svg {
    width: 16px;
    height: 16px;
    color: #547682;
}

.config-tag-filter-search input {
    width: 100%;
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.config-tag-filter select {
    min-height: 40px;
}

.config-tag-chip {
    position: relative;
    padding-right: 8px;
}

.config-tag-chip small {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    color: #52707b;
    font-size: 7px;
    font-weight: 800;
    white-space: nowrap;
}

.config-tag-chip.is-unassigned-department {
    outline: 1px dashed #e0aa45;
    outline-offset: -1px;
}

.config-tag-classification-info {
    margin: 0 0 14px;
}

.config-department-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.config-department-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dce8eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.config-department-check:hover {
    border-color: #9cc8d0;
    background: #f8fcfd;
}

.config-department-check input {
    width: auto !important;
    margin-top: 7px;
}

.config-department-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--department-color) 14%, white);
    color: var(--department-color);
}

.config-department-check-icon svg {
    width: 17px;
    height: 17px;
}

.config-department-check > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.config-department-check strong {
    font-size: 10px;
    color: #173b48;
}

.config-department-check small {
    font-size: 8px;
    line-height: 1.4;
    color: #6b838c;
}

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

/* ================================================================
   CONTACTE - FITXA SUPERIOR
   ================================================================ */

.contact-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 20px 22px 16px;
}

.contact-detail-header .contact-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;

    font-size: 18px;
}

.contact-detail-header h2 {
    margin: 0;

    font-size: 20px;
    line-height: 1.2;
}

.contact-detail-header p {
    margin: 4px 0 0;

    color: var(--muted);
    font-size: 12px;
}

.contact-detail-header > div:last-child {
    margin-left: auto;
}

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

    padding: 18px 22px 22px;

    border-top: 1px solid var(--line);
}

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

.contact-detail-grid span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.contact-detail-grid strong,
.contact-detail-grid a {
    color: var(--ink);

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-detail-grid a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .contact-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .contact-detail-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .contact-detail-header > div:last-child {
        margin-left: 0;
    }

    .contact-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   CONTACTES - LLISTAT
   ================================================================ */

.contacts-list-panel {
    padding: 0;
    overflow: hidden;
}

.contacts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 18px;

    border-bottom: 1px solid var(--line);
}

.contacts-search-form {
    display: flex;
    align-items: center;
    gap: 8px;

    flex: 1;
    max-width: 700px;
}

.contacts-search-form input[type="search"] {
    flex: 1;
    min-width: 260px;

    height: 38px;
    padding: 0 12px;

    border: 1px solid var(--line);
    border-radius: 8px;

    background: #fff;
    color: var(--ink);

    font: inherit;
}

.contacts-toolbar-actions {
    display: flex;
    gap: 8px;
}

.contacts-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;

    font-size: 13px;
}

.contacts-table thead {
    background: #f6f8f9;
}

.contacts-table th {
    padding: 12px 14px;

    border-bottom: 1px solid var(--line);

    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.contacts-table td {
    padding: 11px 14px;

    border-bottom: 1px solid #edf1f3;

    vertical-align: middle;
}

.contacts-table tbody tr:hover {
    background: #f8fbfc;
}

.contacts-table tbody tr.is-inactive {
    opacity: .58;
}

.contacts-col-check {
    width: 42px;
    text-align: center;
}

.contacts-col-actions {
    width: 46px;
    text-align: right;
}

.contacts-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contacts-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #e8f3f6;
    color: var(--brand);

    font-size: 12px;
    font-weight: 800;
}

.contacts-person-copy {
    min-width: 0;
}

.contacts-name {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.contacts-name:hover {
    text-decoration: underline;
}

.contacts-status {
    display: inline-block;
    margin-left: 6px;

    color: var(--muted);
    font-size: 10px;
}

.contacts-table a[href^="mailto:"] {
    color: var(--ink);
    text-decoration: none;
}

.contacts-table a[href^="mailto:"]:hover {
    text-decoration: underline;
}

.contacts-more-button {
    width: 30px;
    height: 30px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: var(--ink);

    font-size: 20px;
    line-height: 1;

    cursor: pointer;
}

.contacts-more-button:hover {
    background: #edf3f5;
}

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

    .contacts-search-form {
        max-width: none;
    }

    .contacts-toolbar-actions {
        justify-content: flex-end;
    }
}

/* ===================
   CONTACTES - LLISTAT - FI
====================== */

/* ================================================================
   CONTACTE - ACTIVAR / DESACTIVAR
   ================================================================ */

.contact-active-form {
    margin-top: 10px;
}

.button-danger {
    border-color: #c94b4b;
    background: #c94b4b;
    color: #fff;
}

.button-danger:hover {
    background: #b83f3f;
}

/* ================================================================
   CONTACTE - PESTANYES I TIQUETS
   ================================================================ */

.contact-tabs-panel {
    padding: 0;
    margin-top: 18px;
    overflow: hidden;
}

.contact-tabs {
    display: flex;
    align-items: center;
    gap: 0;

    padding: 0 18px;

    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.contact-tab {
    position: relative;

    padding: 14px 18px;

    border: 0;
    background: transparent;

    color: var(--muted);

    font: inherit;
    font-size: 12px;
    font-weight: 800;

    cursor: pointer;
}

.contact-tab.is-active {
    color: var(--ink);
}

.contact-tab.is-active::after {
    content: "";

    position: absolute;
    left: 18px;
    right: 18px;
    bottom: -1px;

    height: 2px;

    background: var(--brand);
}

.contact-tab:disabled {
    cursor: default;
    opacity: .5;
}

.contact-tab-content {
    background: var(--surface);
}

.contact-ticket-list {
    width: 100%;
}

.contact-ticket-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 130px;
    align-items: center;
    gap: 16px;

    padding: 14px 18px;

    border-bottom: 1px solid #edf1f3;

    color: var(--ink);
    text-decoration: none;
}

.contact-ticket-row:last-child {
    border-bottom: 0;
}

.contact-ticket-row:hover {
    background: #f8fbfc;
}

.contact-ticket-number {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

.contact-ticket-main {
    min-width: 0;
}

.contact-ticket-main strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 13px;
}

.contact-ticket-main small {
    display: block;

    margin-top: 4px;

    color: var(--muted);
    font-size: 10px;
}

.contact-ticket-status {
    justify-self: end;

    padding: 5px 9px;

    border-radius: 999px;

    background: #eaf3f6;
    color: var(--brand);

    font-size: 10px;
    font-weight: 800;
}

@media (max-width: 720px) {
    .contact-ticket-row {
        grid-template-columns: 70px 1fr;
    }

    .contact-ticket-status {
        grid-column: 2;
        justify-self: start;
    }
}

/* ===================
   CONTACTES - PESTANYES I TIQUETS - FI
====================== */

/* ================================================================
   ESTADÍSTIQUES
   ================================================================ */

.statistics-filter-panel {
    margin-bottom: 16px;
}

.statistics-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.statistics-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.statistics-filters label > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.statistics-filters input,
.statistics-filters select {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.statistics-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.statistics-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.statistics-kpi {
    min-height: 94px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.statistics-kpi span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.statistics-kpi strong {
    margin-top: 6px;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
}

.statistics-section {
    margin-bottom: 16px;
    padding: 0;
    overflow: hidden;
}

.statistics-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.statistics-section-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.statistics-section-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.statistics-breakdown {
    display: grid;
    grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
    gap: 0;
}

.statistics-bars {
    padding: 14px 18px;
    border-right: 1px solid var(--line);
}

.statistics-bar-row + .statistics-bar-row {
    margin-top: 10px;
}

.statistics-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    font-size: 11px;
}

.statistics-bar-label span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.statistics-bar-label strong {
    flex: 0 0 auto;
}

.statistics-bars progress,
.statistics-monthly-chart progress {
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: #edf2f4;
}

.statistics-bars progress::-webkit-progress-bar,
.statistics-monthly-chart progress::-webkit-progress-bar {
    background: #edf2f4;
    border-radius: 999px;
}

.statistics-bars progress::-webkit-progress-value,
.statistics-monthly-chart progress::-webkit-progress-value {
    background: var(--brand);
    border-radius: 999px;
}

.statistics-bars progress::-moz-progress-bar,
.statistics-monthly-chart progress::-moz-progress-bar {
    background: var(--brand);
    border-radius: 999px;
}

.statistics-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.statistics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.statistics-table thead {
    background: #f6f8f9;
}

.statistics-table th,
.statistics-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #edf1f3;
    text-align: left;
    vertical-align: middle;
}

.statistics-table th {
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .035em;
    white-space: nowrap;
}

.statistics-table tbody tr:last-child td {
    border-bottom: 0;
}

.statistics-table tbody tr:hover {
    background: #f8fbfc;
}

.statistics-table .is-number {
    text-align: right;
    white-space: nowrap;
}

.statistics-monthly-chart {
    max-height: 420px;
    padding: 14px 18px;
    overflow-y: auto;
}

.statistics-month-row {
    display: grid;
    grid-template-columns: 70px minmax(120px, 1fr) 60px;
    align-items: center;
    gap: 12px;
    min-height: 26px;
    font-size: 11px;
}

.statistics-month-row + .statistics-month-row {
    margin-top: 7px;
}

.statistics-month-row strong {
    text-align: right;
}


.statistics-section > .empty-state {
    padding: 18px;
    min-height: 0;
}

.statistics-table td {
    color: var(--ink);
}

.statistics-bar-label strong,
.statistics-month-row strong {
    font-weight: 700;
}

/* Statistics final polish */
.statistics-filter-panel,
.statistics-kpi,
.statistics-section {
    border-radius: 16px;
}

.statistics-filter-panel {
    overflow: hidden;
}

.statistics-kpi {
    padding: 16px 18px;
}

.statistics-kpi span {
    display: block;
    margin: 0;
}

.statistics-kpi strong {
    margin-top: 10px;
}

.statistics-section .statistics-table-wrap,
.statistics-section > .empty-state {
    border-radius: 0 0 16px 16px;
}

/* Statistics manager detail */
.statistics-manager-details {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--line);
}

.statistics-manager-detail {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.statistics-manager-detail + .statistics-manager-detail {
    margin-top: 10px;
}

.statistics-manager-detail > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 42px 12px 14px;
    cursor: pointer;
    list-style: none;
    background: #f8fbfc;
}

.statistics-manager-detail > summary::-webkit-details-marker {
    display: none;
}

.statistics-manager-detail > summary::after {
    content: "›";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    transition: transform .2s ease;
}

.statistics-manager-detail[open] > summary::after {
    transform: translateY(-50%) rotate(-90deg);
}

.statistics-manager-detail > summary span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.statistics-manager-detail > summary small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.statistics-manager-worker {
    padding: 14px;
    border-top: 1px solid var(--line);
}

.statistics-manager-worker + .statistics-manager-worker {
    border-top: 1px solid var(--line);
}

.statistics-manager-worker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.statistics-manager-worker-head strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.statistics-manager-worker-head span {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.statistics-manager-worker .statistics-table-wrap {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.statistics-manager-worker .statistics-table {
    font-size: 11px;
}

.statistics-manager-worker .statistics-table th,
.statistics-manager-worker .statistics-table td {
    padding: 8px 11px;
}

.statistics-manager-worker .statistics-table thead {
    background: #f6f8f9;
}

.statistics-manager-detail > .empty-state {
    padding: 14px;
    min-height: 0;
    border-top: 1px solid var(--line);
}

@media (max-width: 650px) {
    .statistics-manager-detail > summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        padding-right: 38px;
    }

    .statistics-manager-worker-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

/* Statistics collapsible sections */
.statistics-collapsible {
    padding: 0;
    overflow: hidden;
}

.statistics-collapsible > summary.statistics-section-header {
    position: relative;
    padding-right: 48px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.statistics-collapsible > summary.statistics-section-header::-webkit-details-marker {
    display: none;
}

.statistics-collapsible > summary.statistics-section-header::after {
    content: "›";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    color: var(--muted);
    font-size: 19px;
    line-height: 1;
    transition: transform .2s ease;
}

.statistics-collapsible[open] > summary.statistics-section-header::after {
    transform: translateY(-50%) rotate(-90deg);
}

.statistics-collapsible:not([open]) > summary.statistics-section-header {
    border-bottom: 0;
}

.statistics-collapsible > summary.statistics-section-header:hover {
    background: #f8fbfc;
}

.statistics-collapsible > summary.statistics-section-header h2,
.statistics-collapsible > summary.statistics-section-header p {
    pointer-events: none;
}
@media (max-width: 1200px) {
    .statistics-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 850px) {
    .statistics-breakdown {
        grid-template-columns: 1fr;
    }

    .statistics-bars {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 650px) {
    .statistics-filters,
    .statistics-kpis {
        grid-template-columns: 1fr;
    }

    .statistics-filter-actions {
        justify-content: stretch;
    }

    .statistics-filter-actions .button {
        flex: 1;
    }

    .statistics-month-row {
        grid-template-columns: 62px minmax(90px, 1fr) 48px;
    }
}

/* ============================
   ESTADÍSTIQUES - FI
   ============================= */


@media (max-width: 900px) {
    .config-tag-filter {
        grid-template-columns: 1fr;
    }

    .config-department-selector {
        grid-template-columns: 1fr;
    }
}

/* PAS 8G-A3.3 SIDEBAR COLLAPSIBLE */
.app-shell {
    transition: grid-template-columns .18s ease;
}

.app-topbar-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d9e5e8;
    border-radius: 10px;
    background: #fff;
    color: #355862;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    border-color: #9fc4cc;
    background: #f5fafb;
    box-shadow: 0 0 0 3px rgba(23, 107, 120, .08);
    outline: none;
}

.sidebar-toggle-icon,
.sidebar-toggle-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

.sidebar-toggle-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

@media (min-width: 901px) {
    .app-shell.sidebar-collapsed {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .app-shell.sidebar-collapsed .sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-shell.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .app-shell.sidebar-collapsed .sidebar-brand > span:last-child,
    .app-shell.sidebar-collapsed .nav-item > span:nth-child(2),
    .app-shell.sidebar-collapsed .nav-item > small,
    .app-shell.sidebar-collapsed .nav-subitems,
    .app-shell.sidebar-collapsed .nav-section,
    .app-shell.sidebar-collapsed .sidebar-user-copy {
        display: none;
    }

    .app-shell.sidebar-collapsed .nav-item {
        grid-template-columns: 1fr;
        justify-items: center;
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-shell.sidebar-collapsed .nav-icon {
        font-size: 18px;
    }

    .app-shell.sidebar-collapsed .sidebar-user {
        justify-content: center;
    }

    .app-shell.sidebar-collapsed .sidebar-logout {
        font-size: 0;
    }

    .app-shell.sidebar-collapsed .sidebar-logout::before {
        content: "↪";
        font-size: 16px;
    }
}

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

/* GLPI · Equipament afectat al tiquet */
.glpi-assets-card .detail-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-items: stretch;
    padding: 11px 0;
}

.glpi-assets-card .detail-list > div:first-child {
    padding-top: 0;
}

.glpi-assets-card .glpi-asset-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    color: #304b56;
}

.glpi-assets-card .glpi-asset-heading-text {
    min-width: 0;
    font-size: 10px;
    font-weight: 800;
}

.glpi-assets-card .glpi-asset-heading-text small {
    color: #83979e;
    font-size: 8px;
    font-weight: 700;
}

.glpi-assets-card .glpi-asset-check-form {
    flex: 0 0 auto;
    margin: 0;
}

.glpi-assets-card .glpi-asset-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 4px 7px;
    border: 1px solid #dce7ea;
    border-radius: 7px;
    background: #f8fafb;
    color: #718991;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.glpi-assets-card .glpi-asset-check:hover {
    border-color: #b8ccd2;
    background: #f1f6f7;
    color: #304b56;
}

.glpi-assets-card .glpi-asset-check.is-linked {
    border-color: #b8d8d6;
    background: #edf8f6;
    color: #176b78;
}

.glpi-assets-card .glpi-asset-check input[type="checkbox"] {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: #176b78;
    cursor: pointer;
}

.glpi-assets-card .detail-list dd {
    padding-right: 4px;
    color: #304b56;
    font-size: 9px;
    line-height: 1.4;
}

.glpi-assets-card .detail-list dd small {
    color: #657d86;
    font-size: 8px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .glpi-assets-card .glpi-asset-heading {
        gap: 7px;
    }

    .glpi-assets-card .glpi-asset-check {
        padding: 4px 6px;
    }
}


/* GLPI · Equipament històric vinculat al tiquet */
.glpi-assets-history {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px dashed #d8e3e6;
}

.glpi-assets-history h3 {
    margin: 0 0 4px;
    color: #526a73;
    font-size: 10px;
    font-weight: 800;
}

.glpi-assets-history > .detail-note {
    margin: 0 0 10px;
}

.glpi-history-badge {
    display: inline-flex;
    margin-top: 5px;
    padding: 3px 6px;
    border-radius: 6px;
    background: #f2f4f5;
    color: #71858d;
    font-size: 8px;
    font-weight: 700;
}


/* GLPI · Tiquets anteriors relacionats amb l'equip */
.glpi-related-tickets {
    margin-top: 7px;
}

.glpi-related-tickets summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 6px;
    background: #f2f6f7;
    color: #526d76;
    font-size: 8px;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.glpi-related-tickets summary::-webkit-details-marker {
    display: none;
}

.glpi-related-tickets summary::before {
    content: "↳";
    color: #83979e;
    font-weight: 700;
}

.glpi-related-tickets[open] summary {
    background: #eaf3f4;
    color: #176b78;
}

.glpi-related-ticket-list {
    display: grid;
    gap: 4px;
    margin-top: 6px;
}

.glpi-related-ticket {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 7px;
    border: 1px solid #e5ecee;
    border-radius: 7px;
    background: #fbfcfc;
    color: #304b56;
    text-decoration: none;
}

.glpi-related-ticket:hover {
    border-color: #cbdcdf;
    background: #f5f9f9;
}

.glpi-related-ticket-main {
    display: flex;
    min-width: 0;
    gap: 5px;
    align-items: baseline;
}

.glpi-related-ticket-main strong {
    flex: 0 0 auto;
    color: #176b78;
    font-size: 8px;
}

.glpi-related-ticket-main span {
    overflow: hidden;
    color: #405b65;
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.glpi-related-ticket > small {
    flex: 0 0 auto;
    color: #7b9097;
    font-size: 7px;
    font-weight: 700;
}


/* GLPI · Enllaç a la fitxa de l'equip */
.glpi-asset-name-link {
    color: #304b56;
    font-weight: 800;
    text-decoration: none;
}

.glpi-asset-name-link:hover {
    color: #176b78;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.glpi-asset-name-link:focus-visible {
    outline: 2px solid rgba(23, 107, 120, .25);
    outline-offset: 2px;
    border-radius: 3px;
}


/* ================================================================
   FUSIÓ DE TIQUETS
   ================================================================ */

.ticket-merge-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 15px 17px;
    border: 1px solid #e6d6a5;
    border-left: 5px solid #d8a536;
    border-radius: 13px;
    background: #fffdf7;
    box-shadow: 0 8px 22px rgba(30, 57, 69, .04);
}

.ticket-merge-alert-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.ticket-merge-alert-content strong {
    font-size: 13px;
    color: #5e5127;
}

.ticket-merge-alert-content span {
    color: #718790;
    font-size: 10px;
    line-height: 1.5;
}

.ticket-merge-alert-content a {
    color: var(--brand);
    font-weight: 900;
    text-decoration: none;
}

.ticket-merge-alert-content a:hover {
    text-decoration: underline;
}

.ticket-merged-list {
    margin: 0 0 18px;
    padding: 18px 20px;
    border: 1px solid #dce7eb;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(30, 57, 69, .04);
}

.ticket-merged-list-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.ticket-merged-list-heading h2 {
    margin: 0;
    font-size: 16px;
}

.ticket-merged-list-heading p {
    margin: 5px 0 0;
    color: #718790;
    font-size: 10px;
    line-height: 1.5;
}

.ticket-merged-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf5f7;
    color: var(--brand);
    font-size: 10px;
    font-weight: 900;
}

.ticket-merged-items {
    display: grid;
    gap: 8px;
}

.ticket-merged-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border: 1px solid #e4ecef;
    border-radius: 10px;
    background: #fbfdfe;
    color: inherit;
    text-decoration: none;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.ticket-merged-item:hover {
    border-color: #bfd6de;
    box-shadow: 0 5px 14px rgba(30, 57, 69, .06);
    transform: translateY(-1px);
}

.ticket-merged-item-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ticket-merged-item-main strong {
    overflow: hidden;
    color: #253f49;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-merged-item-main span {
    overflow: hidden;
    color: #718790;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .ticket-merge-alert {
        align-items: stretch;
        flex-direction: column;
    }

    .ticket-merge-alert .button {
        width: 100%;
        text-align: center;
    }

    .ticket-merged-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-merged-item-main {
        width: 100%;
    }

    .ticket-merged-item-main strong,
    .ticket-merged-item-main span {
        white-space: normal;
    }
}

/* ================================================================
   FUSIÓ DE TIQUETS · ACCIONS
   ================================================================ */

.ticket-merge-alert-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
}

.ticket-merge-alert-actions form {
    margin: 0;
}

.ticket-merge-undo {
    border-color: #e2c778;
    color: #755f24;
}

.ticket-merge-management {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e4ecef;
}

.ticket-merge-management-heading {
    display: grid;
    gap: 3px;
}

.ticket-merge-management-heading strong {
    color: #304b56;
    font-size: 11px;
    font-weight: 900;
}

.ticket-merge-management-heading span {
    color: #718790;
    font-size: 9px;
    line-height: 1.45;
}

.ticket-merge-form {
    margin-top: 0;
}

@media (max-width: 720px) {
    .ticket-merge-alert-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .ticket-merge-alert-actions .button,
    .ticket-merge-alert-actions form {
        width: 100%;
    }

    .ticket-merge-alert-actions form .button {
        width: 100%;
    }
}

/* WYSIWYG creació de tiquet */
.ticket-create-rich-editor {
    border: 1px solid #d8e4e7;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.ticket-create-rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #d8e4e7;
    background: #f6f9fa;
}

.ticket-create-rich-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 10px;
    margin-right: 2px;
    border-right: 1px solid #dce6e9;
}

.ticket-create-rich-toolbar-group:last-child {
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
}

.ticket-create-rich-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #d6e3e6;
    border-radius: 10px;
    background: #fff;
    color: #24444d;
    cursor: pointer;
    line-height: 1;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.ticket-create-rich-tool:hover,
.ticket-create-rich-tool:focus-visible {
    border-color: #38a7b7;
    box-shadow: 0 0 0 3px rgba(56, 167, 183, .12);
    outline: none;
}

.ticket-create-rich-tool svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-create-rich-tool-text {
    font-size: 14px;
    font-weight: 700;
}

.ticket-create-rich-tool-text.is-italic {
    font-style: italic;
    font-family: Georgia, serif;
}

.ticket-create-rich-tool-text.is-underline {
    text-decoration: underline;
}

.ticket-create-rich-surface {
    min-height: 220px;
    padding: 14px;
    outline: none;
    line-height: 1.5;
    color: #233c43;
}

.ticket-create-rich-surface:empty::before {
    content: attr(data-placeholder);
    color: #8b9da3;
    pointer-events: none;
}

.ticket-create-rich-surface:focus {
    box-shadow: inset 0 0 0 1px #38a7b7;
}

/* =========================================================
   PORTAL MODE CHOICE
   ========================================================= */

.portal-choice-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
    background:
        radial-gradient(
            circle at top right,
            rgba(23, 107, 120, .08),
            transparent 34%
        ),
        #f4f8fa;
}

.portal-choice-card {
    width: min(760px, 100%);
    padding: 36px;
    background: #fff;
    border: 1px solid #d9e6eb;
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(24, 53, 64, .10);
}

.portal-choice-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-choice-heading small {
    display: block;
    margin-bottom: 3px;
    color: #69818a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.portal-choice-heading h1 {
    margin: 0;
    color: var(--ink);
    font-size: 29px;
    line-height: 1.15;
}

.portal-choice-intro {
    max-width: 620px;
    margin: 26px 0 28px;
    color: #607983;
    font-size: 14px;
    line-height: 1.6;
}

.portal-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.portal-choice-grid form {
    margin: 0;
}

.portal-choice-option {
    width: 100%;
    min-height: 155px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    text-align: left;
    border: 1px solid #d7e4e9;
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease,
        background .18s ease;
}

.portal-choice-option strong {
    font-size: 18px;
    font-weight: 900;
}

.portal-choice-option span {
    color: #607983;
    font-size: 13px;
    line-height: 1.55;
}

.portal-choice-option:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 107, 120, .45);
    background: #fbfdfd;
    box-shadow: 0 12px 28px rgba(24, 53, 64, .09);
}

.portal-choice-option:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow:
        0 0 0 3px rgba(23, 107, 120, .12),
        0 12px 28px rgba(24, 53, 64, .09);
}

.portal-choice-logout {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.portal-choice-logout .button {
    min-width: 90px;
}

/* =========================================================
   PORTAL MODE SWITCH - SIDEBAR
   ========================================================= */

.portal-switch-form {
    margin: 0 0 8px;
}

.sidebar-portal-switch {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: #e7f1f4;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
    transition:
        background .16s ease,
        border-color .16s ease,
        color .16s ease;
}

.sidebar-portal-switch::before {
    content: "⇄";
    font-size: 13px;
    opacity: .8;
}

.sidebar-portal-switch:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.18);
    color: #fff;
}

.sidebar-portal-switch:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}

@media (max-width: 700px) {
    .portal-choice-card {
        padding: 26px 22px;
    }

    .portal-choice-grid {
        grid-template-columns: 1fr;
    }

    .portal-choice-option {
        min-height: 125px;
    }

    .portal-choice-heading h1 {
        font-size: 25px;
    }
}


.alert-success {
    border: 1px solid #b9dfc7;
    background: #eef9f1;
    color: #27633b;
}


/* =========================================================
   CONFIGURACIÓ · CLIENTS
   ========================================================= */

.config-client-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.config-client-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(190px, .8fr)
        minmax(150px, .55fr);
    gap: 18px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid #dfe9ed;
    border-radius: 13px;
    background: #fff;
}

.config-client-row:hover {
    border-color: #c9dbe1;
    box-shadow: 0 5px 16px rgba(31, 64, 75, .05);
}

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

.config-client-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf5f7;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 900;
}

.config-client-copy {
    min-width: 0;
}

.config-client-copy > strong,
.config-client-copy > small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.config-client-copy > strong {
    color: var(--ink);
    font-size: 13px;
}

.config-client-copy > small {
    margin-top: 3px;
    color: #6d858e;
    font-size: 10px;
}

.config-client-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.config-client-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f0f5f7;
    color: #5c747d;
    font-size: 9px;
    font-weight: 800;
}

.config-client-access {
    display: grid;
    justify-items: start;
    gap: 6px;
}

.config-client-access small {
    color: #789099;
    font-size: 9px;
}

.config-client-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.config-client-status.is-active {
    background: #edf8f1;
    color: #2f7549;
}

.config-client-status.is-pending {
    background: #f5f0e8;
    color: #8a632e;
}

.config-client-status.is-invited {
    background: #eef2fb;
    color: #4e65a0;
}

.config-client-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.config-client-actions .button {
    min-width: 130px;
}

.config-client-actions .button:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.config-client-ready {
    color: #58727b;
    font-size: 10px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .config-client-row {
        grid-template-columns: 1fr auto;
    }

    .config-client-access {
        grid-column: 1;
        padding-left: 50px;
    }

    .config-client-actions {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 640px) {
    .config-client-row {
        grid-template-columns: 1fr;
    }

    .config-client-access {
        grid-column: auto;
        padding-left: 50px;
    }

    .config-client-actions {
        grid-column: auto;
        grid-row: auto;
        justify-content: flex-start;
        padding-left: 50px;
    }
}


/* CONFIGURACIÓ · CLIENTS · TAULA */

.config-clients-table th:first-child,
.config-clients-table td:first-child {
    padding-left: 20px;
}

.config-clients-table th:last-child,
.config-clients-table td:last-child {
    padding-right: 20px;
}

.config-clients-table th,
.config-clients-table td {
    vertical-align: middle;
}

.config-client-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.config-client-action {
    min-width: 118px;
}

.config-clients-table .config-table-action {
    white-space: nowrap;
}

.config-clients-table {
    min-width: 980px;
}


/* =========================================================
   CONFIGURACIÓ · CLIENTS · ACCIONS MINIMALISTES
   ========================================================= */

.config-icon-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.config-icon-button,
.config-icon-status {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.config-icon-button {
    border: 1px solid #d7e4e9;
    background: #f8fbfc;
    color: #315866;
    cursor: pointer;
    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease,
        color .15s ease;
}

.config-icon-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #eef5f7;
    border-color: #c3d6dd;
    color: var(--brand-dark);
}

.config-icon-button.is-primary {
    background: #edf7f8;
    border-color: #cce4e8;
    color: var(--brand);
}

.config-icon-button:disabled {
    opacity: .72;
    cursor: default;
}

.config-icon-status {
    border: 1px solid #cee7d6;
    background: #eef8f1;
    color: #2f7950;
}

.config-icon-button .config-svg,
.config-icon-status .config-svg {
    width: 17px;
    height: 17px;
}

.config-clients-table th:last-child,
.config-clients-table td:last-child {
    width: 72px;
    padding-right: 20px;
}


/* =========================================================
   CONFIGURACIÓ · BREADCRUMB
   ========================================================= */

.config-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #7a9199;
    font-size: 10px;
    font-weight: 800;
}

.config-breadcrumb a {
    color: var(--brand);
    text-decoration: none;
}

.config-breadcrumb a:hover {
    text-decoration: underline;
}

.config-breadcrumb span {
    color: #a4b5bb;
}

.config-breadcrumb strong {
    color: #607983;
    font-weight: 800;
}


/* =========================================================
   GLPI INVENTORY - EXPORT DECISION
   ========================================================= */

.glpi-decision-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.glpi-decision-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.glpi-decision-option {
    min-height: 108px;
    padding: 18px 20px;
    margin: 0;
}

.glpi-decision-radio:focus-visible + .glpi-decision-option {
    outline: none;
    border-color: var(--brand);
    box-shadow:
        0 0 0 3px rgba(23, 107, 120, .12),
        0 10px 24px rgba(24, 53, 64, .08);
}

.glpi-decision-radio:checked
+ .glpi-decision-option {
    transform: translateY(-1px);
    border-width: 2px;
    box-shadow: 0 10px 24px rgba(24, 53, 64, .08);
}

.glpi-decision-radio:checked
+ .glpi-decision-option.is-pending {
    border-color: #d99b32;
    background: #fffaf0;
}

.glpi-decision-radio:checked
+ .glpi-decision-option.is-include {
    border-color: #2b9a74;
    background: #f1fbf7;
}

.glpi-decision-radio:checked
+ .glpi-decision-option.is-exclude {
    border-color: #c85d5d;
    background: #fff6f6;
}

@media (max-width: 760px) {
    .glpi-decision-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   GLPI INVENTORY - REVIEW TABLE
   ========================================================= */

.glpi-review-table tbody tr {
    transition:
        background .16s ease,
        box-shadow .16s ease;
}

.glpi-review-table tbody tr:hover {
    background: rgba(23, 107, 120, .025);
}

.glpi-review-user {
    color: #123f4a;
    font-weight: 850;
}

.glpi-entity-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid #d7e3e6;
    border-radius: 999px;
    background: #f5f8f9;
    color: #4c6870;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.glpi-review-reason {
    display: inline-block;
    max-width: 520px;
    padding: 7px 10px;
    border-left: 3px solid #d9a441;
    border-radius: 0 8px 8px 0;
    background: #fffaf0;
    color: #5f5542;
    font-size: 12px;
    line-height: 1.45;
}

.glpi-decision-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 104px;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .015em;
    line-height: 1;
    white-space: nowrap;
}

.glpi-decision-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
}

.glpi-decision-badge.is-pending {
    color: #956414;
    background: #fff5dd;
    border-color: #efd290;
}

.glpi-decision-badge.is-include {
    color: #19704d;
    background: #e9f8f0;
    border-color: #afe0c6;
}

.glpi-decision-badge.is-exclude {
    color: #aa4141;
    background: #fdecec;
    border-color: #efb9b9;
}

.glpi-review-action {
    transition:
        transform .15s ease,
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.glpi-review-action:hover,
.glpi-review-action:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(23, 107, 120, .42);
    background: #f1f8f9;
    box-shadow: 0 5px 14px rgba(24, 53, 64, .08);
}

@media (max-width: 900px) {
    .glpi-review-reason {
        min-width: 220px;
    }
}

/* =========================================================
   GLPI INVENTORY - COMPACT REVIEW TABLE
   ========================================================= */

.glpi-review-table th,
.glpi-review-table td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.glpi-entity-badge {
    min-height: 21px;
    padding: 3px 7px;
    font-size: 10px;
}

.glpi-review-reason {
    padding: 4px 8px;
    border-left-width: 2px;
    border-radius: 0 6px 6px 0;
    background: rgba(255, 250, 240, .72);
    font-size: 11px;
    line-height: 1.3;
}

.glpi-decision-badge {
    min-width: 88px;
    min-height: 24px;
    padding: 4px 9px;
    gap: 5px;
    font-size: 10px;
}

.glpi-decision-badge::before {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
}

.glpi-review-action {
    width: 32px;
    height: 32px;
}

.glpi-review-action .config-svg {
    width: 15px;
    height: 15px;
}

/* =========================================================
   NOU TIQUET · PERSONA AFECTADA
   ========================================================= */

.affected-person-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 22px 20px;
}

.affected-person-option {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.affected-person-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.affected-person-option > span {
    min-height: 112px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;

    border: 1px solid #d7e4e9;
    border-radius: 15px;

    background: #fff;
    color: var(--ink);

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease,
        background .18s ease;
}

.affected-person-option > span strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
}

.affected-person-option > span small {
    display: block;
    color: #607983;
    font-size: 12px;
    line-height: 1.5;
}

.affected-person-option:hover > span {
    transform: translateY(-2px);
    border-color: rgba(23, 107, 120, .45);
    background: #fbfdfd;
    box-shadow: 0 10px 24px rgba(24, 53, 64, .08);
}

.affected-person-option > input:focus-visible + span {
    border-color: var(--brand);
    box-shadow:
        0 0 0 3px rgba(23, 107, 120, .12),
        0 10px 24px rgba(24, 53, 64, .08);
}

.affected-person-option > input:checked + span {
    border-color: var(--brand);
    background:
        linear-gradient(
            135deg,
            rgba(23, 107, 120, .075),
            rgba(23, 107, 120, .025)
        );
    box-shadow:
        inset 0 0 0 1px rgba(23, 107, 120, .10),
        0 8px 22px rgba(24, 53, 64, .07);
}

.affected-person-option > input:checked + span::before {
    content: "✓";
    position: absolute;
    top: 14px;
    right: 15px;

    width: 24px;
    height: 24px;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: var(--brand);
    color: #fff;

    font-size: 13px;
    font-weight: 900;
}

.affected-person-panel {
    margin: 0 22px 22px;
    padding: 18px;

    border: 1px solid #dce8ec;
    border-radius: 13px;

    background: #f8fbfc;
}

.affected-person-panel.hidden {
    display: none !important;
}

.affected-person-panel .field-block {
    margin: 0;
}

.affected-person-panel .form-help {
    margin: 9px 0 0;
}

.affected-person-panel .selected-contact {
    margin-top: 10px;
}

@media (max-width: 760px) {
    .affected-person-choice {
        grid-template-columns: 1fr;
    }

    .affected-person-option > span {
        min-height: 95px;
    }
}


/* =========================================================
   TIQUET · CERCA MANUAL D'ACTIUS GLPI
   ========================================================= */

.glpi-manual-search {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e0eaee;
}

.glpi-manual-search-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.glpi-manual-search-heading h3 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.glpi-manual-search-heading p {
    margin: 0;
    color: #6b8189;
    font-size: 11px;
    line-height: 1.5;
}

.glpi-manual-search .field-block {
    margin: 0;
}

.glpi-manual-asset-results {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.glpi-manual-asset-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;

    padding: 12px 13px;

    border: 1px solid #dfe9ed;
    border-radius: 11px;

    background: #fff;
}

.glpi-manual-asset-result:hover {
    border-color: #cbdde3;
    box-shadow: 0 5px 16px rgba(31, 64, 75, .05);
}

.glpi-manual-asset-main {
    min-width: 0;
}

.glpi-manual-asset-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;

    min-width: 0;
}

.glpi-manual-asset-heading > a,
.glpi-manual-asset-heading > strong {
    font-size: 12px;
    font-weight: 900;
}

.glpi-manual-asset-heading > small {
    color: #71878f;
    font-size: 10px;
}

.glpi-manual-asset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;

    margin-top: 6px;

    color: #71878f;
    font-size: 10px;
    line-height: 1.45;
}

.glpi-manual-asset-meta span {
    min-width: 0;
}

.glpi-manual-asset-meta strong {
    color: #516970;
    font-weight: 800;
}

.glpi-manual-asset-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.glpi-manual-asset-action {
    margin: 0;
}

.glpi-manual-linked-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;

    border: 1px solid #b8ddc6;
    border-radius: 999px;

    background: #eef9f2;
    color: #2d6a43;

    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.glpi-manual-search-empty {
    padding: 10px 12px;

    border: 1px dashed #d7e4e9;
    border-radius: 9px;

    background: #fafcfd;
    color: #6f858d;

    font-size: 11px;
}

.glpi-manual-search-empty.is-error {
    border-color: #e7caca;
    background: #fff7f7;
    color: #9b4d4d;
}

.glpi-manual-search-note {
    margin-top: 10px;
}

@media (max-width: 760px) {
    .glpi-manual-asset-result {
        grid-template-columns: 1fr;
    }

    .glpi-manual-asset-actions {
        justify-content: flex-start;
    }
}


/* =========================================================
   TIQUET · PERSONA AFECTADA · REDISSENY
   ========================================================= */

.affected-person-detail-card {
    overflow: visible;
}

.affected-person-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.affected-person-card-header h2 {
    margin: 0;
}

.affected-person-edit-icon,
.affected-person-selected-change {
    appearance: none;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #d7e3e7;
    border-radius: 10px;
    background: #f7fafb;
    color: #195f70;
    cursor: pointer;
    transition:
        background .16s ease,
        border-color .16s ease,
        color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}

.affected-person-edit-icon svg,
.affected-person-selected-change svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.affected-person-edit-icon:hover,
.affected-person-selected-change:hover {
    background: #edf6f7;
    border-color: #b9d2d8;
    color: #0d7180;
    transform: translateY(-1px);
}

.affected-person-edit-icon:focus-visible,
.affected-person-selected-change:focus-visible {
    outline: none;
    border-color: #178493;
    box-shadow:
        0 0 0 3px rgba(23, 132, 147, .12);
}

.affected-person-summary {
    display: grid;
    gap: 12px;
}

.affected-person-summary-copy {
    min-width: 0;
}

.affected-person-summary-copy strong,
.affected-person-summary-copy a {
    display: block;
}

.affected-person-summary-copy a {
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.affected-person-relation {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    padding: 6px 9px;
    border: 1px solid #dbe6e9;
    border-radius: 999px;
    background: #f7fafb;
    color: #566e75;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.affected-person-relation-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8ca3aa;
}

.affected-person-relation.is-requester {
    border-color: #cee6df;
    background: #f1f9f6;
    color: #356b5e;
}

.affected-person-relation.is-requester
.affected-person-relation-dot {
    background: #41a78d;
}

.affected-person-relation.is-other {
    border-color: #cfe1e7;
    background: #f1f7f9;
    color: #356575;
}

.affected-person-relation.is-other
.affected-person-relation-dot {
    background: #3d94a5;
}

.affected-person-extra {
    margin-top: 0;
    padding-top: 2px;
}

.affected-person-change-panel {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e9ec;
}

.affected-person-change-panel.hidden {
    display: none !important;
}

.affected-person-editor-heading {
    margin-bottom: 15px;
}

.affected-person-editor-heading strong {
    display: block;
    color: #173f4a;
    font-size: 13px;
    line-height: 1.35;
}

.affected-person-editor-heading small {
    display: block;
    margin-top: 3px;
    color: #71878d;
    font-size: 10px;
    line-height: 1.45;
}

.affected-person-requester-action {
    appearance: none;
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin: 0 0 15px;
    border: 1px solid #d8e5e8;
    border-radius: 11px;
    background: #f8fbfc;
    color: #173f4a;
    text-align: left;
    cursor: pointer;
}

.affected-person-requester-action:hover {
    background: #f0f7f8;
    border-color: #bdd7dc;
}

.affected-person-requester-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e7f3f4;
    color: #176c79;
}

.affected-person-requester-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.affected-person-requester-action strong,
.affected-person-requester-action small {
    display: block;
}

.affected-person-requester-action strong {
    font-size: 11px;
}

.affected-person-requester-action small {
    margin-top: 2px;
    color: #70858c;
    font-size: 10px;
}

.affected-person-action-arrow {
    color: #6e8d95;
    font-size: 15px;
}

.affected-person-search-block > label {
    display: block;
    margin-bottom: 6px;
    color: #526b72;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.affected-person-search-field {
    position: relative;
}

.affected-person-search-field input {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px 8px 35px;
    border: 1px solid #cfdee2;
    border-radius: 10px;
    background: #fff;
    color: #173f4a;
    font: inherit;
    font-size: 12px;
}

.affected-person-search-field input:focus {
    outline: none;
    border-color: #3d95a2;
    box-shadow:
        0 0 0 3px rgba(61, 149, 162, .10);
}

.affected-person-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    display: inline-flex;
    width: 15px;
    height: 15px;
    color: #7a9298;
    pointer-events: none;
    transform: translateY(-50%);
}

.affected-person-search-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.affected-person-change-panel
.contact-search-results {
    margin-top: 6px;
}

.affected-person-change-panel
.contact-search-result {
    border-radius: 9px;
}

.affected-person-selected {
    position: relative;
    margin-top: 10px;
    padding-right: 48px;
}

.affected-person-selected-change {
    position: absolute;
    right: 9px;
    top: 50%;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transform: translateY(-50%);
}

.affected-person-selected-change:hover {
    transform: translateY(-50%);
}

.affected-person-change-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid #e6edef;
}

.affected-person-change-actions .button {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 11px;
}

.affected-person-change-actions .button:disabled {
    opacity: .45;
    cursor: not-allowed;
}



.affected-person-requester-action.is-selected {
    border-color: #8fc8d1;
    background: #edf8fa;
    box-shadow:
        inset 0 0 0 1px rgba(31, 127, 143, .08);
}

.affected-person-requester-action.is-selected
.affected-person-requester-icon {
    background: #d9f0f3;
    color: #0f7686;
}

.affected-person-requester-action.is-selected
.affected-person-action-arrow {
    color: #0f7686;
    font-weight: 800;
}


/* =========================================================
   TIQUET · SIDEBAR ACORDIONS
   ========================================================= */

.ticket-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-detail-sidebar
.ticket-sidebar-accordion {
    padding: 0;
    overflow: hidden;
}

.ticket-sidebar-accordion-header {
    appearance: none;
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
    border: 0;
    background: #fff;
    color: #143d49;
    text-align: left;
    cursor: pointer;
}

.ticket-sidebar-accordion-header:hover {
    background: #f8fbfc;
}

.ticket-sidebar-accordion-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-sidebar-accordion-heading > span:last-child {
    min-width: 0;
}

.ticket-sidebar-accordion-heading strong {
    display: block;
    color: #153e4a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.ticket-sidebar-accordion-heading small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #789097;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-sidebar-accordion-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #edf7f8;
    color: #137b89;
}

.ticket-sidebar-accordion-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-sidebar-accordion-chevron {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #6f8990;
    transition: transform .18s ease;
}

.ticket-sidebar-accordion-chevron svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-sidebar-accordion.is-open
.ticket-sidebar-accordion-chevron {
    transform: rotate(180deg);
}

.ticket-sidebar-accordion-body {
    padding: 2px 13px 14px;
    border-top: 1px solid #e7edef;
}

.ticket-sidebar-accordion-body[hidden] {
    display: none !important;
}

.ticket-sidebar-accordion
.management-form {
    padding-top: 12px;
}

.ticket-sidebar-accordion
.management-form > label:first-of-type,
.ticket-sidebar-accordion
.management-form > label:nth-of-type(2) {
    margin-top: 0;
}


.affected-person-relation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.affected-person-relation-row
.affected-person-relation {
    min-width: 0;
}


/* =========================================================
   TIQUET · TARGETA RESUM SUPERIOR
   ========================================================= */

.ticket-overview-card {
    padding: 18px;
    border: 1px solid #d9e5e8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(20, 61, 73, .045);
}

.ticket-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}

.ticket-overview-ticket {
    color: #123846;
    font-size: 21px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.02em;
}

.ticket-overview-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    padding: 4px 10px;
    border: 1px solid #bfdaea;
    border-radius: 999px;
    background: #edf7fd;
    color: #17648a;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.ticket-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
}

.ticket-overview-column {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 16px;
}

.ticket-overview-column + .ticket-overview-column {
    margin-left: 18px;
    padding-left: 18px;
    border-left: 1px solid #e2ebed;
}

.ticket-overview-block {
    min-width: 0;
}

.ticket-overview-label {
    display: block;
    margin-bottom: 5px;
    color: #708991;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
}

.ticket-overview-value {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.ticket-overview-value strong {
    color: #173d49;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

.ticket-overview-inline-icon {
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #316b78;
}

.ticket-overview-inline-icon svg {
    display: block;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-overview-inline-icon svg path,
.ticket-overview-inline-icon svg rect,
.ticket-overview-inline-icon svg circle {
    fill: none !important;
    stroke: currentColor !important;
}

.ticket-overview-assignee {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.ticket-overview-avatar {
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #dff1ed;
    color: #177474;
    font-size: 12px;
    font-weight: 850;
}

.ticket-overview-assignee-copy {
    min-width: 0;
}

.ticket-overview-assignee-copy strong {
    display: block;
    overflow: hidden;
    color: #173d49;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-overview-assignee-copy small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #718990;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-overview-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid #e4ecee;
}

.ticket-overview-actions .button {
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #147581;
    border-radius: 9px;
    background: #177d88;
    color: #fff;
    box-shadow: none;
    font-size: 11px;
    font-weight: 800;
}

.ticket-overview-actions .button:hover {
    background: #116d77;
    border-color: #116d77;
}

@media (max-width: 1150px) {
    .ticket-overview-grid {
        grid-template-columns: 1fr;
    }

    .ticket-overview-column + .ticket-overview-column {
        margin: 16px 0 0;
        padding: 16px 0 0;
        border-top: 1px solid #e2ebed;
        border-left: 0;
    }
}


/* =========================================================
   TIQUET · ACCIONS RESUM SUPERIOR
   ========================================================= */

.ticket-overview-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
    gap: 9px;
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid #e4ecee;
}

.ticket-overview-actions .button {
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: none;
}

.ticket-overview-save {
    border: 1px solid #147581 !important;
    background: #177d88 !important;
    color: #fff !important;
}

.ticket-overview-save:hover {
    border-color: #116d77 !important;
    background: #116d77 !important;
}

.ticket-overview-reply {
    border: 1px solid #d4e2e6 !important;
    background: #f7fafb !important;
    color: #173e4a !important;
}

.ticket-overview-reply:hover {
    border-color: #b9d2d8 !important;
    background: #edf5f7 !important;
}

.ticket-overview-action-icon {
    flex: 0 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
}

.ticket-overview-action-icon svg {
    width: 15px !important;
    height: 15px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-overview-action-icon svg path {
    fill: none !important;
    stroke: currentColor !important;
}

@media (max-width: 1150px) {
    .ticket-overview-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   TIQUET · RESUM · RESPOSTA / NOTA INTERNA
   ========================================================= */

.ticket-overview-actions {
    grid-template-columns: 1fr 1fr;
}

.ticket-overview-reply {
    border: 1px solid #147581 !important;
    background: #177d88 !important;
    color: #fff !important;
}

.ticket-overview-reply:hover {
    border-color: #116d77 !important;
    background: #116d77 !important;
}

.ticket-overview-note {
    border: 1px solid #d4e2e6 !important;
    background: #f7fafb !important;
    color: #173e4a !important;
}

.ticket-overview-note:hover {
    border-color: #b9d2d8 !important;
    background: #edf5f7 !important;
}


/* =========================================================
   TIQUET · CAPÇALERA I PESTANYES
   ========================================================= */

.ticket-detail-header {
    padding-bottom: 0;
}

.ticket-detail-title h1 {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #173846;
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.15;
    letter-spacing: -.025em;
}

.ticket-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 4px;
    color: #748a92;
    font-size: 11px;
    line-height: 1.4;
}

.ticket-header-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ticket-header-meta-icon {
    flex: 0 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: #67858e;
}

.ticket-header-meta-icon svg {
    display: block;
    width: 14px !important;
    height: 14px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-header-meta-icon svg * {
    fill: none !important;
    stroke: currentColor !important;
}

.ticket-header-meta-separator {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #a8b9be;
}

.ticket-detail-tabs {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-top: 21px;
    overflow-x: auto;
    border-bottom: 1px solid #dce7e9;
    scrollbar-width: none;
}

.ticket-detail-tabs::-webkit-scrollbar {
    display: none;
}

.ticket-detail-tab {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 43px;
    padding: 0 1px 11px;
    color: #6d858d;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color .16s ease;
}

.ticket-detail-tab:hover {
    color: #176f7b;
}

.ticket-detail-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: transparent;
}

.ticket-detail-tab.is-active {
    color: #176f7b;
}

.ticket-detail-tab.is-active::after {
    background: #1a8591;
}

.ticket-detail-tab-icon {
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.ticket-detail-tab-icon svg {
    width: 16px !important;
    height: 16px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ticket-detail-tab-icon svg * {
    fill: none !important;
    stroke: currentColor !important;
}

#ticket-conversation,
#ticket-management-history,
#ticket-equipment-panel,
#ticket-departments-panel,
#ticket-composer {
    scroll-margin-top: 90px;
}

@media (max-width: 900px) {
    .ticket-detail-tabs {
        gap: 18px;
    }

    .ticket-header-meta {
        gap: 7px;
    }
}


/* =========================================================
   TIQUET · POLIMENT TABS ESTIL MOCKUP
   ========================================================= */

.ticket-detail-header {
    margin-bottom: 10px;
}

.ticket-detail-title h1 {
    margin-top: 8px;
    margin-bottom: 7px;
}

.ticket-header-meta {
    margin-top: 2px;
    gap: 7px;
    font-size: 10px;
}

.ticket-detail-tabs {
    gap: 22px;
    margin-top: 12px;
    border-bottom: 1px solid #dbe5e8;
}

.ticket-detail-tab {
    min-height: 39px;
    padding-bottom: 10px;
    gap: 6px;
    color: #6f858d;
    font-size: 10px;
    font-weight: 700;
}

.ticket-detail-tab::after {
    height: 2px;
}

.ticket-detail-tab.is-active {
    color: #0f6f7d;
    font-weight: 800;
}

.ticket-detail-tab.is-active::after {
    background: #13808d;
}

.ticket-detail-tab-icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
}

.ticket-detail-tab-icon svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 1.75;
}

/* El contingut actiu queda més proper a les pestanyes */
.ticket-tab-stage {
    margin-top: 0;
}

.ticket-tab-panel {
    margin-top: 0;
}

.ticket-tab-panel > .panel,
.ticket-tab-panel > .detail-card {
    margin-top: 14px;
}

/* Panells principals més semblants al mockup */
.ticket-tab-panel > .panel {
    border: 1px solid #dce6e9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(21, 57, 68, .035);
}

.ticket-tab-panel > .panel > .panel-heading {
    padding: 16px 20px;
}

.ticket-tab-panel > .panel > .panel-heading h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
}

.ticket-tab-panel > .panel > .panel-heading p {
    margin-top: 3px;
    font-size: 10px;
}

/* =========================================================
   EQUIPAMENTS · VISTA DE PESTANYA
   ========================================================= */

.ticket-equipment-tab-view {
    border: 1px solid #dce6e9 !important;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: 0 4px 16px rgba(21, 57, 68, .035);
    overflow: hidden;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-header {
    cursor: default;
    min-height: auto;
    padding: 16px 20px;
    border-bottom: 1px solid #e5edef;
    background: #fff;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-header:hover {
    background: #fff;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-heading {
    align-items: flex-start;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-heading strong {
    font-size: 15px;
    line-height: 1.25;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-heading small {
    margin-top: 3px;
    font-size: 10px;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-chevron {
    display: none;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-body {
    display: block !important;
    padding: 18px 20px 20px;
}

.ticket-equipment-tab-view
.ticket-sidebar-accordion-body[hidden] {
    display: block !important;
}

/* Llistes GLPI una mica més airejades dins contingut principal */
.ticket-equipment-tab-view .detail-list {
    margin-top: 12px;
}

.ticket-equipment-tab-view .detail-list > div {
    padding-top: 11px;
    padding-bottom: 11px;
}

.ticket-equipment-tab-view .glpi-manual-search {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5edef;
}

/* =========================================================
   HISTORIAL
   ========================================================= */

.ticket-tab-panel .history-grid {
    background: #fff;
}

.ticket-tab-panel .history-block {
    padding: 17px 20px;
}

.ticket-tab-panel .history-block h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 11px;
}

.ticket-tab-panel .timeline-item {
    padding-top: 5px;
    padding-bottom: 5px;
}

/* =========================================================
   DEPARTAMENTS / TICs
   ========================================================= */

.ticket-tab-panel .ticket-multi-panel {
    margin-top: 14px;
}

.ticket-tab-panel .ticket-multi-heading {
    padding: 16px 20px;
}

.ticket-tab-panel .ticket-multi-kicker {
    font-size: 9px;
}

.ticket-tab-panel .ticket-multi-heading h2 {
    margin-top: 3px;
    font-size: 15px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .ticket-detail-tabs {
        gap: 18px;
    }

    .ticket-detail-tab {
        font-size: 9.5px;
    }
}

@media (max-width: 760px) {
    .ticket-detail-tabs {
        margin-top: 10px;
        gap: 16px;
    }

    .ticket-detail-tab {
        min-height: 37px;
    }

    .ticket-tab-panel > .panel,
    .ticket-equipment-tab-view,
    .ticket-tab-panel .ticket-multi-panel {
        border-radius: 11px !important;
    }
}


/* =========================================================
   CEEB SUPPORT · PALETA CORPORATIVA
   ========================================================= */

:root {
    --ceeb-blue: #15509F;
    --ceeb-blue-alt: #0170B9;
    --ceeb-orange: #D05435;
    --ceeb-red: #C81E1E;
    --ceeb-gray: #575756;

    --ceeb-blue-soft: rgba(21, 80, 159, .08);
    --ceeb-blue-alt-soft: rgba(1, 112, 185, .08);
    --ceeb-orange-soft: rgba(208, 84, 53, .09);
    --ceeb-red-soft: rgba(200, 30, 30, .08);
}

/* Pestanyes */
.ticket-detail-tab {
    color: #667b83;
}

.ticket-detail-tab:hover {
    color: var(--ceeb-blue-alt);
}

.ticket-detail-tab.is-active {
    color: var(--ceeb-blue);
}

.ticket-detail-tab.is-active::after {
    background: var(--ceeb-blue);
}

/* Icones de pestanyes */
.ticket-detail-tab:nth-child(1) .ticket-detail-tab-icon {
    color: var(--ceeb-blue);
}

.ticket-detail-tab:nth-child(2) .ticket-detail-tab-icon {
    color: var(--ceeb-blue-alt);
}

.ticket-detail-tab:nth-child(3) .ticket-detail-tab-icon {
    color: var(--ceeb-blue);
}

.ticket-detail-tab:nth-child(4) .ticket-detail-tab-icon {
    color: var(--ceeb-orange);
}

.ticket-detail-tab:nth-child(5) .ticket-detail-tab-icon {
    color: #667b83;
}

/* Número del tiquet */
.ticket-big-number,
.ticket-overview-ticket {
    color: var(--ceeb-blue);
}

/* Estat obert */
.status-badge.status-open,
.ticket-overview-status {
    border-color: rgba(1, 112, 185, .22);
    background: var(--ceeb-blue-alt-soft);
    color: var(--ceeb-blue-alt);
}

/* Botó principal Respon */
.ticket-overview-reply {
    border-color: var(--ceeb-blue) !important;
    background: var(--ceeb-blue) !important;
    color: #fff !important;
}

.ticket-overview-reply:hover {
    border-color: #123f7c !important;
    background: #123f7c !important;
}

/* Botó Nota interna */
.ticket-overview-note {
    border-color: rgba(21, 80, 159, .20) !important;
    background: #fff !important;
    color: var(--ceeb-blue) !important;
}

.ticket-overview-note:hover {
    border-color: var(--ceeb-blue-alt) !important;
    background: var(--ceeb-blue-alt-soft) !important;
}

/* Icones del resum superior */
.ticket-overview-inline-icon {
    color: var(--ceeb-blue-alt);
}

/* Avatar agent */
.ticket-overview-avatar {
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue);
}

/* Acordions sidebar */
.ticket-sidebar-accordion-icon {
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue);
}

/* Gestió */
.management-card .ticket-sidebar-accordion-icon {
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue);
}

/* Esperes */
.ticket-sidebar-accordion:has(.ticket-sidebar-accordion-heading strong:nth-child(1)) {
    --accordion-accent: var(--ceeb-blue);
}

/* Equipaments */
.ticket-equipment-tab-view
.ticket-sidebar-accordion-icon {
    background: var(--ceeb-blue-alt-soft);
    color: var(--ceeb-blue-alt);
}

/* Links */
.ticket-detail-main a:not(.button),
.management-department-routing a,
.glpi-asset-name-link {
    color: var(--ceeb-blue-alt);
}

.ticket-detail-main a:not(.button):hover,
.management-department-routing a:hover,
.glpi-asset-name-link:hover {
    color: var(--ceeb-blue);
}

/* Prioritat */
.priority-badge {
    color: var(--ceeb-gray);
}

.priority-badge.priority-low {
    border-color: rgba(1, 112, 185, .16);
    background: var(--ceeb-blue-alt-soft);
    color: var(--ceeb-blue-alt);
}

.priority-badge.priority-high {
    border-color: rgba(208, 84, 53, .22);
    background: var(--ceeb-orange-soft);
    color: var(--ceeb-orange);
}

.priority-badge.priority-urgent,
.priority-badge.priority-critical {
    border-color: rgba(200, 30, 30, .22);
    background: var(--ceeb-red-soft);
    color: var(--ceeb-red);
}

/* Missatges */
.message-card.message-internal_note {
    background: #fffaf7;
    border-left-color: var(--ceeb-orange);
}

.message-card.message-agent_reply {
    border-left-color: var(--ceeb-blue);
}

/* Historial */
.timeline-dot {
    background: var(--ceeb-blue-alt);
}

.timeline-dot-escalation {
    background: var(--ceeb-orange);
}

.timeline-dot-third {
    background: var(--ceeb-orange);
}

/* Focus */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--ceeb-blue-alt) !important;
    box-shadow: 0 0 0 3px rgba(1, 112, 185, .10);
}

/* Seleccions i controls */
.glpi-asset-check.is-linked {
    border-color: rgba(21, 80, 159, .25);
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue);
}


/* =========================================================
   CEEB SUPPORT · SIDEBAR + BOTONS CORPORATIUS
   ========================================================= */

/* -----------------------------------------
   BOTONS GLOBALS
   ----------------------------------------- */

.button-primary {
    background: var(--ceeb-blue) !important;
    color: #fff !important;
}

.button-primary:hover {
    background: var(--ceeb-blue-alt) !important;
}

.button-secondary {
    border: 1px solid rgba(21, 80, 159, .18);
    background: #fff;
    color: var(--ceeb-blue);
}

.button-secondary:hover {
    border-color: rgba(1, 112, 185, .35);
    background: var(--ceeb-blue-alt-soft);
    color: var(--ceeb-blue-alt);
}

.button-disabled,
.button:disabled {
    opacity: .45;
    cursor: not-allowed;
}


/* -----------------------------------------
   SIDEBAR CEEB
   ----------------------------------------- */

.sidebar {
    background:
        linear-gradient(
            180deg,
            #15509F 0%,
            #124885 100%
        );
    color: #fff;
}

.sidebar-brand small {
    color: rgba(255,255,255,.68);
}

.sidebar-brand strong {
    color: #fff;
}

.nav-item {
    color: rgba(255,255,255,.78);
    transition:
        background .16s ease,
        color .16s ease,
        transform .16s ease;
}

.nav-item:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
}

.nav-item.active {
    background: rgba(255,255,255,.16);
    color: #fff;
    box-shadow:
        inset 3px 0 0 #fff;
}

.nav-icon {
    color: rgba(255,255,255,.92);
}

.nav-item.active .nav-icon {
    color: #fff;
}

.nav-subitems a {
    color: rgba(255,255,255,.62);
}

.nav-subitems a:hover {
    color: #fff;
}

.nav-section {
    color: rgba(255,255,255,.50);
}

.nav-disabled {
    opacity: .48;
}

.nav-disabled small {
    color: rgba(255,255,255,.52);
}


/* -----------------------------------------
   USUARI / FOOTER
   ----------------------------------------- */

.sidebar-footer {
    border-top-color: rgba(255,255,255,.16);
}

.avatar {
    background: #fff;
    color: var(--ceeb-blue);
}

.sidebar-user-copy strong {
    color: #fff;
}

.sidebar-user-copy small {
    color: rgba(255,255,255,.62);
}


/* -----------------------------------------
   CANVI D'ESPAI
   ----------------------------------------- */

.portal-switch-form {
    margin: 0 0 8px;
}

.sidebar-portal-switch {
    position: relative;
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
    transition:
        background .16s ease,
        border-color .16s ease,
        transform .16s ease;
}

.sidebar-portal-switch::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    background:
        no-repeat center / 18px 18px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h11l-3-3'/%3E%3Cpath d='m18 7-3 3'/%3E%3Cpath d='M17 17H6l3 3'/%3E%3Cpath d='m6 17 3-3'/%3E%3C/svg%3E");
    opacity: .96;
}

.sidebar-portal-switch:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.32);
    color: #fff;
}

.sidebar-portal-switch:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}


/* -----------------------------------------
   SORTIR
   ----------------------------------------- */

.sidebar-logout {
    min-height: 40px;
    border: 1px solid rgba(255,255,255,.18);
    background: transparent;
    color: rgba(255,255,255,.88);
}

.sidebar-logout:hover {
    background: rgba(200,30,30,.22);
    border-color: rgba(255,255,255,.28);
    color: #fff;
}


/* -----------------------------------------
   SIDEBAR COL·LAPSAT
   ----------------------------------------- */

@media (min-width: 901px) {

    .app-shell.sidebar-collapsed {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .app-shell.sidebar-collapsed .sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-shell.sidebar-collapsed .nav-item.active {
        box-shadow:
            inset 0 0 0 1px rgba(255,255,255,.20);
        background: rgba(255,255,255,.15);
    }

    .app-shell.sidebar-collapsed
    .sidebar-portal-switch {
        min-height: 44px;
        padding: 0;
        font-size: 0;
        gap: 0;
    }

    .app-shell.sidebar-collapsed
    .sidebar-portal-switch::before {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
        background-size: 20px 20px;
    }

    .app-shell.sidebar-collapsed
    .sidebar-logout {
        min-height: 44px;
        padding: 0;
        font-size: 0;
    }

    .app-shell.sidebar-collapsed
    .sidebar-logout::before {
        content: "";
        display: inline-block;
        width: 19px;
        height: 19px;
        background:
            no-repeat center / 19px 19px
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
    }
}


/* -----------------------------------------
   TOPBAR / TOGGLE
   ----------------------------------------- */

.sidebar-toggle {
    color: var(--ceeb-blue);
}

.sidebar-toggle:hover {
    border-color: rgba(21,80,159,.22);
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue-alt);
}


/* =========================================================
   CEEB SUPPORT · PASSADA VISUAL FINAL
   ========================================================= */

/* -----------------------------------------
   BRAND GLOBAL
   ----------------------------------------- */

:root {
    --brand: #15509F;
    --brand-dark: #123f7c;
}

/* -----------------------------------------
   BADGES
   ----------------------------------------- */

.status-open {
    background: rgba(1, 112, 185, .08) !important;
    border-color: rgba(1, 112, 185, .20) !important;
    color: #0170B9 !important;
}

.priority-low {
    background: rgba(21, 80, 159, .06) !important;
    border-color: rgba(21, 80, 159, .14) !important;
    color: #15509F !important;
}

.priority-medium {
    background: rgba(208, 84, 53, .07) !important;
    border-color: rgba(208, 84, 53, .16) !important;
    color: #D05435 !important;
}

.priority-high {
    background: rgba(208, 84, 53, .10) !important;
    border-color: rgba(208, 84, 53, .22) !important;
    color: #D05435 !important;
}

.priority-urgent,
.priority-critical {
    background: rgba(200, 30, 30, .08) !important;
    border-color: rgba(200, 30, 30, .20) !important;
    color: #C81E1E !important;
}

.assignment-badge {
    background: rgba(21, 80, 159, .05) !important;
    border-color: rgba(21, 80, 159, .13) !important;
    color: #575756 !important;
}

.assignment-badge.assignment-agent {
    color: #15509F !important;
}

.assignment-badge.assignment-group {
    color: #0170B9 !important;
}


/* -----------------------------------------
   NIVELLS
   ----------------------------------------- */

.level-badge-n1,
.current-level-n1 {
    background: rgba(21, 80, 159, .07) !important;
    border-color: rgba(21, 80, 159, .17) !important;
    color: #15509F !important;
}

.level-badge-n2,
.current-level-n2 {
    background: rgba(208, 84, 53, .08) !important;
    border-color: rgba(208, 84, 53, .20) !important;
    color: #D05435 !important;
}

.level-badge-n3,
.current-level-n3 {
    background: rgba(200, 30, 30, .08) !important;
    border-color: rgba(200, 30, 30, .20) !important;
    color: #C81E1E !important;
}


/* -----------------------------------------
   ACORDIONS · BASE
   ----------------------------------------- */

.ticket-sidebar-accordion-icon {
    transition:
        background .16s ease,
        color .16s ease,
        transform .16s ease;
}

.ticket-sidebar-accordion-header:hover
.ticket-sidebar-accordion-icon {
    transform: translateY(-1px);
}

.ticket-sidebar-accordion-chevron {
    color: #8aa0a7;
}


/* Gestió */
.management-card .ticket-sidebar-accordion-icon {
    background: rgba(21, 80, 159, .09);
    color: #15509F;
}

/* Sol·licitant */
.requester-card .ticket-sidebar-accordion-icon {
    background: rgba(1, 112, 185, .09);
    color: #0170B9;
}

/* Persona afectada */
.affected-person-detail-card
.ticket-sidebar-accordion-icon {
    background: rgba(1, 112, 185, .09);
    color: #0170B9;
}

/* Seguidors */
.followers-card .ticket-sidebar-accordion-icon {
    background: rgba(21, 80, 159, .08);
    color: #15509F;
}

/* Nivell i escalat */
.support-level-card .ticket-sidebar-accordion-icon {
    background: rgba(208, 84, 53, .10);
    color: #D05435;
}

/* Espera tercer */
.third-party-card .ticket-sidebar-accordion-icon {
    background: rgba(208, 84, 53, .10);
    color: #D05435;
}

/* Espera client */
.requester-wait-card .ticket-sidebar-accordion-icon {
    background: rgba(208, 84, 53, .08);
    color: #D05435;
}

/* Equipament */
.glpi-assets-card .ticket-sidebar-accordion-icon,
.ticket-equipment-tab-view .ticket-sidebar-accordion-icon {
    background: rgba(1, 112, 185, .09);
    color: #0170B9;
}


/* -----------------------------------------
   PANELL ACTIU
   ----------------------------------------- */

.ticket-sidebar-accordion.is-open {
    border-color: rgba(21, 80, 159, .13);
}

.ticket-sidebar-accordion.is-open
.ticket-sidebar-accordion-header {
    background: rgba(21, 80, 159, .015);
}


/* -----------------------------------------
   ENLLAÇOS
   ----------------------------------------- */

a {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.ticket-detail-main a:not(.button),
.detail-card a:not(.button),
.management-department-routing a {
    color: #0170B9;
}

.ticket-detail-main a:not(.button):hover,
.detail-card a:not(.button):hover,
.management-department-routing a:hover {
    color: #15509F;
}


/* -----------------------------------------
   FORMULARIS
   ----------------------------------------- */

input,
select,
textarea {
    accent-color: #15509F;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #0170B9 !important;
    box-shadow: 0 0 0 3px rgba(1, 112, 185, .10) !important;
}


/* -----------------------------------------
   CHECKBOXES GLPI
   ----------------------------------------- */

.glpi-asset-check.is-linked {
    border-color: rgba(21, 80, 159, .20);
    background: rgba(21, 80, 159, .06);
    color: #15509F;
}


/* -----------------------------------------
   CONVERSA
   ----------------------------------------- */

.message-card.message-agent_reply {
    border-left-color: #15509F !important;
}

.message-card.message-customer_reply,
.message-card.message-initial {
    border-left-color: #0170B9 !important;
}

.message-card.message-internal_note {
    background: rgba(208, 84, 53, .035);
    border-left-color: #D05435 !important;
}

.ceeb-msg-avatar {
    background: rgba(21, 80, 159, .08);
    color: #15509F;
}


/* -----------------------------------------
   HISTORIAL
   ----------------------------------------- */

.timeline-dot {
    background: #0170B9;
}

.timeline-dot-escalation {
    background: #D05435;
}

.timeline-dot-third {
    background: #D05435;
}


/* -----------------------------------------
   BOTONS D'ACCIÓ DE RISC
   ----------------------------------------- */

.button-danger,
.danger-button {
    background: #C81E1E !important;
    color: #fff !important;
}

.button-danger:hover,
.danger-button:hover {
    background: #a91717 !important;
}


/* -----------------------------------------
   DETALLS MENORS
   ----------------------------------------- */

.management-active-badge {
    background: rgba(21, 80, 159, .06);
    color: #15509F;
    border-color: rgba(21, 80, 159, .14);
}

.back-link {
    color: #575756;
}

.back-link:hover {
    color: #15509F;
}


/* =========================================================
   CEEB SUPPORT · CONVERSA · ACABAT CORPORATIU
   ========================================================= */

/* Missatge inicial / client */
.message-card.message-initial,
.message-card.message-customer_reply {
    background: rgba(1, 112, 185, .025);
    border-left-color: #0170B9 !important;
}

/* Resposta d'agent */
.message-card.message-agent_reply {
    background: rgba(21, 80, 159, .035) !important;
    border-left-color: #15509F !important;
}

/* Nota interna */
.message-card.message-internal_note {
    background: rgba(208, 84, 53, .045) !important;
    border-left-color: #D05435 !important;
}

/* Sistema */
.message-card.message-system {
    background: rgba(87, 87, 86, .035);
    border-left-color: #8b969a;
}

/* Avatar d'agent */
.message-agent_reply .ceeb-msg-avatar {
    background: rgba(21, 80, 159, .10);
    color: #15509F;
}

/* Avatar client / inicial */
.message-initial .ceeb-msg-avatar,
.message-customer_reply .ceeb-msg-avatar {
    background: rgba(1, 112, 185, .08);
    color: #0170B9;
}

/* Avatar nota interna */
.message-internal_note .ceeb-msg-avatar {
    background: rgba(208, 84, 53, .10);
    color: #D05435;
}

/* Badge tipus de missatge */
.message-agent_reply .ceeb-msg-type-badge {
    border-color: rgba(21, 80, 159, .18);
    background: rgba(21, 80, 159, .07);
    color: #15509F;
}

.message-internal_note .ceeb-msg-type-badge {
    border-color: rgba(208, 84, 53, .18);
    background: rgba(208, 84, 53, .07);
    color: #D05435;
}


/* =========================================================
   CEEB SUPPORT · CONVERSA · COLORS SEMÀNTICS
   Recuperem la diferenciació clara per tipus de missatge
   ========================================================= */

/* Resposta de l'agent · verd suau */
.message-card.message-agent_reply {
    background: #eef8f3 !important;
    border-left-color: #45a377 !important;
}

.message-agent_reply .ceeb-msg-avatar {
    background: #dff2e8 !important;
    color: #287753 !important;
}

.message-agent_reply .ceeb-msg-type-badge {
    border-color: #b9dfca !important;
    background: #e3f5eb !important;
    color: #276f50 !important;
}

/* Nota interna · groc/beix suau */
.message-card.message-internal_note {
    background: #fffaf0 !important;
    border-left-color: #e8b756 !important;
}

.message-internal_note .ceeb-msg-avatar {
    background: #fff0c9 !important;
    color: #8a6418 !important;
}

.message-internal_note .ceeb-msg-type-badge {
    border-color: #ead397 !important;
    background: #fff3cf !important;
    color: #795b18 !important;
}



/* PAS 878 — Distintius departamentals */

.ticket-department-chip,
.dashboard-department-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 5px 9px;
    border-radius: 7px;
    border: 1px solid #d8e1e5;
    background: #f2f5f6;
    color: #455962;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
}

.ticket-department-chips,
.dashboard-department-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.ticket-department-chip small {
    font-size: 10px;
    font-weight: 400;
    color: inherit;
    opacity: .85;
}

.ticket-department-chip.dept-tics,
.dashboard-department-badge.dept-tics {
    border-color: #176B78;
    background: #e5f1f2;
    color: #176B78;
}

.ticket-department-chip.dept-comunicacio,
.dashboard-department-badge.dept-comunicacio {
    border-color: #7652B8;
    background: #f0eafa;
    color: #7652B8;
}

.ticket-department-chip.is-unclassified,
.dashboard-department-badge.dept-unclassified {
    border-color: #cbd5da;
    background: #f0f2f3;
    color: #58676e;
}

.dashboard-department-badges {
    margin-top: 5px;
}

/* Els distintius no han de forçar una sola línia. */
.ticket-mini-main .dashboard-department-badges {
    display: flex;
    white-space: normal;
}

.ticket-mini-main .dashboard-department-badge {
    display: inline-flex;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
}


/* PAS 952B — Distintius departamentals compactes */

/*
 * LLISTAT DE TIQUETS
 * Nom i estat en una mateixa linia.
 */

.ticket-departments-cell {
    vertical-align: middle;
}

.ticket-departments-cell .ticket-department-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ticket-departments-cell .ticket-department-chip {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    width: auto;
    min-width: 0;
    max-width: 100%;

    gap: 0;
    margin: 0;
    padding: 5px 9px;

    border: 1px solid #c6dde1;
    border-radius: 8px;

    background: #f1f8f9;
    color: #176b78;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;

    white-space: nowrap;
    box-sizing: border-box;

    box-shadow: none;
    vertical-align: middle;
}

.ticket-departments-cell .ticket-department-chip strong {
    display: inline;
    margin: 0;
    padding: 0;

    font-size: 11px;
    font-weight: 700;
    line-height: inherit;

    color: inherit;
    white-space: nowrap;
}

.ticket-departments-cell .ticket-department-chip small {
    display: inline;
    margin: 0;
    padding: 0;

    font-size: 10px;
    font-weight: 400;
    line-height: inherit;

    color: inherit;
    opacity: .76;

    white-space: nowrap;
}

/* Separador discret entre departament i estat. */

.ticket-departments-cell .ticket-department-chip small::before {
    content: "·";
    display: inline-block;
    margin: 0 5px;

    font-weight: 700;
    opacity: .55;
}

/* TIC */

.ticket-departments-cell .ticket-department-chip.dept-tics {
    background: #edf7f8;
    border-color: #b8d9de;
    color: #176b78;
}

/* Comunicacio */

.ticket-departments-cell .ticket-department-chip.dept-comunicacio {
    background: #f5f1fc;
    border-color: #d7c7ef;
    color: #7652b8;
}

/* Sense classificar */

.ticket-departments-cell .ticket-department-chip.is-unclassified {
    background: #f3f5f6;
    border-color: #dce3e6;
    color: #657982;
}

/*
 * DASHBOARD
 * Distintius petits, d'una sola linia.
 */

.ticket-mini-main .dashboard-department-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;

    margin-top: 5px;
    margin-bottom: 3px;

    white-space: normal;
}

.ticket-mini-main .dashboard-department-badge {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 0;

    margin: 0;
    padding: 3px 8px;

    border-radius: 6px;
    border: 1px solid #b8d9de;

    background: #edf7f8;
    color: #176b78;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;

    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;

    box-shadow: none;
}

.ticket-mini-main .dashboard-department-badge.dept-tics {
    background: #edf7f8;
    border-color: #b8d9de;
    color: #176b78;
}

.ticket-mini-main .dashboard-department-badge.dept-comunicacio {
    background: #f5f1fc;
    border-color: #d7c7ef;
    color: #7652b8;
}

.ticket-mini-main .dashboard-department-badge.dept-unclassified {
    background: #f3f5f6;
    border-color: #dce3e6;
    color: #657982;
}

/* Adaptacio a pantalles petites. */

@media (max-width: 650px) {

    .ticket-departments-cell .ticket-department-chips {
        gap: 5px;
    }

    .ticket-departments-cell .ticket-department-chip {
        padding: 4px 7px;
    }

    .ticket-mini-main .dashboard-department-badge {
        padding: 3px 7px;
    }
}

/* FI PAS 952B */

/* =========================================================
   B2C24-E5.2
   SIDEBAR RESPONSIVE + MENU DESPLEGABLE TIQUETS
   ========================================================= */

/*
 * El nav pot continuar fent scroll si realment
 * no hi cap el contingut, però sense mostrar
 * la scrollbar grossa del navegador.
 */
.sidebar-nav {
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}

.sidebar-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
}


/*
 * Tiquets deixa de ser un enllaç principal
 * i passa a actuar com a controlador del submenu.
 */
.nav-ticket-toggle {
    width: 100%;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.nav-ticket-toggle:not(.active) {
    background: transparent;
}


/*
 * Fletxa del desplegable.
 */
.nav-ticket-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .18s ease;
}

.nav-group-tickets.is-open
.nav-ticket-chevron {
    transform: rotate(90deg);
}


/*
 * Tancat per defecte.
 */
.nav-group-tickets
.nav-subitems {
    display: none;
}


/*
 * Obert quan PHP o JS assignen .is-open.
 */
.nav-group-tickets.is-open
.nav-subitems {
    display: block;
}


/*
 * Pantalles amb poca alçada però amplada
 * d'escriptori: reduïm espais verticals.
 */
@media
    (max-height: 760px)
    and (min-width: 901px) {

    .sidebar {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .sidebar-brand {
        padding-bottom: 12px;
    }

    .nav-item {
        min-height: 38px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
}


/*
 * El mode compacte existent (< 900px)
 * continua sense mostrar submenus textuals.
 */
@media (max-width: 900px) {

    .nav-group-tickets
    .nav-subitems {
        display: none !important;
    }

    .nav-ticket-chevron {
        display: none;
    }
}

/* =========================================================
   B2C24-E5.3
   REFINAMENT PROFESSIONAL SIDEBAR / TIQUETS
   ========================================================= */


/* ---------------------------------------------------------
   BOTÓ PRINCIPAL TIQUETS
   --------------------------------------------------------- */

.nav-ticket-toggle {
    appearance: none;
    color: #cfe0e5;
    background: transparent;
}

.nav-ticket-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
}

.nav-ticket-toggle.active {
    color: #fff;
}


/* Fletxa més discreta */

.nav-ticket-chevron {
    width: 20px;
    height: 20px;
    font-size: 15px;
    opacity: .78;
    transition:
        transform .18s ease,
        opacity .18s ease;
}

.nav-ticket-toggle:hover
.nav-ticket-chevron {
    opacity: 1;
}

.nav-group-tickets.is-open
.nav-ticket-chevron {
    transform: rotate(90deg);
}


/* ---------------------------------------------------------
   SUBMENU
   --------------------------------------------------------- */

/*
 * Sempre una sola columna.
 * Evitem l'aspecte de links flotants en dues columnes.
 */

.nav-group-tickets
.nav-subitems {
    display: none;
    grid-template-columns: 1fr;
    gap: 2px;

    margin:
        2px
        0
        10px
        37px;

    padding:
        3px
        0
        3px
        12px;

    border-left:
        1px solid
        rgba(255,255,255,.14);
}


/*
 * IMPORTANT:
 * display:grid, no display:block.
 */

.nav-group-tickets.is-open
.nav-subitems {
    display: grid;
}


/*
 * Cada vista es comporta com una opció real
 * del menú lateral.
 */

.nav-group-tickets
.nav-subitems a {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 30px;

    padding:
        5px
        9px;

    border-radius: 7px;

    color: #b9ced6;

    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;

    text-decoration: none;

    transition:
        color .15s ease,
        background .15s ease;
}


.nav-group-tickets
.nav-subitems a:hover {
    color: #fff;
    background:
        rgba(255,255,255,.06);
}


/*
 * Vista seleccionada.
 */

.nav-group-tickets
.nav-subitems a.active {
    color: #fff;

    background:
        rgba(255,255,255,.10);

    font-weight: 800;
}


/*
 * Petit indicador de la cua actual.
 */

.nav-group-tickets
.nav-subitems a.active::before {
    content: '';

    position: absolute;

    left: -15px;

    width: 5px;
    height: 5px;

    border-radius: 999px;

    background: #fff;
}


/* ---------------------------------------------------------
   SIDEBAR PLEGAT MANUALMENT
   --------------------------------------------------------- */

/*
 * Aquesta és la correcció principal de la captura:
 * MAI mostrem el submenu quan el sidebar està plegat.
 */

.app-shell.sidebar-collapsed
.nav-group-tickets
.nav-subitems {
    display: none !important;
}


/*
 * Tampoc mostrem fletxa.
 */

.app-shell.sidebar-collapsed
.nav-ticket-chevron {
    display: none !important;
}


/*
 * El botó queda exactament com la resta
 * d'icones del menú plegat.
 */

.app-shell.sidebar-collapsed
.nav-ticket-toggle {
    grid-template-columns: 1fr;
    justify-items: center;
}


/*
 * Garantia addicional:
 * el text "Tiquets" no pot ocupar espai.
 */

.app-shell.sidebar-collapsed
.nav-ticket-toggle
> span:nth-child(2) {
    display: none !important;
}


/* ---------------------------------------------------------
   RESPONSIVE <= 900 px
   --------------------------------------------------------- */

@media (max-width: 900px) {

    /*
     * No intentem encaixar un submenu textual
     * dins d'un sidebar de 76px.
     */

    .nav-group-tickets
    .nav-subitems {
        display: none !important;
    }

    .nav-ticket-chevron {
        display: none !important;
    }

    .nav-ticket-toggle {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .nav-ticket-toggle
    > span:nth-child(2) {
        display: none;
    }
}


/* ---------------------------------------------------------
   PANTALLES BAIXES
   --------------------------------------------------------- */

@media
    (max-height: 760px)
    and (min-width: 901px) {

    /*
     * Conservem jerarquia visual però aprofitem millor
     * l'alçada disponible.
     */

    .nav-group-tickets
    .nav-subitems a {
        min-height: 27px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .nav-group-tickets
    .nav-subitems {
        margin-bottom: 6px;
    }
}

/* =========================================================
   B2C24-E6.1
   BRANDING EL CONSELL ÀGORA
   ========================================================= */


/* SIDEBAR */

.sidebar-brand-agora {
    display: flex;
    align-items: center;

    min-height: 66px;

    padding:
        4px
        5px
        18px;

    overflow: hidden;
}


.brand-agora-full {
    display: block;

    width: 190px;
    max-width: 100%;

    height: 66px;

    object-fit: contain;
    object-position: left center;
}


.brand-agora-mark {
    display: none;

    width: 42px;
    height: 42px;

    object-fit: contain;
}


/*
 * Sidebar plegat manualment
 */

.app-shell.sidebar-collapsed
.sidebar-brand-agora {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}


.app-shell.sidebar-collapsed
.brand-agora-full {
    display: none;
}


.app-shell.sidebar-collapsed
.brand-agora-mark {
    display: block;
}


/*
 * Sidebar compacte responsive
 */

@media (max-width: 900px) {

    .sidebar-brand-agora {
        justify-content: center;

        min-height: 58px;

        padding:
            4px
            0
            14px;
    }

    .brand-agora-full {
        display: none;
    }

    .brand-agora-mark {
        display: block;

        width: 42px;
        height: 42px;
    }
}


/* LOGIN */

.brand-agora-auth {
    width: 100%;

    justify-content: center;

    margin-bottom: 18px;
}


.brand-agora-auth img {
    display: block;

    width: min(100%, 430px);

    height: auto;

    margin: 0 auto;
}


/* WELCOME */

.welcome-agora-brand {
    width: 100%;

    margin-bottom: 12px;
}


.welcome-agora-brand img {
    display: block;

    width: min(100%, 430px);

    height: auto;
}


/*
 * Mantenim la marca visualment equilibrada
 * en dispositius petits.
 */

@media (max-width: 650px) {

    .brand-agora-auth img,
    .welcome-agora-brand img {
        width: min(100%, 330px);
    }
}



/* =========================================================
   B2C24-E6.2
   REFINAMENT PROFESSIONAL BRANDING SIDEBAR
   ========================================================= */


/*
 * Logo complet.
 *
 * Una mica més compacte perquè respiri millor
 * amb la resta del menú.
 */

.sidebar-brand-agora {
    min-height: 72px;

    padding:
        4px
        8px
        16px;
}


.brand-agora-full {
    width: 205px;
    height: 70px;

    object-fit: contain;
    object-position: left center;
}


/*
 * =========================================================
 * MARCA COMPACTA
 * =========================================================
 *
 * Mantenim els colors originals del símbol.
 * El contrast es resol amb un suport blanc,
 * no modificant el logotip.
 */

.brand-agora-mark {
    width: 46px;
    height: 46px;

    box-sizing: border-box;

    padding: 5px;

    background: #FFFFFF;

    border-radius: 50%;

    border:
        1px solid
        rgba(255,255,255,.55);

    box-shadow:
        0 2px 8px rgba(0,0,0,.18);

    object-fit: contain;
}


/*
 * Sidebar plegat.
 */

.app-shell.sidebar-collapsed
.sidebar-brand-agora {
    min-height: 70px;

    padding:
        8px
        0
        16px;

    justify-content: center;
}


.app-shell.sidebar-collapsed
.brand-agora-mark {
    display: block;

    width: 48px;
    height: 48px;

    padding: 5px;
}


/*
 * Petit efecte visual en hover.
 * Sense exagerar ni convertir-lo en botó.
 */

.sidebar-brand-agora
.brand-agora-mark {
    transition:
        transform .18s ease,
        box-shadow .18s ease;
}


.sidebar-brand-agora:hover
.brand-agora-mark {
    transform: translateY(-1px);

    box-shadow:
        0 4px 12px rgba(0,0,0,.22);
}


/*
 * Responsive compacte.
 */

@media (max-width: 900px) {

    .sidebar-brand-agora {
        min-height: 68px;

        padding:
            7px
            0
            14px;
    }

    .brand-agora-mark {
        width: 46px;
        height: 46px;

        padding: 5px;
    }
}


/*
 * Pantalles especialment baixes.
 */

@media
    (max-height: 760px)
    and (min-width: 901px) {

    .sidebar-brand-agora {
        min-height: 62px;

        padding-bottom: 9px;
    }

    .brand-agora-full {
        height: 60px;
    }

    .app-shell.sidebar-collapsed
    .brand-agora-mark {
        width: 44px;
        height: 44px;
    }
}

/* =========================================================
   B2C24-E11.2B — TOASTS PROFESSIONALS
   ========================================================= */

.ticket-toast-region {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    gap: 12px;

    width: min(420px, calc(100vw - 32px));

    pointer-events: none;
}

.ticket-toast {
    --toast-duration: 5000ms;

    position: relative;

    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: start;

    overflow: hidden;

    padding: 16px 14px 18px 16px;

    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 14px;

    box-shadow:
        0 18px 50px rgba(15, 23, 42, 0.16),
        0 3px 12px rgba(15, 23, 42, 0.08);

    pointer-events: auto;

    opacity: 0;
    transform: translateY(-10px) scale(.98);

    transition:
        opacity .22s ease,
        transform .22s ease;
}

.ticket-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ticket-toast.is-leaving {
    opacity: 0;
    transform: translateX(18px) scale(.98);
}

.ticket-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    font-size: 17px;
    font-weight: 800;
}

.ticket-toast-content {
    min-width: 0;
    padding-top: 1px;
}

.ticket-toast-title {
    display: block;

    margin: 0 0 3px;

    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;

    color: #0f172a;
}

.ticket-toast-message {
    margin: 0;

    font-size: 13px;
    line-height: 1.45;

    color: #475569;

    overflow-wrap: anywhere;
}

.ticket-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    margin: -4px -4px 0 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #64748b;
    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease;
}

.ticket-toast-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.ticket-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 3px;

    transform-origin: left center;
}

.ticket-toast.is-timed.is-visible .ticket-toast-progress {
    animation:
        ticket-toast-progress
        var(--toast-duration)
        linear
        forwards;
}

@keyframes ticket-toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/* SUCCESS */

.ticket-toast-success {
    border-left: 4px solid #16a34a;
}

.ticket-toast-success .ticket-toast-icon {
    background: #dcfce7;
    color: #15803d;
}

.ticket-toast-success .ticket-toast-progress {
    background: #22c55e;
}


/* ERROR */

.ticket-toast-error {
    border-left: 4px solid #dc2626;
}

.ticket-toast-error .ticket-toast-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.ticket-toast-error .ticket-toast-progress {
    background: #ef4444;
}


/* WARNING */

.ticket-toast-warning {
    border-left: 4px solid #d97706;
}

.ticket-toast-warning .ticket-toast-icon {
    background: #fef3c7;
    color: #b45309;
}

.ticket-toast-warning .ticket-toast-progress {
    background: #f59e0b;
}


/* INFO */

.ticket-toast-info {
    border-left: 4px solid #2563eb;
}

.ticket-toast-info .ticket-toast-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.ticket-toast-info .ticket-toast-progress {
    background: #3b82f6;
}


/*
 * Els flash tradicionals continuen existint al DOM
 * per compatibilitat PHP, però JS els converteix
 * immediatament a toast.
 */
.app-flash.toast-source-hidden {
    display: none !important;
}


@media (max-width: 720px) {

    .ticket-toast-region {
        top: 12px;
        right: 12px;
        left: 12px;

        width: auto;
    }

    .ticket-toast {
        grid-template-columns:
            32px minmax(0, 1fr) 28px;

        padding:
            14px 12px 16px 14px;
    }

    .ticket-toast-icon {
        width: 30px;
        height: 30px;

        font-size: 15px;
    }

}


@media (prefers-reduced-motion: reduce) {

    .ticket-toast {
        transition: none;
    }

    .ticket-toast.is-timed.is-visible
    .ticket-toast-progress {
        animation: none;
    }

}


/* =========================================================
   B2C24-E12.2 — SIDEBAR PROFESSIONAL
   Logo original + SVG homogenis + revisio cromatica
   ========================================================= */

/*
 * Capa final deliberada.
 *
 * No modifiquem els SVG corporatius originals.
 * Aquesta capa normalitza les múltiples regles històriques
 * existents a app.css i es converteix en la font visual
 * efectiva de la sidebar.
 */

.sidebar {
    background:
        linear-gradient(
            180deg,
            #15509F 0%,
            #124785 100%
        );

    color: #fff;
}


/* ---------------------------------------------------------
   BRAND
   --------------------------------------------------------- */

.sidebar-brand-agora {
    min-height: 78px;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    padding:
        4px
        10px
        20px;

    overflow: visible;
}

.sidebar-brand-agora .brand-agora-full {
    display: block;

    width: 100%;
    max-width: 198px;
    height: 66px;

    padding: 0;
    margin: 0;

    object-fit: contain;
    object-position: left center;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.sidebar-brand-agora .brand-agora-mark {
    display: none;

    width: 44px;
    height: 44px;

    padding: 4px;

    object-fit: contain;

    background: rgba(255,255,255,.96);
    border-radius: 13px;
    box-shadow:
        0 3px 12px rgba(6, 30, 67, .15);
}


/* ---------------------------------------------------------
   NAVEGACIO
   --------------------------------------------------------- */

.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color:
        rgba(255,255,255,.22)
        transparent;
}

.nav-item {
    min-height: 44px;

    grid-template-columns:
        26px
        minmax(0, 1fr)
        auto;

    gap: 9px;

    margin-bottom: 3px;

    padding:
        9px
        11px;

    border-radius: 9px;

    color: rgba(255,255,255,.82);

    font-size: 13px;
    font-weight: 700;

    transition:
        background .16s ease,
        color .16s ease,
        box-shadow .16s ease;
}

.nav-item:hover {
    background:
        rgba(255,255,255,.09);

    color: #fff;

    transform: none;
}

.nav-item.active {
    background:
        rgba(255,255,255,.13);

    color: #fff;

    box-shadow:
        inset 3px 0 0
        rgba(255,255,255,.96);
}


/* ---------------------------------------------------------
   ICON SYSTEM
   --------------------------------------------------------- */

.nav-icon {
    width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color:
        rgba(255,255,255,.82);

    font-size: 0;
    line-height: 1;
}

.nav-icon svg {
    width: 19px;
    height: 19px;

    display: block;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    vector-effect:
        non-scaling-stroke;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    color: #fff;
}


/* ---------------------------------------------------------
   GRUP TIQUETS
   --------------------------------------------------------- */

.nav-ticket-toggle {
    width: 100%;
}

.nav-ticket-chevron {
    width: 18px;
    height: 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color:
        rgba(255,255,255,.64);

    transition:
        transform .18s ease,
        color .18s ease;
}

.nav-ticket-chevron svg {
    width: 15px;
    height: 15px;

    fill: none;
    stroke: currentColor;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-group-tickets.is-open
.nav-ticket-chevron {
    transform: rotate(90deg);
}

.nav-ticket-toggle:hover
.nav-ticket-chevron,
.nav-ticket-toggle.active
.nav-ticket-chevron {
    color: #fff;
}


/* ---------------------------------------------------------
   SUBMENU
   --------------------------------------------------------- */

.nav-subitems {
    margin:
        2px
        0
        8px
        35px;

    padding:
        2px
        0
        2px
        10px;

    border-left:
        1px solid
        rgba(255,255,255,.15);
}

.nav-group-tickets
.nav-subitems a {
    display: block;

    padding:
        7px
        10px;

    border-radius: 7px;

    color:
        rgba(255,255,255,.67);

    font-size: 11px;
    font-weight: 650;

    text-decoration: none;

    transition:
        color .14s ease,
        background .14s ease;
}

.nav-group-tickets
.nav-subitems a:hover {
    color: #fff;

    background:
        rgba(255,255,255,.07);
}

.nav-group-tickets
.nav-subitems a.active {
    color: #fff;

    background:
        rgba(255,255,255,.10);

    font-weight: 800;
}


/* ---------------------------------------------------------
   SECCIONS
   --------------------------------------------------------- */

.nav-section {
    padding:
        19px
        11px
        7px;

    color:
        rgba(255,255,255,.48);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: .13em;
}


/* ---------------------------------------------------------
   DISABLED
   --------------------------------------------------------- */

.nav-disabled {
    opacity: .48;
}

.nav-disabled:hover {
    background: transparent;
    color:
        rgba(255,255,255,.82);
}

.nav-disabled small {
    color:
        rgba(255,255,255,.54);
}


/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.sidebar-footer {
    padding-top: 14px;

    border-top:
        1px solid
        rgba(255,255,255,.14);
}

.sidebar-user {
    min-height: 44px;

    padding:
        3px
        4px;
}

.sidebar-user .avatar {
    width: 35px;
    height: 35px;

    flex: 0 0 35px;

    background:
        rgba(255,255,255,.96);

    color: #15509F;

    box-shadow:
        0 2px 8px
        rgba(7, 32, 70, .12);
}

.sidebar-user-copy strong {
    color: #fff;

    font-size: 12px;
}

.sidebar-user-copy small {
    color:
        rgba(255,255,255,.62);
}


/* Canvi d'espai */

.sidebar-portal-switch {
    min-height: 40px;

    border:
        1px solid
        rgba(255,255,255,.18);

    background:
        rgba(255,255,255,.07);

    color: #fff;
}

.sidebar-portal-switch:hover {
    background:
        rgba(255,255,255,.12);

    border-color:
        rgba(255,255,255,.28);
}


/* Logout */

.sidebar-logout {
    min-height: 40px;

    border:
        1px solid
        rgba(255,255,255,.16);

    background: transparent;

    color:
        rgba(255,255,255,.84);
}

.sidebar-logout:hover {
    background:
        rgba(185,28,28,.20);

    border-color:
        rgba(255,255,255,.24);

    color: #fff;
}


/* ---------------------------------------------------------
   COLLAPSED
   --------------------------------------------------------- */

@media (min-width: 901px) {

    .app-shell.sidebar-collapsed
    .sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-shell.sidebar-collapsed
    .sidebar-brand-agora {
        min-height: 70px;

        justify-content: center;

        padding:
            6px
            0
            16px;
    }

    .app-shell.sidebar-collapsed
    .brand-agora-full {
        display: none;
    }

    .app-shell.sidebar-collapsed
    .brand-agora-mark {
        display: block;

        width: 46px;
        height: 46px;
    }

    .app-shell.sidebar-collapsed
    .nav-item {
        min-height: 44px;

        grid-template-columns: 1fr;

        justify-items: center;

        padding:
            8px
            6px;
    }

    .app-shell.sidebar-collapsed
    .nav-icon {
        width: 24px;
        height: 24px;
    }

    .app-shell.sidebar-collapsed
    .nav-icon svg {
        width: 20px;
        height: 20px;
    }

}


/* ---------------------------------------------------------
   RESPONSIVE COMPACTE
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .sidebar-brand-agora {
        min-height: 66px;

        justify-content: center;

        padding:
            6px
            0
            14px;
    }

    .sidebar-brand-agora
    .brand-agora-full {
        display: none;
    }

    .sidebar-brand-agora
    .brand-agora-mark {
        display: block;

        width: 44px;
        height: 44px;
    }

    .nav-item {
        min-height: 44px;

        grid-template-columns: 1fr;

        justify-items: center;

        padding:
            8px
            5px;
    }

    .nav-icon {
        width: 24px;
        height: 24px;
    }

    .nav-icon svg {
        width: 20px;
        height: 20px;
    }

}


/* Pantalles baixes: reduïm espai però no deformem marca */

@media
    (max-height: 760px)
    and (min-width: 901px) {

    .sidebar-brand-agora {
        min-height: 68px;

        padding-bottom: 13px;
    }

    .sidebar-brand-agora
    .brand-agora-full {
        height: 58px;
    }

}


/* =========================================================
   B2C24-E12.2-R1
   CORRECCIO VISUAL FINA DEL SIDEBAR
   Logo original desplegat + scrollbar discret
   ========================================================= */


/* ---------------------------------------------------------
   LOGO DESPLEGAT
   --------------------------------------------------------- */

/*
 * Fem servir agora-logo.svg sense cap suport decoratiu.
 * El símbol compacte continua sent agora-mark.svg.
 */

.sidebar-brand-agora {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.sidebar-brand-agora
.brand-agora-full {
    display: block;

    width: 100%;
    max-width: 202px;
    height: 64px;

    padding: 0;
    margin: 0;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    object-fit: contain;
    object-position: left center;
}


/*
 * IMPORTANT:
 * el suport blanc només existeix en mode compacte.
 */

.sidebar-brand-agora
.brand-agora-mark {
    display: none;
}


/* ---------------------------------------------------------
   SCROLLBAR NAVEGACIO
   --------------------------------------------------------- */

/*
 * Firefox
 */

.sidebar-nav {
    scrollbar-width: thin;

    scrollbar-color:
        rgba(255,255,255,.16)
        transparent;
}


/*
 * Chrome / Edge / Safari
 */

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background:
        rgba(255,255,255,.14);

    border-radius: 999px;
}

.sidebar-nav:hover::-webkit-scrollbar-thumb {
    background:
        rgba(255,255,255,.26);
}


/*
 * Evitem que el scrollbar quedi enganxat visualment
 * al contingut.
 */

.sidebar-nav {
    padding-right: 2px;
}


/* ---------------------------------------------------------
   MODE PLEGAT
   --------------------------------------------------------- */

@media (min-width: 901px) {

    .app-shell.sidebar-collapsed
    .brand-agora-full {
        display: none;
    }

    .app-shell.sidebar-collapsed
    .brand-agora-mark {
        display: block;

        width: 46px;
        height: 46px;

        padding: 4px;

        background:
            rgba(255,255,255,.96);

        border-radius: 13px;

        box-shadow:
            0 3px 10px
            rgba(6,30,67,.14);
    }

}


/* ---------------------------------------------------------
   RESPONSIVE COMPACTE
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .sidebar-brand-agora
    .brand-agora-full {
        display: none;
    }

    .sidebar-brand-agora
    .brand-agora-mark {
        display: block;

        width: 44px;
        height: 44px;

        padding: 4px;

        background:
            rgba(255,255,255,.96);

        border-radius: 12px;

        box-shadow:
            0 3px 10px
            rgba(6,30,67,.14);
    }

}


/* ---------------------------------------------------------
   PANTALLES BAIXES
   --------------------------------------------------------- */

@media
    (max-height: 760px)
    and (min-width: 901px) {

    .sidebar-brand-agora
    .brand-agora-full {
        height: 58px;
    }

}


/* =========================================================
   B2C24-E12.2-R1.2
   TARGETA CORPORATIVA LOGO + BLAU DEFINITIU SIDEBAR
   ========================================================= */


/* ---------------------------------------------------------
   SIDEBAR · PALETA FINAL
   --------------------------------------------------------- */

.sidebar {
    background:
        linear-gradient(
            180deg,
            #0F4C97 0%,
            #103F78 100%
        );

    color: #fff;
}


/* ---------------------------------------------------------
   BRAND DESPLEGAT
   --------------------------------------------------------- */

.sidebar-brand-agora {
    min-height: 92px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        8px
        6px
        18px;

    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}


/*
 * Targeta corporativa clara.
 * El logo original no es modifica.
 */

.sidebar-brand-agora
.brand-agora-full {
    display: block;

    width: 100%;
    max-width: 204px;
    height: 68px;

    box-sizing: border-box;

    padding:
        9px
        12px;

    margin: 0;

    object-fit: contain;
    object-position: left center;

    background: #fff !important;

    border:
        1px solid
        rgba(255,255,255,.32) !important;

    border-radius: 16px !important;

    box-shadow:
        0 5px 18px
        rgba(5, 25, 55, .14) !important;
}


/*
 * El mark només existeix visualment
 * en mode compacte.
 */

.sidebar-brand-agora
.brand-agora-mark {
    display: none;
}


/* ---------------------------------------------------------
   MENU · CONTRAST FINAL
   --------------------------------------------------------- */

.nav-item {
    color:
        rgba(255,255,255,.86);
}

.nav-icon {
    color:
        rgba(255,255,255,.86);
}

.nav-item:hover {
    color: #fff;

    background:
        rgba(255,255,255,.09);
}

.nav-item.active {
    color: #fff;

    background:
        rgba(255,255,255,.14);

    box-shadow:
        inset 3px 0 0
        #fff;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    color: #fff;
}


/* ---------------------------------------------------------
   SECCIONS I SUBMENU
   --------------------------------------------------------- */

.nav-section {
    color:
        rgba(255,255,255,.54);
}

.nav-group-tickets
.nav-subitems a {
    color:
        rgba(255,255,255,.70);
}

.nav-group-tickets
.nav-subitems a:hover {
    color: #fff;

    background:
        rgba(255,255,255,.07);
}

.nav-group-tickets
.nav-subitems a.active {
    color: #fff;

    background:
        rgba(255,255,255,.10);
}


/* ---------------------------------------------------------
   DISABLED
   --------------------------------------------------------- */

.nav-disabled {
    opacity: .48;
}

.nav-disabled small {
    color:
        rgba(255,255,255,.54);
}


/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.sidebar-footer {
    border-top-color:
        rgba(255,255,255,.14);
}

.sidebar-user-copy strong {
    color: #fff;
}

.sidebar-user-copy small {
    color:
        rgba(255,255,255,.60);
}

.sidebar-user .avatar {
    background:
        rgba(255,255,255,.97);

    color: #0F4C97;
}


/* ---------------------------------------------------------
   SCROLLBAR · MES DISCRET
   --------------------------------------------------------- */

.sidebar-nav {
    scrollbar-width: thin;

    scrollbar-color:
        rgba(255,255,255,.10)
        transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background:
        rgba(255,255,255,.10);

    border-radius: 999px;
}

.sidebar-nav:hover::-webkit-scrollbar-thumb {
    background:
        rgba(255,255,255,.22);
}


/* ---------------------------------------------------------
   MODE PLEGAT
   --------------------------------------------------------- */

@media (min-width: 901px) {

    .app-shell.sidebar-collapsed
    .sidebar-brand-agora {
        min-height: 72px;

        justify-content: center;

        padding:
            7px
            0
            16px;
    }

    .app-shell.sidebar-collapsed
    .brand-agora-full {
        display: none;
    }

    .app-shell.sidebar-collapsed
    .brand-agora-mark {
        display: block;

        width: 46px;
        height: 46px;

        padding: 4px;

        background:
            rgba(255,255,255,.97);

        border-radius: 13px;

        box-shadow:
            0 4px 14px
            rgba(5,25,55,.15);
    }

}


/* ---------------------------------------------------------
   RESPONSIVE COMPACTE
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .sidebar-brand-agora {
        min-height: 70px;

        justify-content: center;

        padding:
            6px
            0
            14px;
    }

    .sidebar-brand-agora
    .brand-agora-full {
        display: none;
    }

    .sidebar-brand-agora
    .brand-agora-mark {
        display: block;

        width: 44px;
        height: 44px;

        padding: 4px;

        background:
            rgba(255,255,255,.97);

        border-radius: 12px;

        box-shadow:
            0 4px 14px
            rgba(5,25,55,.15);
    }

}


/* ---------------------------------------------------------
   PANTALLES BAIXES
   --------------------------------------------------------- */

@media
    (max-height: 760px)
    and (min-width: 901px) {

    .sidebar-brand-agora {
        min-height: 82px;

        padding-bottom: 12px;
    }

    .sidebar-brand-agora
    .brand-agora-full {
        height: 62px;

        padding:
            7px
            11px;
    }

}


/* =========================================================
   B2C24-E12.2-R1.3
   SCROLLBAR ULTRA DISCRET SIDEBAR
   ========================================================= */

.sidebar-nav {
    scrollbar-width: thin;

    scrollbar-color:
        rgba(255,255,255,.05)
        transparent;
}


/* Chrome / Edge / Safari */

.sidebar-nav::-webkit-scrollbar {
    width: 2px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background:
        rgba(255,255,255,.04);

    border-radius: 999px;

    transition:
        background .18s ease;
}


/* Quan interactuem amb la sidebar */

.sidebar:hover
.sidebar-nav::-webkit-scrollbar-thumb {
    background:
        rgba(255,255,255,.16);
}


/* Hover directe sobre el thumb */

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background:
        rgba(255,255,255,.24);
}


/*
 * Evitem que la barra visual quedi massa separada
 * del lateral dret.
 */

.sidebar-nav {
    padding-right: 1px;
}


/* =========================================================
   B2C24-E13.2B
   LES MEVES TASQUES — READ ONLY
   ========================================================= */

.my-tasks-header {
    margin-bottom: 20px;
}

.my-tasks-header h1 {
    margin-bottom: 5px;
}

.my-tasks-header p {
    margin: 0;
    color: var(--text-muted, #64748b);
}


.my-tasks-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}


.my-task-stat {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 17px 18px;

    background: #fff;
    border: 1px solid rgba(15, 76, 151, .10);
    border-radius: 14px;

    color: inherit;
    text-decoration: none;

    box-shadow:
        0 3px 14px
        rgba(15, 23, 42, .04);

    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}


.my-task-stat:hover {
    transform: translateY(-1px);

    border-color:
        rgba(15, 76, 151, .24);

    box-shadow:
        0 7px 20px
        rgba(15, 23, 42, .07);
}


.my-task-stat.active {
    border-color:
        rgba(15, 76, 151, .35);

    box-shadow:
        inset 3px 0 0 #0F4C97,
        0 5px 18px rgba(15, 23, 42, .06);
}


.my-task-stat > span {
    font-size: .84rem;
    font-weight: 700;
    color: #475569;
}


.my-task-stat strong {
    font-size: 1.8rem;
    line-height: 1.05;
    color: #0f172a;
}


.my-task-stat small {
    color: #64748b;
}


.my-tasks-card {
    overflow: hidden;
}


.my-tasks-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 19px 20px;

    border-bottom:
        1px solid rgba(15, 23, 42, .08);
}


.my-tasks-toolbar h2 {
    margin: 0 0 3px;
    font-size: 1.08rem;
}


.my-tasks-toolbar p {
    margin: 0;
    color: #64748b;
    font-size: .86rem;
}


.my-tasks-filters {
    display: inline-flex;
    gap: 4px;

    padding: 4px;

    background: #f1f5f9;
    border-radius: 10px;
}


.my-tasks-filters a {
    padding: 7px 11px;

    border-radius: 8px;

    color: #475569;
    font-size: .84rem;
    font-weight: 650;
    text-decoration: none;
}


.my-tasks-filters a:hover {
    color: #0f172a;
}


.my-tasks-filters a.active {
    background: #fff;
    color: #0F4C97;

    box-shadow:
        0 1px 4px
        rgba(15, 23, 42, .10);
}


.my-tasks-list {
    display: flex;
    flex-direction: column;
}


.my-task-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;

    padding: 18px 20px;

    border-bottom:
        1px solid rgba(15, 23, 42, .07);
}


.my-task-row:last-child {
    border-bottom: 0;
}


.my-task-row:hover {
    background:
        rgba(15, 76, 151, .018);
}


.my-task-row.is-completed {
    background:
        rgba(22, 163, 74, .018);
}


.my-task-state {
    display: flex;
    justify-content: center;

    padding-top: 2px;
}


.my-task-state svg {
    width: 23px;
    height: 23px;

    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.my-task-row.is-completed
.my-task-state svg {
    stroke: #15803d;
}


.my-task-main {
    min-width: 0;
}


.my-task-topline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 7px;
}


.my-task-status,
.my-task-department,
.my-task-ticket-number {
    display: inline-flex;
    align-items: center;

    min-height: 24px;

    padding: 3px 8px;

    border-radius: 999px;

    font-size: .75rem;
    font-weight: 700;
}


.my-task-status.pending {
    background: #fff7ed;
    color: #9a3412;
}


.my-task-status.completed {
    background: #f0fdf4;
    color: #166534;
}


.my-task-department {
    position: relative;

    padding-left: 16px;

    background: #f8fafc;
    color: #475569;
}


.my-task-department::before {
    content: "";

    position: absolute;

    left: 7px;
    top: 50%;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background:
        var(
            --task-department-color,
            #0F4C97
        );

    transform: translateY(-50%);
}


.my-task-ticket-number {
    background: #eff6ff;
    color: #1d4ed8;
}


.my-task-main h3 {
    margin: 0 0 5px;

    font-size: 1rem;
    line-height: 1.35;

    color: #0f172a;
}


.my-task-ticket-subject {
    display: inline-block;

    max-width: 100%;

    color: #0F4C97;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}


.my-task-ticket-subject:hover {
    text-decoration: underline;
}


.my-task-note {
    margin: 10px 0 0;

    padding: 9px 11px;

    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 0 7px 7px 0;

    color: #475569;
    font-size: .86rem;
    line-height: 1.45;
}


.my-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;

    margin-top: 10px;

    color: #64748b;
    font-size: .76rem;
}


.my-task-actions {
    display: flex;
    align-items: center;
}


.my-task-actions .button {
    white-space: nowrap;
}


.my-tasks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 52px 20px;

    text-align: center;
}


.my-tasks-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    margin-bottom: 14px;

    background: #eff6ff;
    border-radius: 15px;
}


.my-tasks-empty-icon svg {
    width: 27px;
    height: 27px;

    fill: none;
    stroke: #0F4C97;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.my-tasks-empty h3 {
    margin: 0 0 5px;
    font-size: 1rem;
}


.my-tasks-empty p {
    max-width: 430px;
    margin: 0;

    color: #64748b;
    font-size: .88rem;
}


@media (max-width: 760px) {

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


    .my-tasks-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }


    .my-tasks-filters {
        width: 100%;
    }


    .my-tasks-filters a {
        flex: 1;
        text-align: center;
    }


    .my-task-row {
        grid-template-columns: 28px minmax(0, 1fr);
    }


    .my-task-actions {
        grid-column: 2;

        justify-content: flex-start;

        margin-top: 4px;
    }

}


/* =========================================================
   B2C24-E13.2C
   BADGE + TASK CARDS COMPACTES
   ========================================================= */


/* ---------------------------------------------------------
   Badge sidebar
   --------------------------------------------------------- */

.nav-item-tasks {
    position: relative;
}

.nav-item-tasks .nav-item-label {
    min-width: 0;
    flex: 1;
}

.nav-task-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 22px;
    height: 22px;

    padding: 0 6px;

    margin-left: auto;

    border-radius: 999px;

    background:
        rgba(255,255,255,.16);

    border:
        1px solid rgba(255,255,255,.18);

    color: #fff;

    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
}

.nav-item-tasks.active
.nav-task-count {
    background: #fff;
    color: #0F4C97;
}


/* Sidebar plegada */

.sidebar.is-collapsed
.nav-item-tasks
.nav-task-count {
    position: absolute;

    top: 5px;
    right: 5px;

    min-width: 16px;
    height: 16px;

    padding: 0 4px;

    font-size: .60rem;

    border-width: 0;
}


/* ---------------------------------------------------------
   Resum superior una mica mes compacte
   --------------------------------------------------------- */

.my-tasks-summary {
    gap: 12px;
    margin-bottom: 18px;
}

.my-task-stat {
    padding: 14px 16px;
}

.my-task-stat strong {
    font-size: 1.55rem;
}


/* ---------------------------------------------------------
   Toolbar
   --------------------------------------------------------- */

.my-tasks-toolbar {
    padding: 15px 18px;
}


/* ---------------------------------------------------------
   Grid professional de targetes
   --------------------------------------------------------- */

.my-tasks-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;

    padding: 16px;

    background:
        rgba(241,245,249,.46);
}


.my-task-row {
    position: relative;

    display: grid;

    grid-template-columns:
        25px minmax(0, 1fr);

    gap: 10px;

    min-width: 0;

    padding: 15px;

    background: #fff;

    border:
        1px solid rgba(15,23,42,.08);

    border-radius: 13px;

    box-shadow:
        0 2px 8px rgba(15,23,42,.025);

    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}


.my-task-row:last-child {
    border-bottom:
        1px solid rgba(15,23,42,.08);
}


.my-task-row:hover {
    background: #fff;

    transform:
        translateY(-1px);

    border-color:
        rgba(15,76,151,.20);

    box-shadow:
        0 5px 15px
        rgba(15,23,42,.055);
}


.my-task-row.is-completed {
    background: #fff;

    border-color:
        rgba(22,163,74,.15);
}


/* Estat lateral */

.my-task-state {
    padding-top: 1px;
}

.my-task-state svg {
    width: 20px;
    height: 20px;
}


/* Contingut */

.my-task-main {
    min-width: 0;
}


.my-task-topline {
    gap: 5px;

    margin-bottom: 7px;
}


.my-task-status,
.my-task-department,
.my-task-ticket-number {
    min-height: 21px;

    padding: 2px 7px;

    font-size: .70rem;
}


.my-task-main h3 {
    margin: 0 0 3px;

    font-size: .96rem;
    line-height: 1.3;
}


.my-task-ticket-subject {
    display: block;

    overflow: hidden;

    margin-bottom: 7px;

    color: #0F4C97;

    font-size: .84rem;

    line-height: 1.35;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Nota molt mes discreta */

.my-task-note {
    display: -webkit-box;

    overflow: hidden;

    margin: 7px 0 0;

    padding: 7px 9px;

    border-left-width: 2px;

    font-size: .79rem;
    line-height: 1.35;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* Footer de la targeta */

.my-task-meta {
    margin-top: 9px;

    padding-top: 8px;

    border-top:
        1px solid rgba(15,23,42,.06);

    font-size: .70rem;
}


/* El boto deixa de crear una columna enorme */

.my-task-actions {
    grid-column: 2;

    display: flex;

    justify-content: flex-end;

    margin-top: 8px;
}


.my-task-actions .button {
    min-height: 32px;

    padding: 6px 11px;

    font-size: .76rem;
}


/* Completed: una mica mes discret */

.my-task-row.is-completed
.my-task-main h3 {
    color: #334155;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1180px) {

    .my-tasks-list {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 760px) {

    .my-tasks-list {
        padding: 10px;
    }


    .my-task-row {
        grid-template-columns:
            24px minmax(0, 1fr);

        padding: 13px;
    }


    .my-task-actions {
        grid-column: 2;
    }

}


/* =========================================================
   B2C24-E13.2C-R1
   JERARQUIA VISUAL PROFESSIONAL DE TASK CARDS
   ========================================================= */


/*
 * Eliminem qualsevol reserva de columna
 * de l'antic cercle d'estat.
 */

.my-task-row {
    display: flex;
    flex-direction: column;

    gap: 0;

    padding: 17px 18px;
}


/* ---------------------------------------------------------
   Capçalera de metadades
   --------------------------------------------------------- */

.my-task-topline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin: 0 0 14px;
}


.my-task-status,
.my-task-ticket-number {
    min-height: 24px;

    padding: 3px 8px;

    border-radius: 999px;

    font-size: .72rem;
    font-weight: 750;
}


/*
 * Estat textual suficient:
 * eliminem qualsevol ambiguïtat de selector.
 */

.my-task-status.pending {
    background: #fff7ed;
    color: #9a3412;

    border:
        1px solid rgba(154,52,18,.10);
}


.my-task-status.completed {
    background: #f0fdf4;
    color: #166534;

    border:
        1px solid rgba(22,101,52,.10);
}


/* ---------------------------------------------------------
   Departament
   --------------------------------------------------------- */

.my-task-department {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 5px;

    min-height: 24px;

    padding:
        3px 9px
        3px 20px;

    background: #f8fafc;

    border:
        1px solid #dbe4ee;

    border-radius: 999px;

    color: #334155;

    font-size: .71rem;
    font-weight: 650;
}


/*
 * El color del departament és identificador,
 * no el responsable del contrast del text.
 */

.my-task-department::before {
    content: "";

    position: absolute;

    left: 8px;
    top: 50%;

    width: 7px;
    height: 7px;

    border-radius: 2px;

    background:
        var(
            --task-department-color,
            #0F4C97
        );

    transform:
        translateY(-50%);
}


.my-task-department-label {
    color: #64748b;

    font-weight: 600;
}


.my-task-department-label::after {
    content: "·";

    margin-left: 5px;

    color: #94a3b8;
}


.my-task-department-name {
    color: #27364a;

    font-weight: 800;
}


.my-task-ticket-number {
    background: #eff6ff;

    border:
        1px solid rgba(29,78,216,.08);

    color: #1d4ed8;
}


/* ---------------------------------------------------------
   Jerarquia Tasca / Tiquet / Descripció
   --------------------------------------------------------- */

.my-task-section {
    margin-bottom: 12px;
}


.my-task-section-primary {
    margin-bottom: 13px;
}


.my-task-eyebrow {
    display: block;

    margin-bottom: 3px;

    color: #7b8ba0;

    font-size: .65rem;
    font-weight: 800;

    letter-spacing: .055em;

    line-height: 1.2;

    text-transform: uppercase;
}


.my-task-title {
    margin: 0;

    color: #0f172a;

    font-size: 1.04rem;
    font-weight: 750;

    line-height: 1.32;
}


.my-task-ticket-subject {
    display: inline-block;

    overflow: visible;

    margin: 0;

    color: #0F4C97;

    font-size: .88rem;
    font-weight: 650;

    line-height: 1.35;

    text-overflow: initial;
    white-space: normal;

    text-decoration: none;
}


.my-task-ticket-subject:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Descripció
   --------------------------------------------------------- */

.my-task-description {
    margin-top: 1px;

    margin-bottom: 13px;

    padding: 10px 11px;

    background:
        #f8fafc;

    border:
        1px solid rgba(148,163,184,.16);

    border-left:
        3px solid #cbd5e1;

    border-radius:
        0 8px 8px 0;
}


.my-task-description
.my-task-eyebrow {
    margin-bottom: 5px;
}


.my-task-description p {
    margin: 0;

    color: #475569;

    font-size: .82rem;

    line-height: 1.45;
}


/*
 * No tallem la descripció artificialment
 * a dues línies.
 */

.my-task-description p {
    display: block;

    overflow: visible;

    -webkit-line-clamp: initial;
}


/* ---------------------------------------------------------
   Peu de targeta
   --------------------------------------------------------- */

.my-task-footer {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 12px;

    margin-top: auto;

    padding-top: 11px;

    border-top:
        1px solid rgba(15,23,42,.065);
}


.my-task-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 5px 13px;

    margin: 0;
    padding: 0;

    border: 0;

    color: #64748b;

    font-size: .72rem;
}


.my-task-actions {
    display: flex;

    flex: 0 0 auto;

    justify-content: flex-end;

    margin: 0;
}


.my-task-actions .button {
    min-height: 33px;

    padding: 6px 12px;

    font-size: .76rem;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 760px) {

    .my-task-row {
        padding: 15px;
    }


    .my-task-footer {
        align-items: flex-start;
        flex-direction: column;
    }


    .my-task-actions {
        width: 100%;

        justify-content: flex-start;
    }

}



/* ==========================================================
   B2C24-E13.3D-2
   Tasques departamentals — 4 estats + editor professional
   ========================================================== */


/* ----------------------------------------------------------
   Badge compartit d'estat
   ---------------------------------------------------------- */

.task-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-height: 24px;

    padding: 3px 9px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: .68rem;
    font-weight: 800;
    line-height: 1.1;

    white-space: nowrap;
}


.task-status-badge.is-pending {
    background: #f8fafc;
    border-color: #d9e2ec;
    color: #475569;
}


.task-status-badge.is-in_progress {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}


.task-status-badge.is-blocked {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}


.task-status-badge.is-completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}



/* ----------------------------------------------------------
   Targetes dins del ticket principal
   ---------------------------------------------------------- */

.ticket-multi-task {
    position: relative;
}


.ticket-multi-task.is-status-in_progress {
    border-left:
        3px solid #3b82f6;
}


.ticket-multi-task.is-status-blocked {
    border-left:
        3px solid #f97316;
}


.ticket-multi-task.is-status-completed {
    border-left:
        3px solid #22a06b;
}


.ticket-multi-task-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    width: 100%;
}


.ticket-multi-task-title-row > strong {
    min-width: 0;
}



/* ----------------------------------------------------------
   Editor de tasca dins ticket
   ---------------------------------------------------------- */

.ticket-multi-task-edit form {
    padding-top: 10px;
}


.task-edit-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 12px;

    margin-bottom: 14px;
}


.task-edit-field {
    display: flex;
    flex-direction: column;

    gap: 6px;

    min-width: 0;
}


.task-edit-field-full {
    grid-column: 1 / -1;
}


.task-edit-field > span,
.task-status-field > span {
    display: block;

    color: #64748b;

    font-size: .68rem;
    font-weight: 800;

    letter-spacing: .045em;

    text-transform: uppercase;
}


.task-edit-layout input,
.task-edit-layout select,
.task-edit-layout textarea {
    width: 100%;

    min-height: 40px;

    padding: 9px 11px;

    border: 1px solid #ccd8e5;
    border-radius: 9px;

    background: #fff;

    color: #172033;

    font: inherit;
}


.task-edit-layout textarea {
    min-height: 78px;
    resize: vertical;
}


.task-edit-layout input:focus,
.task-edit-layout select:focus,
.task-edit-layout textarea:focus {
    outline: none;

    border-color: #6ea0d8;

    box-shadow:
        0 0 0 3px rgba(15,76,151,.08);
}



/* ----------------------------------------------------------
   Gestió departamental
   ---------------------------------------------------------- */

.ticket-task-item.is-status-in_progress {
    border-left:
        3px solid #3b82f6;
}


.ticket-task-item.is-status-blocked {
    border-left:
        3px solid #f97316;
}


.ticket-task-item.is-status-completed {
    border-left:
        3px solid #22a06b;
}


.ticket-task-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    width: 100%;
}


.ticket-task-title-row > strong {
    min-width: 0;
}


.ticket-task-edit-grid {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
}


.ticket-task-edit-grid
.task-edit-field-full {
    grid-column: 1 / -1;
}


.ticket-task-edit-grid
.task-status-field {
    grid-column: auto;
}


.ticket-task-edit-form
.task-edit-description {
    display: flex;
    flex-direction: column;

    gap: 6px;

    margin-top: 12px;
}


.ticket-task-edit-form
.task-edit-description > span {
    color: #64748b;

    font-size: .68rem;
    font-weight: 800;

    letter-spacing: .045em;

    text-transform: uppercase;
}



/* ----------------------------------------------------------
   Les meves tasques
   ---------------------------------------------------------- */

.my-task-status.in_progress {
    background: #eff6ff;

    border:
        1px solid #bfdbfe;

    color: #1d4ed8;
}


.my-task-status.blocked {
    background: #fff7ed;

    border:
        1px solid #fed7aa;

    color: #c2410c;
}


.my-task-status.pending {
    background: #f8fafc;

    border:
        1px solid #d9e2ec;

    color: #475569;
}


.my-task-status.completed {
    background: #f0fdf4;

    border:
        1px solid #bbf7d0;

    color: #166534;
}


.my-task-row.is-status-in_progress {
    border-left:
        3px solid #3b82f6;
}


.my-task-row.is-status-blocked {
    border-left:
        3px solid #f97316;
}


.my-task-row.is-status-completed {
    border-left:
        3px solid #22a06b;
}



/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 760px) {

    .task-edit-layout,
    .ticket-task-edit-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }


    .task-edit-field-full,
    .ticket-task-edit-grid
    .task-edit-field-full {
        grid-column: auto;
    }


    .ticket-multi-task-title-row,
    .ticket-task-title-row {
        align-items: flex-start;
    }

}



/* ==========================================================
   B2C24-E13.3D-3
   Ajust visual fi de targetes i editor de tasques
   ========================================================== */


/* ----------------------------------------------------------
   Targetes
   ---------------------------------------------------------- */

.ticket-multi-task,
.ticket-task-item {
    border-radius: 11px;
}


.ticket-multi-task-copy,
.ticket-task-main {
    min-width: 0;
}


.ticket-multi-task-copy > small,
.ticket-task-agent {
    margin-top: 2px;
}


.ticket-multi-task-copy > p,
.ticket-task-note {
    margin-top: 4px;
    margin-bottom: 0;
}


.ticket-multi-task-title-row,
.ticket-task-title-row {
    min-height: 26px;
}


.task-status-badge {
    min-height: 22px;

    padding:
        2px 9px;

    font-size: .66rem;
}



/* ----------------------------------------------------------
   Editor dins ticket principal
   ---------------------------------------------------------- */

.ticket-multi-task-edit[open] {
    margin-top: 8px;
}


.ticket-multi-task-edit > summary {
    margin-bottom: 4px;
}


.ticket-multi-task-edit form {
    margin-top: 6px;

    padding:
        14px;

    background: #fbfcfe;

    border:
        1px solid #dfe7ef;

    border-radius: 10px;
}


.task-edit-layout {
    gap:
        10px
        12px;

    margin-bottom: 10px;
}


.task-edit-field {
    gap: 4px;
}


.task-edit-field > span,
.task-status-field > span {
    font-size: .64rem;

    letter-spacing: .055em;
}


.task-edit-layout input,
.task-edit-layout select {
    min-height: 38px;

    padding:
        8px 10px;

    border-radius: 8px;
}


.task-edit-layout textarea {
    min-height: 68px;

    padding:
        9px 10px;

    border-radius: 8px;
}


.ticket-multi-task-edit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 4px;
}


.ticket-multi-task-edit-actions
.button {
    min-height: 36px;
}



/* ----------------------------------------------------------
   Editor gestió departamental
   ---------------------------------------------------------- */

.ticket-task-edit[open] {
    margin-top: 8px;

    padding-top: 0;
}


.ticket-task-edit-form {
    gap: 0;

    margin-top: 8px;

    padding:
        14px;

    background: #fbfcfe;

    border:
        1px solid #dfe7ef;

    border-radius: 10px;
}


.ticket-task-edit-grid {
    gap:
        10px
        12px;
}


.ticket-task-edit-form label {
    gap: 4px;
}


.ticket-task-edit-form label > span {
    font-size: .64rem;

    letter-spacing: .055em;
}


.ticket-task-edit-form input,
.ticket-task-edit-form select {
    min-height: 38px;

    padding:
        8px 10px;

    border-radius: 8px;
}


.ticket-task-edit-form textarea {
    min-height: 68px;

    padding:
        9px 10px;

    border-radius: 8px;
}


.ticket-task-edit-form
.task-edit-description {
    margin-top: 10px;
}


.ticket-task-edit-actions {
    margin-top: 12px;

    padding-top: 10px;

    border-top:
        1px solid #e7edf3;
}


.ticket-task-small-button {
    min-height: 36px;
}



/* ----------------------------------------------------------
   Checkbox / acció ràpida
   ---------------------------------------------------------- */

.ticket-multi-check,
.ticket-task-check {
    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}


.ticket-multi-check:hover,
.ticket-task-check:hover {
    transform:
        translateY(-1px);
}


/* ----------------------------------------------------------
   Estat bloquejada / en curs
   ---------------------------------------------------------- */

.ticket-multi-task.is-status-in_progress,
.ticket-task-item.is-status-in_progress {
    background:
        linear-gradient(
            90deg,
            rgba(59,130,246,.035),
            transparent 28%
        );
}


.ticket-multi-task.is-status-blocked,
.ticket-task-item.is-status-blocked {
    background:
        linear-gradient(
            90deg,
            rgba(249,115,22,.045),
            transparent 28%
        );
}



/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 760px) {

    .ticket-multi-task-edit form,
    .ticket-task-edit-form {
        padding:
            12px;
    }


    .task-edit-layout,
    .ticket-task-edit-grid {
        gap:
            9px;
    }


    .ticket-multi-task-edit-actions,
    .ticket-task-edit-actions {
        align-items: stretch;
    }


    .ticket-multi-task-edit-actions
    .button,
    .ticket-task-edit-actions
    .ticket-task-small-button {
        flex: 1 1 auto;
    }

}



/* ==========================================================
   B2C24-E13.3E-2
   Les meves tasques — navegació completa pels 4 estats
   ========================================================== */


/* 6 KPIs: 3 + 3 en desktop */

.my-tasks-summary.my-tasks-summary-six {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


/* Identitat subtil de cada KPI */

.my-task-stat.is-in-progress {
    border-left:
        3px solid #3b82f6;
}


.my-task-stat.is-blocked {
    border-left:
        3px solid #f97316;
}


.my-task-stat.is-completed {
    border-left:
        3px solid #22a06b;
}


.my-task-stat.is-pending {
    border-left:
        3px solid #94a3b8;
}


/*
 * Obertes és l'agregador funcional:
 * pending + in_progress + blocked.
 */

.my-task-stat.is-open {
    border-left:
        3px solid #0f4c97;
}


/* Evitem que sis filtres quedin comprimits */

.my-tasks-filters {
    flex-wrap: wrap;

    justify-content:
        flex-end;

    row-gap: 6px;
}


.my-tasks-filters a {
    white-space: nowrap;
}


/* Tablet */

@media (max-width: 1100px) {

    .my-tasks-summary.my-tasks-summary-six {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* Mòbil */

@media (max-width: 700px) {

    .my-tasks-summary.my-tasks-summary-six {
        grid-template-columns:
            minmax(0, 1fr);
    }


    .my-tasks-filters {
        justify-content:
            flex-start;
    }

}



/* ==========================================================
   B2C24-E13.3E-3
   KPIs Les meves tasques — accent únic + degradat
   ========================================================== */


/*
 * Evitem la doble línia quan la targeta està activa.
 * L'accent d'estat es dibuixa amb ::before.
 */

.my-task-stat {
    position: relative;

    overflow: hidden;

    --task-stat-accent: #64748b;
    --task-stat-accent-rgb: 100, 116, 139;

    border-left:
        1px solid #dbe4ee !important;

    background:
        linear-gradient(
            90deg,
            rgba(
                var(--task-stat-accent-rgb),
                .055
            ) 0%,
            rgba(
                var(--task-stat-accent-rgb),
                .018
            ) 23%,
            #ffffff 48%
        );
}


.my-task-stat::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 4px;

    background:
        var(--task-stat-accent);

    border-radius:
        12px 0 0 12px;

    pointer-events: none;
}


/* ----------------------------------------------------------
   Color funcional de cada KPI
   ---------------------------------------------------------- */

.my-task-stat.is-open {
    --task-stat-accent: #0f4c97;
    --task-stat-accent-rgb: 15, 76, 151;
}


.my-task-stat.is-pending {
    --task-stat-accent: #94a3b8;
    --task-stat-accent-rgb: 148, 163, 184;
}


.my-task-stat.is-in-progress {
    --task-stat-accent: #3b82f6;
    --task-stat-accent-rgb: 59, 130, 246;
}


.my-task-stat.is-blocked {
    --task-stat-accent: #f97316;
    --task-stat-accent-rgb: 249, 115, 22;
}


.my-task-stat.is-completed {
    --task-stat-accent: #22a06b;
    --task-stat-accent-rgb: 34, 160, 107;
}


.my-task-stat.is-all {
    --task-stat-accent: #64748b;
    --task-stat-accent-rgb: 100, 116, 139;
}


/* ----------------------------------------------------------
   Estat actiu
   ---------------------------------------------------------- */

.my-task-stat.active {
    border-color:
        rgba(
            var(--task-stat-accent-rgb),
            .32
        ) !important;

    border-left-color:
        #dbe4ee !important;

    background:
        linear-gradient(
            90deg,
            rgba(
                var(--task-stat-accent-rgb),
                .105
            ) 0%,
            rgba(
                var(--task-stat-accent-rgb),
                .045
            ) 28%,
            #ffffff 58%
        );

    box-shadow:
        0 0 0 2px
        rgba(
            var(--task-stat-accent-rgb),
            .08
        ),
        0 8px 20px
        rgba(15, 23, 42, .035);
}


/*
 * El marcador esquerre és únic fins i tot
 * quan el KPI està seleccionat.
 */

.my-task-stat.active::before {
    width: 4px;

    background:
        var(--task-stat-accent);
}


/* Hover coherent amb el mateix color */

.my-task-stat:hover {
    border-color:
        rgba(
            var(--task-stat-accent-rgb),
            .24
        );

    transform:
        translateY(-1px);
}


.my-task-stat.active:hover {
    border-color:
        rgba(
            var(--task-stat-accent-rgb),
            .36
        ) !important;
}



/* =========================================================
   B2C24-E14.2B-GLOBAL-R1
   Centre global d'Auditoria
   ========================================================= */

.audit-page {
    padding-bottom: 32px;
}

.audit-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.audit-eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #688099;
}

.audit-title-line {
    display: flex;
    align-items: center;
    gap: 15px;
}

.audit-title-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e5f0;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #edf5fb);
    box-shadow: 0 7px 18px rgba(36, 77, 112, .08);
}

.audit-title-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #1c5b96;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.audit-page-head h1 {
    margin: 0;
    color: #152f45;
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -.025em;
}

.audit-page-head-copy p:not(.audit-eyebrow) {
    margin: 6px 0 0;
    color: #698095;
    font-size: 14px;
}

.audit-head-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 8px 12px;
    border: 1px solid #d7e9de;
    border-radius: 999px;
    background: #f5fbf7;
    color: #31734b;
    font-size: 12px;
    font-weight: 700;
}

.audit-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3aa365;
    box-shadow: 0 0 0 4px rgba(58, 163, 101, .11);
}


.audit-kpi-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.audit-kpi-card {
    position: relative;
    min-height: 122px;
    padding: 17px 18px;
    border: 1px solid #dce6ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(39, 69, 95, .045);
    overflow: hidden;
}

.audit-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #dfe8f0;
}

.audit-kpi-main {
    display: flex;
    align-items: center;
    gap: 15px;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f3f8fc 100%
        );
}

.audit-kpi-main::before {
    background: #2868a7;
}

.audit-kpi-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #e9f2fa;
}

.audit-kpi-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: #1e5f9d;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.audit-kpi-card > strong,
.audit-kpi-main strong {
    display: block;
    margin-top: 7px;
    color: #163147;
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
}

.audit-kpi-card span,
.audit-kpi-main span {
    color: #667f94;
    font-size: 12px;
    font-weight: 700;
}

.audit-kpi-card small,
.audit-kpi-main small {
    display: block;
    margin-top: 7px;
    color: #8a9cab;
    font-size: 11px;
    line-height: 1.3;
}


.audit-workspace {
    margin-bottom: 18px;
    border: 1px solid #dce6ef;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(39, 69, 95, .045);
    overflow: hidden;
}

.audit-category-tabs {
    display: flex;
    gap: 4px;
    padding: 9px 11px 0;
    border-bottom: 1px solid #e6edf3;
    overflow-x: auto;
}

.audit-category-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 13px;
    color: #637a8e;
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px 10px 0 0;
}

.audit-category-tab:hover {
    color: #214d75;
    background: #f5f8fb;
}

.audit-category-tab.is-active {
    color: #174d7d;
    background: #f5f9fc;
}

.audit-category-tab.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #2365a1;
}

.audit-category-tab b {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eaf1f7;
    color: #557088;
    font-size: 10px;
}

.audit-category-tab.is-active b {
    background: #dcebf7;
    color: #1c5a91;
}


.audit-filter-panel {
    padding: 16px 18px 17px;
}

.audit-search-field {
    position: relative;
    margin-bottom: 13px;
}

.audit-search-field input {
    width: 100%;
    height: 43px;
    padding: 0 15px 0 42px;
    border: 1px solid #d5e0e9;
    border-radius: 11px;
    background: #fbfdfe;
    color: #1b3448;
    font-size: 13px;
}

.audit-search-field input:focus,
.audit-filter-field input:focus,
.audit-filter-field select:focus {
    outline: none;
    border-color: #7fa9cc;
    box-shadow: 0 0 0 3px rgba(52, 113, 163, .09);
}

.audit-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    display: inline-flex;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
}

.audit-field-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: #8295a5;
    stroke-width: 2;
    stroke-linecap: round;
}

.audit-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(160px, 1.1fr)
        minmax(150px, .9fr)
        minmax(190px, 1.2fr)
        minmax(135px, .75fr)
        minmax(135px, .75fr);
    gap: 11px;
}

.audit-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.audit-filter-field > span {
    color: #5c7488;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.audit-filter-field select,
.audit-filter-field input {
    width: 100%;
    min-width: 0;
    height: 39px;
    padding: 0 10px;
    border: 1px solid #d6e0e8;
    border-radius: 9px;
    background: #fff;
    color: #243f54;
    font-size: 12px;
}

.audit-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid #edf2f6;
}

.audit-technical-toggle {
    display: grid;
    grid-template-columns: 17px auto;
    column-gap: 8px;
    align-items: center;
    cursor: pointer;
}

.audit-technical-toggle input {
    grid-row: 1 / span 2;
    width: 15px;
    height: 15px;
}

.audit-technical-toggle span {
    color: #40596d;
    font-size: 12px;
    font-weight: 700;
}

.audit-technical-toggle small {
    color: #91a0ad;
    font-size: 10px;
}

.audit-filter-buttons {
    display: flex;
    gap: 9px;
}


.audit-results-card {
    border: 1px solid #dce6ef;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(39, 69, 95, .045);
    overflow: hidden;
}

.audit-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 19px;
    border-bottom: 1px solid #e5ecf2;
}

.audit-results-head h2 {
    margin: 0;
    color: #19364d;
    font-size: 16px;
}

.audit-results-head p {
    margin: 4px 0 0;
    color: #7c91a2;
    font-size: 11px;
}

.audit-technical-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: #fff6e6;
    color: #92611c;
    font-size: 10px;
    font-weight: 800;
}


.audit-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.audit-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.audit-table thead th {
    padding: 10px 13px;
    border-bottom: 1px solid #dfe8ef;
    background: #f7fafc;
    color: #688095;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .055em;
    white-space: nowrap;
}

.audit-table tbody td {
    padding: 12px 13px;
    border-bottom: 1px solid #eef3f6;
    color: #344d60;
    vertical-align: middle;
}

.audit-table tbody tr:last-child td {
    border-bottom: 0;
}

.audit-table tbody tr:hover td {
    background: #fbfdfe;
}

.audit-date-cell {
    white-space: nowrap;
}

.audit-date-cell strong {
    display: block;
    color: #2d475b;
    font-size: 11px;
}

.audit-date-cell span {
    display: block;
    margin-top: 2px;
    color: #90a0ad;
    font-size: 10px;
}

.audit-category-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.audit-category-tickets {
    background: #eaf3fb;
    color: #275f8e;
}

.audit-category-configuration {
    background: #f2edfb;
    color: #6b4d91;
}

.audit-category-access {
    background: #eaf7ef;
    color: #36714d;
}

.audit-category-attachments {
    background: #fff3e3;
    color: #916428;
}

.audit-category-people {
    background: #edf1fb;
    color: #52679a;
}

.audit-category-system {
    background: #eef2f5;
    color: #697a87;
}


.audit-actor {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 150px;
}

.audit-avatar {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf3f8;
    color: #345e80;
    font-size: 11px;
    font-weight: 800;
}

.audit-actor strong {
    display: block;
    color: #29465d;
    font-size: 11px;
}

.audit-actor small {
    display: block;
    margin-top: 2px;
    max-width: 170px;
    color: #8b9aa6;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
}


.audit-action-copy {
    min-width: 185px;
}

.audit-action-copy strong {
    display: block;
    color: #223f56;
    font-size: 11px;
}

.audit-action-copy small {
    display: block;
    margin-top: 3px;
    color: #9aa7b1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
}


.audit-object-link,
.audit-object-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #dce6ee;
    border-radius: 8px;
    background: #fafcfd;
    color: #4c6579;
    font-size: 10px;
    text-decoration: none;
    white-space: nowrap;
}

.audit-object-link {
    transition:
        border-color .15s ease,
        background .15s ease;
}

.audit-object-link:hover {
    border-color: #aac6dc;
    background: #f2f8fc;
}

.audit-object-link strong,
.audit-object-pill strong {
    color: #254d6d;
}

.audit-object-link b {
    margin-left: 2px;
    color: #6d8da7;
    font-size: 14px;
}


.audit-description-cell {
    min-width: 220px;
    max-width: 370px;
    line-height: 1.35;
}

.audit-muted {
    color: #9aa8b2;
    font-style: italic;
}


.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    border-top: 1px solid #e4ebf1;
    background: #fbfcfd;
}

.audit-page-info {
    color: #75899a;
    font-size: 11px;
}

.audit-page-info strong {
    color: #344f64;
}

.audit-pagination-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.audit-page-button,
.audit-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #d8e3eb;
    border-radius: 8px;
    background: #fff;
    color: #49657b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.audit-page-number {
    min-width: 32px;
    padding: 0 7px;
}

.audit-page-button:hover,
.audit-page-number:hover {
    border-color: #a9c5da;
    background: #f5f9fc;
}

.audit-page-number.is-active {
    border-color: #2866a0;
    background: #2866a0;
    color: #fff;
}


.audit-empty {
    display: flex;
    min-height: 240px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8698a6;
    text-align: center;
}

.audit-empty-icon {
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #f0f4f7;
}

.audit-empty-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: #7890a3;
    stroke-width: 1.7;
}

.audit-empty strong {
    color: #435d70;
}

.audit-empty span {
    margin-top: 4px;
    font-size: 11px;
}


@media (max-width: 1280px) {

    .audit-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .audit-filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 820px) {

    .audit-page-head {
        flex-direction: column;
    }

    .audit-head-status {
        margin-top: 0;
    }

    .audit-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .audit-filter-actions,
    .audit-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}


@media (max-width: 560px) {

    .audit-title-line {
        align-items: flex-start;
    }

    .audit-page-head h1 {
        font-size: 25px;
    }

    .audit-kpi-grid,
    .audit-filter-grid {
        grid-template-columns: 1fr;
    }

    .audit-kpi-main {
        grid-column: auto;
    }

    .audit-filter-buttons {
        width: 100%;
    }

    .audit-filter-buttons .button {
        flex: 1;
    }
}


/* =========================================================
   B2C24-E14.2B-GLOBAL-R2
   Poliment final Auditoria
   ========================================================= */

.audit-kpi-card {
    min-height: 108px;
    padding: 15px 17px;
}

.audit-kpi-card > strong,
.audit-kpi-main strong {
    font-size: 26px;
}

.audit-kpi-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.audit-kpi-icon svg {
    width: 21px;
    height: 21px;
}


/*
 * En escriptori no volem scrollbar dins de
 * les pestanyes de categories.
 */
.audit-category-tabs {
    overflow: visible;
    flex-wrap: wrap;
    padding-right: 11px;
}

.audit-category-tab {
    flex: 0 0 auto;
}


/*
 * Evitem scrollbar visual heretada
 * del navegador dins del workspace.
 */
.audit-workspace {
    overflow: visible;
}

.audit-filter-panel {
    border-radius: 0 0 17px 17px;
}


/*
 * En pantalles petites sí permetem
 * desplaçament horitzontal.
 */
@media (max-width: 820px) {

    .audit-category-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .audit-workspace {
        overflow: hidden;
    }
}


/* =========================================================
   B2C24-E14.3B
   Investigació d'events d'auditoria
   ========================================================= */

.audit-event-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

.audit-event-link:hover {
    color: #185b92;
    border-bottom-color: #8bb0cd;
}


.audit-investigation {
    margin-bottom: 18px;
    border: 1px solid #ccdde9;
    border-radius: 17px;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f8fbfd 100%
        );
    box-shadow:
        0 8px 26px rgba(35, 73, 101, .07);
    overflow: hidden;
}

.audit-investigation-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 19px 21px;
    border-bottom: 1px solid #e1eaf0;
}

.audit-investigation-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    color: #7d8f9d;
    font-size: 10px;
    font-weight: 700;
}

.audit-investigation-head h2 {
    margin: 0;
    color: #17364d;
    font-size: 20px;
}

.audit-investigation-head p {
    margin: 6px 0 0;
    color: #708596;
    font-size: 12px;
}

.audit-investigation-close {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e4ec;
    border-radius: 9px;
    background: #fff;
    color: #728696;
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
}

.audit-investigation-close:hover {
    background: #f4f8fb;
    color: #234f70;
}


.audit-investigation-grid {
    display: grid;
    grid-template-columns:
        1fr
        .85fr
        1.35fr;
    gap: 12px;
    padding: 16px 18px;
}

.audit-detail-card {
    padding: 15px 16px;
    border: 1px solid #e0e9ef;
    border-radius: 13px;
    background: #fff;
}

.audit-detail-card h3 {
    margin: 0 0 13px;
    color: #28485f;
    font-size: 12px;
}

.audit-detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.audit-detail-list > div {
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 10px;
    align-items: start;
}

.audit-detail-list dt {
    color: #8294a2;
    font-size: 10px;
    font-weight: 700;
}

.audit-detail-list dd {
    margin: 0;
    color: #314c60;
    font-size: 11px;
    min-width: 0;
}

.audit-detail-list dd strong {
    display: block;
    color: #203e55;
}

.audit-detail-list dd small {
    display: block;
    margin-top: 2px;
    color: #8799a6;
}

.audit-detail-list code {
    padding: 3px 6px;
    border-radius: 5px;
    background: #f1f5f8;
    color: #536b7c;
    font-size: 9px;
}

.audit-user-agent {
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.audit-detail-ticket-link {
    color: #1d6198;
    font-weight: 700;
    text-decoration: none;
}

.audit-detail-ticket-link:hover {
    text-decoration: underline;
}


.audit-investigation-related {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 18px 18px;
}

.audit-related-panel {
    border: 1px solid #e0e8ee;
    border-radius: 13px;
    background: #fff;
    overflow: hidden;
}

.audit-related-panel > header {
    padding: 13px 14px;
    border-bottom: 1px solid #e8eef3;
    background: #fafcfd;
}

.audit-related-panel h3 {
    margin: 0;
    color: #29485e;
    font-size: 12px;
}

.audit-related-panel header span {
    display: block;
    margin-top: 3px;
    color: #8b9ba7;
    font-size: 9px;
}

.audit-related-list {
    max-height: 290px;
    overflow-y: auto;
}

.audit-related-list > a {
    display: grid;
    grid-template-columns: 76px 1fr 12px;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #eef3f6;
    color: inherit;
    text-decoration: none;
}

.audit-related-list > a:last-child {
    border-bottom: 0;
}

.audit-related-list > a:hover {
    background: #f7fafc;
}

.audit-related-time {
    color: #8799a7;
    font-size: 9px;
    white-space: nowrap;
}

.audit-related-copy {
    min-width: 0;
}

.audit-related-copy strong {
    display: block;
    color: #365268;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-related-copy small {
    display: block;
    margin-top: 2px;
    color: #91a0aa;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-related-list > a > b {
    color: #91a2af;
}

.audit-related-empty {
    padding: 22px 14px;
    color: #96a4ae;
    font-size: 10px;
    text-align: center;
}


@media (max-width: 1180px) {

    .audit-investigation-grid {
        grid-template-columns: 1fr 1fr;
    }

    .audit-detail-technical {
        grid-column: 1 / -1;
    }

    .audit-investigation-related {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 700px) {

    .audit-investigation-grid {
        grid-template-columns: 1fr;
    }

    .audit-detail-technical {
        grid-column: auto;
    }

    .audit-detail-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* =========================================================
   B2C24-E14.4D-B5 — PAPERERA DE TASQUES
   ========================================================= */

.ticket-task-trash {
    margin-top: 14px;
    border: 1px solid rgba(100, 116, 139, .18);
    border-radius: 12px;
    background: rgba(248, 250, 252, .7);
    overflow: hidden;
}

.ticket-task-trash-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    color: #475569;
}

.ticket-task-trash-summary::-webkit-details-marker {
    display: none;
}

.ticket-task-trash-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ticket-task-trash-icon {
    opacity: .72;
}

.ticket-task-trash-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
}

.ticket-task-trash-list {
    padding: 0 12px 12px;
}

.ticket-task-trash-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 13px;
    margin-top: 8px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 10px;
    background: #fff;
}

.ticket-task-trash-copy {
    min-width: 0;
    flex: 1;
}

.ticket-task-trash-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ticket-task-trash-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
}

.ticket-task-trash-copy p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
}

.ticket-task-trash-restore-form {
    flex: 0 0 auto;
}

.ticket-task-restore-button {
    white-space: nowrap;
}

@media (max-width: 700px) {
    .ticket-task-trash-item {
        flex-direction: column;
    }

    .ticket-task-trash-restore-form {
        width: 100%;
    }

    .ticket-task-restore-button {
        width: 100%;
    }
}

/* =========================================================
   B2C24-E14.4D-B5-PERF6-B2D
   Loader professional · Equipaments GLPI
   ========================================================= */

.glpi-loading-shell {
    padding: 6px 2px 4px;
}

.glpi-loading-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.glpi-loading-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #eef6ff;
    border: 1px solid #d7e7fb;
    color: #1e5fae;
}

.glpi-loading-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.glpi-loading-heading h3 {
    margin: 0 0 6px;
    font-size: 1.12rem;
    line-height: 1.3;
    color: #17324d;
}

.glpi-loading-heading p {
    margin: 0;
    max-width: 760px;
    color: #66788a;
    line-height: 1.55;
}

.glpi-loading-progress {
    position: relative;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
    margin-bottom: 18px;
}

.glpi-loading-progress-bar {
    width: 14%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #1f63b5 0%,
        #3d8de0 55%,
        #6cb6f2 100%
    );
    transition: width .45s ease;
}

.glpi-loading-current {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    margin-bottom: 20px;
    color: #274c73;
}

.glpi-loading-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #d8e5f2;
    border-top-color: #1f63b5;
    border-radius: 50%;
    animation: glpi-loading-spin .8s linear infinite;
}

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

.glpi-loading-step {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e7edf4;
    color: #7a8998;
    transition:
        background .25s ease,
        border-color .25s ease,
        color .25s ease;
}

.glpi-loading-step > span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: #e9eef4;
    color: #617181;
    font-size: .76rem;
    font-weight: 700;
}

.glpi-loading-step small {
    font-size: .82rem;
    line-height: 1.25;
}

.glpi-loading-step.is-active {
    background: #eef6ff;
    border-color: #cfe2f8;
    color: #1f5e9f;
}

.glpi-loading-step.is-active > span {
    background: #1f63b5;
    color: #fff;
}

.glpi-loading-step.is-done {
    background: #f0f8f3;
    border-color: #d2ead9;
    color: #32734a;
}

.glpi-loading-step.is-done > span {
    background: #3b8a59;
    color: #fff;
}

@keyframes glpi-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .glpi-loading-steps {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .glpi-loading-heading {
        gap: 12px;
    }

    .glpi-loading-steps {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   B2C24-E15.2A
   Auditoria — mode detall + jerarquia visual
   ========================================================= */

.audit-page.audit-page-detail-mode > .audit-kpi-grid,
.audit-page.audit-page-detail-mode > .audit-workspace,
.audit-page.audit-page-detail-mode > .audit-results-card {
    display: none;
}

.audit-page.audit-page-detail-mode .audit-investigation {
    margin-top: 4px;
    margin-bottom: 0;
    border-color: #c9d9e6;
    box-shadow:
        0 12px 34px rgba(28, 62, 88, .09);
}

.audit-detail-back {
    display: inline-flex;
    min-height: 38px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border: 1px solid #c7d8e5;
    border-radius: 10px;

    background: #f7fafc;
    color: #24577e;

    text-decoration: none;
    font-size: 11px;
    font-weight: 800;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .15s ease;
}

.audit-detail-back:hover {
    border-color: #8fb4d0;
    background: #edf6fc;
    color: #174e78;
    transform: translateY(-1px);
}

.audit-detail-back > span:first-child {
    font-size: 16px;
    line-height: 1;
}

.audit-category-badge {
    min-height: 27px;
    padding: 0 10px;

    border: 1px solid transparent;
    border-radius: 999px;

    color: #fff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .015em;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        0 2px 5px rgba(24, 49, 69, .10);
}

.audit-category-tickets {
    border-color: #14558e;
    background: #1769aa;
    color: #fff;
}

.audit-category-configuration {
    border-color: #7340a0;
    background: #8750b5;
    color: #fff;
}

.audit-category-access {
    border-color: #16744f;
    background: #19865b;
    color: #fff;
}

.audit-category-attachments {
    border-color: #a9560a;
    background: #c46910;
    color: #fff;
}

.audit-category-people {
    border-color: #08707e;
    background: #0b8291;
    color: #fff;
}

.audit-category-system {
    border-color: #526475;
    background: #667788;
    color: #fff;
}

.audit-object-link {
    border-color: #bad3e6;
    background: #eef7fd;
    color: #245f8c;
}

.audit-object-link strong {
    color: #0f5891;
    font-weight: 850;
}

.audit-object-link:hover {
    border-color: #78abd0;
    background: #e1f1fc;
}

.audit-technical-badge {
    border: 1px solid #e4a94f;
    background: #fff1d8;
    color: #81510c;
}

@media (max-width: 820px) {

    .audit-investigation-head {
        flex-direction: column;
    }

    .audit-detail-back {
        align-self: flex-start;
    }
}


/* =========================================================
   B2C24-E15.2B
   Auditoria — badges semàntics d'acció
   ========================================================= */

.audit-action-copy {
    min-width: 205px;
}

.audit-action-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    max-width: 100%;
    padding: 0 10px;

    border: 1px solid transparent;
    border-radius: 8px;

    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;

    transition:
        filter .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

a.audit-action-badge:hover {
    filter: brightness(.96);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(26, 52, 72, .12);
}


/* Correcte / completat */
.audit-action-success {
    border-color: #9ed5b5;
    background: #ddf5e7;
    color: #12633a;
}


/* Error / denegació / eliminació */
.audit-action-danger {
    border-color: #efb2b2;
    background: #fde5e5;
    color: #9e2525;
}


/* Atenció / retirada / desvinculació */
.audit-action-warning {
    border-color: #edc68d;
    background: #fff0d8;
    color: #8b5409;
}


/* Consulta / lectura / comunicació */
.audit-action-info {
    border-color: #a8cce7;
    background: #e5f2fb;
    color: #185f91;
}


/* Modificació / actualització */
.audit-action-change {
    border-color: #c8b3e5;
    background: #f0e8fa;
    color: #68408e;
}


/* Sense semàntica especial */
.audit-action-neutral {
    border-color: #ced8df;
    background: #eef2f5;
    color: #526674;
}


.audit-action-copy small {
    margin-top: 5px;
}


/*
 * Al detall l'acció funcional és el títol visual
 * principal, però conserva una mida controlada.
 */
.audit-detail-action-title {
    margin-top: 3px;
}

.audit-detail-action-title .audit-action-badge {
    min-height: 34px;
    padding: 0 13px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 850;
}


@media (max-width: 560px) {

    .audit-action-badge {
        white-space: normal;
    }

    .audit-detail-action-title .audit-action-badge {
        font-size: 14px;
    }
}


/* =========================================================
   B2C24-E15.2D
   Auditoria — filtres essencials + avançats
   ========================================================= */

.audit-filter-grid.audit-filter-grid-primary {
    grid-template-columns:
        minmax(240px, 1.4fr)
        minmax(175px, .8fr)
        minmax(175px, .8fr);
}


/*
 * Bloc avançat natiu amb <details>.
 * No necessita JavaScript i manté accessibilitat
 * de teclat/navegador.
 */

.audit-advanced-filters {
    margin-top: 17px;

    border: 1px solid #d9e4ec;
    border-radius: 12px;

    background: #f8fbfd;

    overflow: hidden;
}


.audit-advanced-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    min-height: 58px;
    padding: 10px 16px;

    cursor: pointer;
    user-select: none;

    color: #164a72;

    list-style: none;
}


.audit-advanced-summary::-webkit-details-marker {
    display: none;
}


.audit-advanced-summary::marker {
    display: none;
    content: "";
}


.audit-advanced-summary:hover {
    background: #f1f7fb;
}


.audit-advanced-summary-main {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}


.audit-advanced-summary-main strong {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}


.audit-advanced-summary-main small {
    color: #71899b;

    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}


.audit-advanced-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    border-radius: 8px;

    background: #e8f2f8;

    font-size: 16px;
    font-weight: 800;

    transition:
        transform .18s ease,
        background .18s ease;
}


.audit-advanced-filters[open]
.audit-advanced-chevron {
    transform: rotate(180deg);
}


.audit-advanced-filters[open]
.audit-advanced-summary {
    border-bottom: 1px solid #dce7ee;
}


.audit-advanced-content {
    padding: 16px;
}


.audit-advanced-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(220px, .8fr)
        minmax(300px, 1.2fr);

    gap: 16px;
}


.audit-advanced-technical {
    margin-top: 15px;
    padding-top: 14px;

    border-top: 1px solid #e1eaf0;
}


.audit-advanced-technical
.audit-technical-toggle {
    width: fit-content;
    max-width: 100%;
}


/*
 * El checkbox ja no comparteix espai amb els
 * botons d'acció. Els botons queden alineats
 * a la dreta i la jerarquia és molt més neta.
 */

.audit-filter-actions {
    justify-content: flex-end;
}


@media (max-width: 980px) {

    .audit-filter-grid.audit-filter-grid-primary {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(170px, .7fr)
            minmax(170px, .7fr);
    }

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


@media (max-width: 760px) {

    .audit-filter-grid.audit-filter-grid-primary,
    .audit-advanced-filter-grid {
        grid-template-columns: 1fr;
    }

    .audit-advanced-summary {
        min-height: 54px;
        padding: 9px 13px;
    }

    .audit-advanced-content {
        padding: 14px;
    }
}


@media (max-width: 560px) {

    .audit-filter-actions {
        align-items: stretch;
    }

    .audit-filter-buttons {
        width: 100%;
    }

    .audit-filter-buttons .button {
        flex: 1 1 auto;
    }
}


/* =========================================================
   B2C24-E15.2E
   Auditoria — refinament responsive final
   ========================================================= */


/*
 * TABLET
 * Manté les accions accessibles i evita que
 * els controls quedin massa estrets.
 */
@media (max-width: 820px) {

    .audit-filter-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px;
    }

    .audit-filter-buttons .button {
        min-height: 42px;
    }

    .audit-results-head {
        gap: 10px;
    }

    .audit-table-wrap {
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    .audit-action-copy {
        min-width: 170px;
    }
}


/*
 * MÒBIL / TABLET PETITA
 */
@media (max-width: 700px) {

    .audit-filter-panel {
        padding-left: 14px;
        padding-right: 14px;
    }

    .audit-filter-grid.audit-filter-grid-primary,
    .audit-advanced-filter-grid {
        gap: 12px;
    }

    .audit-search-field input,
    .audit-filter-field select,
    .audit-filter-field input {
        min-height: 44px;
    }

    .audit-advanced-summary {
        min-height: 54px;
    }

    .audit-advanced-summary-main small {
        line-height: 1.35;
    }

    .audit-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }

    /*
     * Conservem estructura tabular.
     * És preferible scroll horitzontal controlat
     * que comprimir dades d'auditoria fins a fer-les
     * il·legibles.
     */
    .audit-table {
        min-width: 820px;
    }

    .audit-table thead th,
    .audit-table tbody td {
        padding-left: 11px;
        padding-right: 11px;
    }

    .audit-action-copy {
        min-width: 155px;
    }

    .audit-object-link,
    .audit-object-pill {
        max-width: 180px;
    }

    .audit-detail-back {
        min-height: 42px;
    }

    .audit-detail-list dd,
    .audit-detail-list code {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}


/*
 * MÒBIL
 */
@media (max-width: 560px) {

    .audit-filter-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .audit-search-field input {
        font-size: 16px;
    }

    /*
     * 16px evita el zoom automàtic d'iOS
     * quan l'usuari entra en un input.
     */
    .audit-filter-field select,
    .audit-filter-field input {
        min-height: 46px;
        font-size: 16px;
    }

    .audit-advanced-filters {
        margin-top: 14px;
        border-radius: 10px;
    }

    .audit-advanced-summary {
        padding: 10px 12px;
    }

    .audit-advanced-content {
        padding: 12px;
    }

    .audit-advanced-chevron {
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
    }

    .audit-filter-actions {
        width: 100%;
    }

    .audit-filter-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 9px;
    }

    .audit-filter-buttons .button {
        width: 100%;
        min-height: 44px;
        margin: 0;
        justify-content: center;
    }

    /*
     * L'acció principal ocupa tota l'amplada.
     */
    .audit-filter-buttons .button-primary {
        grid-column: 1 / -1;
    }

    .audit-results-head {
        padding-left: 14px;
        padding-right: 14px;
    }

    .audit-results-head h2 {
        font-size: 18px;
    }

    .audit-table {
        min-width: 760px;
    }

    .audit-action-badge {
        max-width: 170px;
        white-space: normal;
        text-align: left;
    }

    .audit-action-copy {
        min-width: 145px;
    }

    .audit-object-link,
    .audit-object-pill {
        max-width: 165px;
    }

    .audit-detail-action-title .audit-action-badge {
        max-width: 100%;
        white-space: normal;
    }

    .audit-detail-back {
        width: 100%;
        justify-content: center;
    }
}


/*
 * Pantalles molt petites.
 */
@media (max-width: 380px) {

    .audit-filter-buttons {
        grid-template-columns: 1fr;
    }

    .audit-filter-buttons .button-primary {
        grid-column: auto;
    }

    .audit-table {
        min-width: 720px;
    }
}


/*
 * Accessibilitat: reduir animacions quan el sistema
 * operatiu ho demana.
 */
@media (prefers-reduced-motion: reduce) {

    .audit-advanced-chevron,
    .audit-action-badge,
    .audit-detail-back {
        transition: none !important;
    }
}


/* =========================================================
   B2C24-E15.3B
   Auditoria — cronologia funcional del tiquet
   ========================================================= */

.audit-ticket-timeline {
    margin: 0 18px 16px;

    border: 1px solid #dce7ee;
    border-radius: 14px;

    background: #fff;

    overflow: hidden;
}


.audit-ticket-timeline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;

    padding: 15px 16px;

    border-bottom: 1px solid #e6edf2;

    background: #f8fbfd;
}


.audit-ticket-timeline-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}


.audit-ticket-timeline-title h3 {
    margin: 0;

    color: #29485e;

    font-size: 14px;
    font-weight: 850;
}


.audit-ticket-timeline-title > span {
    display: inline-flex;
    align-items: center;

    min-height: 23px;
    padding: 0 8px;

    border-radius: 999px;

    background: #e7f0f6;
    color: #587286;

    font-size: 10px;
    font-weight: 750;
}


.audit-ticket-timeline-head p {
    margin: 5px 0 0;

    color: #748b9c;

    font-size: 11px;
}


.audit-ticket-timeline-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 0 11px;

    border: 1px solid #bad7ea;
    border-radius: 8px;

    background: #f4faff;
    color: #1b6195;

    font-size: 10px;
    font-weight: 800;
    text-decoration: none;

    white-space: nowrap;
}


.audit-ticket-timeline-open:hover {
    background: #eaf6fe;
}


.audit-ticket-timeline-list {
    max-height: 430px;
    overflow-y: auto;
}


.audit-ticket-timeline-item {
    position: relative;

    display: grid;
    grid-template-columns:
        24px
        92px
        minmax(0, 1fr)
        14px;

    align-items: center;
    gap: 10px;

    min-height: 66px;

    padding: 10px 14px;

    border-bottom: 1px solid #edf2f5;

    color: inherit;
    text-decoration: none;
}


.audit-ticket-timeline-item:last-child {
    border-bottom: 0;
}


.audit-ticket-timeline-item:hover {
    background: #f8fbfd;
}


.audit-ticket-timeline-item.is-current {
    background: #f1f8fd;

    box-shadow:
        inset 3px 0 0 #2474ad;
}


.audit-ticket-timeline-marker {
    position: relative;

    align-self: stretch;

    display: flex;
    align-items: center;
    justify-content: center;
}


.audit-ticket-timeline-marker::before {
    content: "";

    position: absolute;
    top: -11px;
    bottom: -11px;
    left: 50%;

    width: 2px;

    background: #dce7ee;

    transform: translateX(-50%);
}


.audit-ticket-timeline-item:first-child
.audit-ticket-timeline-marker::before {
    top: 50%;
}


.audit-ticket-timeline-item:last-child
.audit-ticket-timeline-marker::before {
    bottom: 50%;
}


.audit-ticket-timeline-marker i {
    position: relative;
    z-index: 1;

    width: 10px;
    height: 10px;

    border: 2px solid #8db8d3;
    border-radius: 50%;

    background: #fff;
}


.audit-ticket-timeline-item.is-current
.audit-ticket-timeline-marker i {
    width: 12px;
    height: 12px;

    border-color: #2474ad;
    background: #2474ad;

    box-shadow:
        0 0 0 4px #dbeefa;
}


.audit-ticket-timeline-time strong,
.audit-ticket-timeline-time small {
    display: block;
}


.audit-ticket-timeline-time strong {
    color: #38576d;

    font-size: 10px;
}


.audit-ticket-timeline-time small {
    margin-top: 2px;

    color: #899aa6;

    font-size: 9px;
}


.audit-ticket-timeline-copy {
    min-width: 0;
}


.audit-ticket-timeline-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}


.audit-ticket-current-badge {
    display: inline-flex;
    align-items: center;

    min-height: 24px;
    padding: 0 7px;

    border-radius: 7px;

    background: #dceef9;
    color: #1d6799;

    font-size: 9px;
    font-weight: 800;
}


.audit-ticket-timeline-copy > small {
    display: block;

    margin-top: 5px;

    color: #667f91;

    font-size: 10px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.audit-ticket-timeline-copy > em {
    display: block;

    margin-top: 3px;

    color: #94a2ac;

    font-size: 9px;
    font-style: normal;
}


.audit-ticket-timeline-item > b {
    color: #8da0ad;

    font-size: 15px;
}


@media (max-width: 700px) {

    .audit-ticket-timeline {
        margin:
            0
            14px
            14px;
    }

    .audit-ticket-timeline-head {
        flex-direction: column;
        gap: 11px;

        padding: 14px;
    }

    .audit-ticket-timeline-open {
        width: 100%;
        min-height: 40px;
    }

    .audit-ticket-timeline-item {
        grid-template-columns:
            20px
            70px
            minmax(0, 1fr)
            10px;

        gap: 7px;

        padding:
            10px
            10px;
    }

    .audit-ticket-timeline-copy > small {
        white-space: normal;
    }
}


@media (max-width: 440px) {

    .audit-ticket-timeline-item {
        grid-template-columns:
            18px
            minmax(0, 1fr)
            10px;
    }

    .audit-ticket-timeline-time {
        grid-column: 2;
    }

    .audit-ticket-timeline-copy {
        grid-column: 2;
    }

    .audit-ticket-timeline-item > b {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}


/* =========================================================
   B2C24-E15.3C
   Auditoria — navegació i context dins la cronologia
   ========================================================= */

.audit-ticket-timeline-navigation {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: stretch;
    gap: 10px;

    padding: 10px 14px;

    border-bottom: 1px solid #e5edf2;

    background: #fff;
}


.audit-ticket-timeline-nav-side {
    min-width: 0;
}


.audit-ticket-timeline-nav-side.is-next {
    display: flex;
    justify-content: flex-end;
}


.audit-ticket-timeline-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    max-width: 100%;
    min-height: 42px;
    padding: 6px 10px;

    border: 1px solid #d8e5ed;
    border-radius: 9px;

    background: #f9fbfd;
    color: #335d79;

    text-decoration: none;
}


.audit-ticket-timeline-nav-link:hover {
    border-color: #bcd4e3;
    background: #f1f8fc;
}


.audit-ticket-timeline-nav-link > span {
    min-width: 0;
}


.audit-ticket-timeline-nav-link strong,
.audit-ticket-timeline-nav-link small {
    display: block;
}


.audit-ticket-timeline-nav-link strong {
    font-size: 10px;
    font-weight: 800;
}


.audit-ticket-timeline-nav-link small {
    margin-top: 2px;

    max-width: 190px;

    color: #8093a1;

    font-size: 9px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.audit-ticket-timeline-nav-link.is-disabled {
    opacity: .48;
    cursor: default;
}


.audit-ticket-timeline-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 125px;
    padding: 4px 12px;

    text-align: center;
}


.audit-ticket-timeline-position strong {
    color: #294e68;

    font-size: 11px;
    font-weight: 850;
}


.audit-ticket-timeline-position small {
    margin-top: 2px;

    color: #91a0aa;

    font-size: 9px;
}


.audit-ticket-timeline-item[aria-current="true"] {
    scroll-margin-block: 80px;
}


@media (max-width: 700px) {

    .audit-ticket-timeline-navigation {
        grid-template-columns:
            1fr
            1fr;

        gap: 8px;

        padding: 10px;
    }

    .audit-ticket-timeline-position {
        grid-column: 1 / -1;
        grid-row: 1;

        min-height: 38px;
    }

    .audit-ticket-timeline-nav-side {
        grid-row: 2;
    }

    .audit-ticket-timeline-nav-link {
        width: 100%;
        min-height: 44px;
    }

    .audit-ticket-timeline-nav-side.is-next
    .audit-ticket-timeline-nav-link {
        justify-content: flex-end;
        text-align: right;
    }
}


@media (max-width: 440px) {

    .audit-ticket-timeline-nav-link small {
        max-width: 115px;
    }
}


/* =========================================================
   B2C24-E15.4B
   Auditoria — accions d'exportació de traçabilitat
   ========================================================= */

.audit-ticket-timeline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}


.audit-ticket-timeline-export {
    background: #fff;
}


@media (max-width: 700px) {

    .audit-ticket-timeline-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .audit-ticket-timeline-actions
    .audit-ticket-timeline-open {
        width: 100%;
    }
}


@media (max-width: 440px) {

    .audit-ticket-timeline-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   B2C24-E15.4C-B2
   Auditoria — exportació PDF de traçabilitat
   ========================================================= */

@media (max-width: 700px) {

    .audit-ticket-timeline-actions {
        grid-template-columns:
            1fr
            1fr
            1fr;
    }
}


@media (max-width: 560px) {

    .audit-ticket-timeline-actions {
        grid-template-columns:
            1fr
            1fr;
    }

    .audit-ticket-timeline-actions
    .audit-ticket-timeline-open:last-child {
        grid-column:
            1 / -1;
    }
}


@media (max-width: 400px) {

    .audit-ticket-timeline-actions {
        grid-template-columns:
            1fr;
    }

    .audit-ticket-timeline-actions
    .audit-ticket-timeline-open:last-child {
        grid-column:
            auto;
    }
}



/* =========================================================
   UI-R2 · MODERN APP SHELL
   Sidebar simple + topbar d'accions
   ========================================================= */

/* Sidebar més neta */

.sidebar-nav {
    padding-top: 8px;
}

.sidebar-nav > .nav-item {
    margin-bottom: 5px;
}

.sidebar-nav .nav-item {
    min-height: 46px;
    border-radius: 11px;
}

.sidebar-nav .nav-icon,
.sidebar-nav .nav-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-nav .nav-icon svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* La identitat de l'usuari passa a la topbar */

.app-topbar-modern {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 68px;
    gap: 22px;
    box-shadow: 0 1px 0 rgba(21, 80, 159, .03);
}

.topbar-page-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.topbar-page-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #223f4a;
    font-size: 14px;
    font-weight: 850;
}

.topbar-page-copy span {
    color: #81949c;
    font-size: 10px;
    font-weight: 700;
}


.topbar-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}


.topbar-action {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #526b75;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    list-style: none;
}

.topbar-action::-webkit-details-marker {
    display: none;
}

.topbar-action:hover {
    border-color: #e1e9ec;
    background: #f7fafb;
    color: var(--ceeb-blue);
}

.topbar-action:disabled {
    opacity: .55;
    cursor: default;
}

.topbar-action:disabled:hover {
    border-color: transparent;
    background: transparent;
    color: #526b75;
}


.topbar-action-icon,
.topbar-action-icon svg {
    width: 19px;
    height: 19px;
    display: block;
}

.topbar-action-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.topbar-count {
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #d93d4f;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}


.topbar-context-chip {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(21, 80, 159, .12);
    border-radius: 999px;
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue);
    font-size: 10px;
    font-weight: 850;
}


.topbar-menu {
    position: relative;
}

.topbar-menu > summary {
    list-style: none;
}

.topbar-menu > summary::-webkit-details-marker {
    display: none;
}


/* Menú usuari */

.topbar-user {
    min-height: 46px;
    display: grid;
    grid-template-columns: 34px minmax(0, auto) 16px;
    align-items: center;
    gap: 9px;
    padding: 5px 8px 5px 6px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
}

.topbar-user::-webkit-details-marker {
    display: none;
}

.topbar-user:hover,
.user-topbar-menu[open] > .topbar-user {
    border-color: #e0e8eb;
    background: #f7fafb;
}


.topbar-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background:
        linear-gradient(
            135deg,
            var(--ceeb-blue),
            var(--ceeb-blue-alt)
        );
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}


.topbar-user-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.topbar-user-copy strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #29434d;
    font-size: 11px;
}

.topbar-user-copy small {
    color: #83969d;
    font-size: 9px;
    font-weight: 700;
}


.topbar-chevron,
.topbar-chevron svg {
    width: 15px;
    height: 15px;
    display: block;
}

.topbar-chevron svg {
    fill: none;
    stroke: #7c9098;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.user-topbar-menu[open]
.topbar-chevron {
    transform: rotate(180deg);
}


/* Dropdowns */

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 100;
    width: min(360px, calc(100vw - 30px));
    overflow: hidden;
    border: 1px solid #dfe8eb;
    border-radius: 14px;
    background: #fff;
    box-shadow:
        0 18px 45px rgba(25, 50, 62, .16);
}


.topbar-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 16px;
    border-bottom: 1px solid #edf2f4;
}

.topbar-dropdown-header strong,
.topbar-dropdown-header small {
    display: block;
}

.topbar-dropdown-header strong {
    color: #263f49;
    font-size: 12px;
}

.topbar-dropdown-header small {
    margin-top: 3px;
    color: #889aa1;
    font-size: 9px;
}


.topbar-dropdown-count {
    min-width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #fff0f2;
    color: #c62f43;
    font-size: 10px;
    font-weight: 900;
}


.topbar-empty {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 30px 20px;
    text-align: center;
}

.topbar-empty strong {
    color: #39535d;
    font-size: 12px;
}

.topbar-empty span {
    color: #899a9f;
    font-size: 10px;
}


.pending-list {
    max-height: 340px;
    overflow-y: auto;
}


.pending-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f3f5;
}

.pending-item:last-child {
    border-bottom: 0;
}


.pending-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #edf4fb;
    color: var(--ceeb-blue);
    font-size: 11px;
    font-weight: 900;
}


.pending-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.pending-copy strong,
.pending-copy span,
.pending-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-copy strong {
    color: #304b55;
    font-size: 11px;
}

.pending-copy span {
    color: #607780;
    font-size: 10px;
}

.pending-copy small {
    color: #92a2a8;
    font-size: 9px;
}


.topbar-dropdown-footer {
    padding: 10px 15px;
    border-top: 1px solid #edf2f4;
    background: #fafcfc;
    color: #87999f;
    text-align: center;
    font-size: 9px;
}


/* Dropdown usuari */

.user-dropdown {
    width: min(310px, calc(100vw - 30px));
}


.user-dropdown-profile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 17px;
    border-bottom: 1px solid #edf2f4;
}


.user-dropdown-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            var(--ceeb-blue),
            var(--ceeb-blue-alt)
        );
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}


.user-dropdown-profile > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.user-dropdown-profile strong,
.user-dropdown-profile span,
.user-dropdown-profile small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-profile strong {
    color: #29434d;
    font-size: 12px;
}

.user-dropdown-profile span {
    color: var(--ceeb-blue);
    font-size: 9px;
    font-weight: 800;
}

.user-dropdown-profile small {
    color: #8a9ba1;
    font-size: 9px;
}


.user-dropdown-section {
    padding: 8px;
    border-bottom: 1px solid #edf2f4;
}

.user-dropdown-section-last {
    border-bottom: 0;
}


.user-dropdown-title {
    display: block;
    padding: 6px 8px 7px;
    color: #9aa8ad;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}


.user-dropdown-link,
.user-dropdown-action,
.user-dropdown-logout,
.portal-mode-current {
    width: 100%;
    min-height: 37px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #46606a;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 750;
}


.user-dropdown-link:hover,
.user-dropdown-action:hover {
    background: #f4f8fa;
    color: var(--ceeb-blue);
}


.user-dropdown-link-muted {
    color: #9aa8ad;
    cursor: default;
}

.user-dropdown-link-muted small {
    color: #a9b5b9;
    font-size: 8px;
}


.portal-mode-current {
    justify-content: flex-start;
    background: #f1f7fb;
    color: var(--ceeb-blue);
}


.portal-mode-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #37a96b;
}


.user-dropdown-logout {
    color: #b43847;
}

.user-dropdown-logout:hover {
    background: #fff3f4;
    color: #a52737;
}


/* Responsive */

@media (max-width: 1050px) {

    .topbar-action-label,
    .topbar-context-chip {
        display: none;
    }

    .topbar-action {
        width: 40px;
        padding-left: 0;
        padding-right: 0;
    }
}


@media (max-width: 760px) {

    .app-topbar-modern {
        padding-left: 15px;
        padding-right: 15px;
    }

    .topbar-user-copy {
        display: none;
    }

    .topbar-user {
        grid-template-columns: 34px 14px;
        gap: 4px;
    }

    .topbar-page-copy span {
        display: none;
    }
}


@media (min-width: 901px) {

    .app-shell.sidebar-collapsed
    .sidebar-nav .nav-item {
        min-height: 48px;
    }
}


/* =========================================================
   UI-R2-R1 · TEAM HUB
   ========================================================= */

.team-hub-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 18px;
}

.team-hub-card {
    min-height: 150px;
    display: grid;
    grid-template-columns:
        48px
        minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 22px;
    border: 1px solid #dde7ea;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}

.team-hub-card:hover {
    border-color:
        rgba(21, 80, 159, .28);
    box-shadow:
        0 10px 24px
        rgba(23, 60, 78, .08);
    transform:
        translateY(-1px);
}

.team-hub-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background:
        var(--ceeb-blue-soft);
    color:
        var(--ceeb-blue);
}

.team-hub-icon,
.team-hub-icon svg {
    width: 48px;
    height: 48px;
}

.team-hub-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.team-hub-card > div {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.team-hub-card strong {
    color: #28434e;
    font-size: 14px;
}

.team-hub-card span {
    color: #71868f;
    font-size: 11px;
    line-height: 1.5;
}

.team-hub-card small {
    width: fit-content;
    margin-top: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f2f5f6;
    color: #8fa0a6;
    font-size: 8px;
    font-weight: 800;
}

.team-hub-card-disabled {
    opacity: .62;
    cursor: default;
}

.team-hub-card-disabled:hover {
    border-color: #dde7ea;
    box-shadow: none;
    transform: none;
}

@media (max-width: 900px) {
    .team-hub-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   UI-R3-R1 · BADGES OPERATIUS
   Tasques + safata de Pendents
   ========================================================= */


/* -----------------------------------------
   SIDEBAR · TASQUES
   ----------------------------------------- */

.nav-item-tasks {
    position: relative;
}


.nav-count-badge {
    min-width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    color: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.04);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
}


.nav-item-tasks.active
.nav-count-badge {
    background: #fff;
    border-color: #fff;
    color: var(--ceeb-blue);
}


/* -----------------------------------------
   TOPBAR · SAFATA PENDENTS
   ----------------------------------------- */

.topbar-pending-menu
.topbar-action {
    position: relative;
}


.topbar-count {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border: 1px solid rgba(185, 44, 64, .12);
    border-radius: 999px;
    background: #d84456;
    color: #fff;
    box-shadow:
        0 3px 9px rgba(216, 68, 86, .18);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
}


.topbar-count-inbox {
    margin-left: 1px;
}


.topbar-dropdown-count {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0 7px;
    border: 1px solid rgba(199, 55, 75, .10);
    border-radius: 10px;
    background: #fff1f3;
    color: #c7374b;
    font-size: 9px;
    font-weight: 900;
}


/* -----------------------------------------
   SIDEBAR PLEGADA
   El número passa a indicador visual.
   ----------------------------------------- */

@media (min-width: 901px) {

    .app-shell.sidebar-collapsed
    .nav-item-tasks {
        position: relative;
    }


    .app-shell.sidebar-collapsed
    .nav-item-tasks
    .nav-count-badge {

        position: absolute;
        top: 7px;
        right: 8px;

        width: 8px;
        min-width: 8px;
        height: 8px;

        padding: 0;

        overflow: hidden;

        border: 2px solid #15509F;
        border-radius: 50%;

        background: #f2c94c;

        color: transparent;

        font-size: 0;

        box-shadow: none;
    }


    .app-shell.sidebar-collapsed
    .nav-item-tasks.active
    .nav-count-badge {

        border-color: rgba(255,255,255,.30);
        background: #fff;
    }
}


/* -----------------------------------------
   RESPONSIVE TOPBAR
   ----------------------------------------- */

@media (max-width: 1050px) {

    .topbar-pending-menu
    .topbar-count {

        position: absolute;
        top: 2px;
        right: 1px;

        min-width: 17px;
        height: 17px;

        padding: 0 4px;

        border: 2px solid #fff;

        font-size: 7px;
    }
}


/* =========================================================
   UI-R3-R1.1
   Ajust professional badge Tasques
   ========================================================= */


/* ---------------------------------------------------------
   DESPLEGAT
   Número immediatament després del text.
   --------------------------------------------------------- */

.nav-item-tasks {
    position: relative;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}


.nav-item-tasks .nav-icon {
    flex: 0 0 auto;
}


.nav-item-tasks .nav-item-label {
    flex: 0 1 auto;
}


.nav-item-tasks .nav-count-badge {
    position: static;

    flex: 0 0 auto;

    min-width: 20px;
    height: 20px;

    margin-left: 9px;
    padding: 0 6px;

    display: inline-grid;
    place-items: center;

    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;

    background: rgba(255,255,255,.17);

    color: #fff;

    box-shadow: none;

    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}


/* Actiu: contrast més net */

.nav-item-tasks.active
.nav-count-badge {

    border-color: rgba(255,255,255,.92);

    background: #fff;

    color: #15509F;

    box-shadow:
        0 2px 5px
        rgba(13, 51, 98, .12);
}


/* ---------------------------------------------------------
   SIDEBAR PLEGADA
   Badge numèric sobre la icona.
   --------------------------------------------------------- */

@media (min-width: 901px) {

    .app-shell.sidebar-collapsed
    .nav-item-tasks {

        position: relative;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }


    .app-shell.sidebar-collapsed
    .nav-item-tasks
    .nav-count-badge {

        position: absolute;

        top: 5px;
        right: 5px;

        width: auto;
        min-width: 17px;
        height: 17px;

        margin: 0;
        padding: 0 4px;

        display: inline-grid !important;
        place-items: center;

        overflow: visible;

        border: 2px solid #15509F;
        border-radius: 999px;

        background: #fff;

        color: #15509F;

        box-shadow:
            0 2px 5px
            rgba(8, 44, 89, .18);

        font-size: 8px;
        font-weight: 900;
        line-height: 1;
    }


    .app-shell.sidebar-collapsed
    .nav-item-tasks.active
    .nav-count-badge {

        border-color: #3e72ae;

        background: #fff;

        color: #15509F;
    }
}


/* =========================================================
   UI-R3-R2 · ABSENCE REQUESTS
   ========================================================= */

.absence-page {
    width: 100%;
}


.absence-page-heading {
    align-items: center;
}


/* RESUM */

.absence-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 13px;
    margin-bottom: 18px;
}


.absence-summary-card {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid #dce7ea;
    border-radius: 14px;
    background: #fff;
}


.absence-summary-card > div {
    display: grid;
    gap: 2px;
}


.absence-summary-card small {
    color: #83969d;
    font-size: 9px;
    font-weight: 800;
}


.absence-summary-card strong {
    color: #263f49;
    font-size: 22px;
    line-height: 1;
}


.absence-summary-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
}


.absence-summary-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.absence-summary-icon-pending {
    background: #fff5dd;
    color: #9f6b17;
}


.absence-summary-icon-approved {
    background: #eaf7ef;
    color: #26754d;
}


.absence-summary-icon-review {
    background: #edf4fb;
    color: var(--ceeb-blue);
}


/* TABS */

.absence-tabs {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border: 1px solid #dde7ea;
    border-radius: 12px;
    background: #fff;
}


.absence-tabs a {
    min-height: 37px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border-radius: 9px;
    color: #657b84;
    text-decoration: none;
    font-size: 10px;
    font-weight: 850;
}


.absence-tabs a:hover {
    background: #f5f8f9;
}


.absence-tabs a.active {
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue);
}


.absence-tab-count {
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #dfe9ed;
    color: #526b74;
    font-size: 8px;
    font-weight: 900;
}


.absence-tab-count-alert {
    background: #d84456;
    color: #fff;
}


/* LIST HEADER */

.absence-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 12px;
}


.absence-list-heading h2 {
    margin: 0;
    color: #263f49;
    font-size: 17px;
}


.absence-list-heading p {
    margin: 4px 0 0;
    color: #84969d;
    font-size: 10px;
}


/* CARDS */

.absence-request-list {
    display: grid;
    gap: 10px;
}


.absence-request-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px;
    border: 1px solid #dce7ea;
    border-radius: 14px;
    background: #fff;
}


.absence-request-main {
    min-width: 0;
    display: grid;
    grid-template-columns:
        42px
        minmax(0, 1fr);
    gap: 13px;
    align-items: start;
}


.absence-request-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #edf4fb;
    color: var(--ceeb-blue);
}


.absence-request-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.absence-request-copy {
    min-width: 0;
}


.absence-request-person {
    margin-bottom: 3px;
    color: #7d9199;
    font-size: 9px;
    font-weight: 850;
}


.absence-request-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}


.absence-request-title strong {
    color: #29434d;
    font-size: 13px;
}


.absence-request-period {
    margin-top: 5px;
    color: #506972;
    font-size: 11px;
    font-weight: 750;
}


.absence-request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}


.absence-request-meta span {
    display: inline-flex;
    min-height: 21px;
    align-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f5f6;
    color: #70858d;
    font-size: 8px;
    font-weight: 800;
}


.absence-request-note {
    max-width: 760px;
    margin: 9px 0 0;
    color: #71868e;
    font-size: 10px;
    line-height: 1.5;
}


.absence-resolution-note {
    width: fit-content;
    margin-top: 9px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #f2f5f6;
    color: #70848c;
    font-size: 9px;
}


.absence-resolution-rejected {
    background: #fff1f2;
    color: #a73b49;
}


/* STATUS */

.request-status {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
}


.request-status-pending {
    background: #fff4d8;
    color: #986511;
}


.request-status-approved {
    background: #e8f7ee;
    color: #23734a;
}


.request-status-rejected {
    background: #fff0f1;
    color: #b13949;
}


.request-status-cancelled {
    background: #edf1f2;
    color: #75878d;
}


/* ACTIONS */

.absence-request-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}


.request-action {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #dce6e9;
    border-radius: 9px;
    background: #fff;
    color: #536c75;
    cursor: pointer;
    font-family: inherit;
    font-size: 9px;
    font-weight: 850;
}


.request-action:hover {
    background: #f7f9fa;
}


.request-action-approve {
    border-color: #b9dec9;
    background: #eef9f2;
    color: #26764d;
}


.request-action-reject,
.request-action-cancel {
    color: #ad3948;
}


/* EMPTY */

.absence-empty {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 54px 25px;
    border: 1px dashed #d1dfe3;
    border-radius: 15px;
    background: rgba(255,255,255,.55);
    text-align: center;
}


.absence-empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    border-radius: 14px;
    background: #edf4fb;
    color: var(--ceeb-blue);
}


.absence-empty-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}


.absence-empty strong {
    color: #39535d;
    font-size: 13px;
}


.absence-empty p {
    max-width: 430px;
    margin: 0 0 8px;
    color: #87999f;
    font-size: 10px;
}


/* MODAL */

body.modal-open {
    overflow: hidden;
}


.app-modal[hidden] {
    display: none;
}


.app-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 20px;
}


.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17,39,49,.48);
    backdrop-filter: blur(2px);
}


.app-modal-panel {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 17px;
    background: #fff;
    box-shadow:
        0 24px 70px
        rgba(18,42,53,.26);
}


.app-modal-panel-small {
    width: min(470px, 100%);
}


.app-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 21px 16px;
    border-bottom: 1px solid #edf2f4;
}


.app-modal-header small {
    display: block;
    margin-bottom: 3px;
    color: var(--ceeb-blue);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}


.app-modal-header h2 {
    margin: 0;
    color: #29434d;
    font-size: 19px;
}


.app-modal-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: #f3f6f7;
    color: #72868d;
    cursor: pointer;
    font-family: inherit;
    font-size: 20px;
    line-height: 1;
}


.request-form {
    padding: 20px 21px;
}


.request-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 15px;
}


.request-field {
    display: grid;
    gap: 6px;
}


.request-field-wide {
    grid-column: 1 / -1;
}


.request-field > span {
    color: #566e77;
    font-size: 9px;
    font-weight: 850;
}


.request-field input,
.request-field select,
.request-field textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #d7e3e7;
    border-radius: 9px;
    outline: 0;
    background: #fff;
    color: #314c56;
    font: inherit;
    font-size: 11px;
}


.request-field input:focus,
.request-field select:focus,
.request-field textarea:focus {
    border-color: rgba(21,80,159,.45);
    box-shadow:
        0 0 0 3px
        rgba(21,80,159,.08);
}


.request-field textarea {
    resize: vertical;
}


.request-all-day {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #566e77;
    font-size: 10px;
    font-weight: 750;
}


.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #edf2f4;
}


.decision-modal-body {
    padding: 18px 20px 0;
}


.decision-modal-body p {
    margin: 0 0 16px;
    color: #607780;
    font-size: 11px;
    line-height: 1.5;
}


.app-modal-panel-small
.app-modal-actions {
    margin: 18px 20px 20px;
}


.request-submit-danger {
    background: #b83a49 !important;
    border-color: #b83a49 !important;
    color: #fff !important;
}


/* TOAST */

.app-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 800;
    max-width: min(
        390px,
        calc(100vw - 48px)
    );
    padding: 13px 16px;
    border-radius: 11px;
    box-shadow:
        0 16px 38px
        rgba(25,52,63,.19);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity .2s ease,
        transform .2s ease;
    font-size: 10px;
    font-weight: 800;
}


.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}


.app-toast-success {
    border: 1px solid #b9dec7;
    background: #eff9f2;
    color: #276f4b;
}


.app-toast-error {
    border: 1px solid #ebc1c7;
    background: #fff2f3;
    color: #a83242;
}


/* RESPONSIVE */

@media (max-width: 900px) {

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


    .absence-request-card {
        align-items: stretch;
        flex-direction: column;
    }


    .absence-request-actions {
        justify-content: flex-start;
        padding-left: 55px;
    }

}


@media (max-width: 650px) {

    .request-form-grid {
        grid-template-columns: 1fr;
    }


    .request-field-wide,
    .request-all-day {
        grid-column: auto;
    }


    .absence-tabs {
        width: 100%;
        overflow-x: auto;
    }


    .absence-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

}


/* =========================================================
   UI-R3-R3 · BADGES DE DEPARTAMENT
   ========================================================= */


/*
 * El color s'obté de departments.color.
 *
 * Fem servir:
 * --department-color
 * --department-rgb
 */

.absence-request-meta
.absence-department-badge {

    display: inline-flex;
    align-items: center;
    gap: 6px;

    min-height: 23px;

    padding: 0 9px;

    border:
        1px solid
        rgba(
            var(--department-rgb),
            .22
        );

    border-radius: 999px;

    background:
        rgba(
            var(--department-rgb),
            .10
        );

    color:
        var(--department-color);

    font-size: 8px;
    font-weight: 900;
}


.absence-department-dot {

    width: 7px;
    height: 7px;

    flex: 0 0 auto;

    border-radius: 50%;

    background:
        var(--department-color);

    box-shadow:
        0 0 0 3px
        rgba(
            var(--department-rgb),
            .10
        );
}


/*
 * "Dia complet" és informació temporal,
 * no forma part de la identitat del
 * departament.
 */

.absence-request-meta
.absence-day-badge {

    min-height: 23px;

    padding: 0 9px;

    border:
        1px solid #e2e9ec;

    border-radius: 999px;

    background: #f3f6f7;

    color: #73868d;

    font-size: 8px;
    font-weight: 800;
}


/* =========================================================
   UI-R3-R4 · IDENTITAT PERSONA + DEPARTAMENT
   ========================================================= */


/* ---------------------------------------------------------
   PERSONA
   --------------------------------------------------------- */

.absence-request-person {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 9px;
}


.absence-person-avatar {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #edf4fb,
            #e4eef8
        );

    border:
        1px solid rgba(21,80,159,.10);

    color: var(--ceeb-blue);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: .02em;
}


.absence-person-copy {
    min-width: 0;

    display: grid;

    gap: 1px;
}


.absence-person-copy strong {
    overflow: hidden;

    color: #263f49;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 11px;
    font-weight: 900;
}


.absence-person-copy small {
    overflow: hidden;

    color: #889aa1;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 8px;
    font-weight: 750;
}


/* ---------------------------------------------------------
   BADGE DEPARTAMENT
   Net, sense cercle interior.
   --------------------------------------------------------- */

.absence-request-meta
.absence-department-badge {

    position: relative;

    min-height: 23px;

    display: inline-flex;
    align-items: center;

    padding:
        0
        9px
        0
        11px;

    overflow: hidden;

    border:
        1px solid
        rgba(
            var(--department-rgb),
            .20
        );

    border-radius: 7px;

    background:
        rgba(
            var(--department-rgb),
            .08
        );

    color:
        var(--department-color);

    font-size: 8px;
    font-weight: 900;

    line-height: 1;
}


/*
 * Accent vertical molt discret.
 * Substitueix el cercle anterior.
 */

.absence-request-meta
.absence-department-badge::before {

    content: "";

    position: absolute;

    top: 4px;
    bottom: 4px;
    left: 4px;

    width: 2px;

    border-radius: 999px;

    background:
        var(--department-color);

    opacity: .85;
}


/*
 * Eliminem definitivament qualsevol
 * estil anterior del dot.
 */

.absence-department-dot {
    display: none !important;
}


/* Dia complet segueix neutre */

.absence-request-meta
.absence-day-badge {

    min-height: 23px;

    border-radius: 7px;

    background: #f2f5f6;

    color: #72858c;
}


/* ---------------------------------------------------------
   REQUEST CARD
   Ajust lleuger d'espai.
   --------------------------------------------------------- */

.absence-request-copy {
    display: block;
}


.absence-request-title {
    margin-top: 1px;
}


@media (max-width: 650px) {

    .absence-person-avatar {
        width: 30px;
        height: 30px;
    }

}


/* =========================================================
   UI-R3-CAL · TEAM CALENDAR
   ========================================================= */

.team-calendar-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}


.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 7px;
}


.calendar-nav-button,
.calendar-today-button {
    min-width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dbe5e8;
    border-radius: 10px;
    background: #fff;
    color: #506a73;
    text-decoration: none;
    font-size: 17px;
    font-weight: 850;
}


.calendar-today-button {
    width: auto;
    padding: 0 11px;
    font-size: 9px;
}


.calendar-nav-button:hover,
.calendar-today-button:hover {
    border-color: rgba(21,80,159,.24);
    color: var(--ceeb-blue);
}


.calendar-month-title {
    margin-left: 7px;
    color: #29434d;
    font-size: 15px;
}


.calendar-filters {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}


.calendar-filters label {
    display: grid;
    gap: 4px;
}


.calendar-filters label > span {
    color: #7c9098;
    font-size: 8px;
    font-weight: 850;
}


.calendar-filters select {
    min-width: 155px;
    height: 38px;
    padding: 0 30px 0 10px;
    border: 1px solid #dbe5e8;
    border-radius: 9px;
    background: #fff;
    color: #405b65;
    font: inherit;
    font-size: 9px;
}


.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 11px;
    color: #7e9198;
    font-size: 8px;
    font-weight: 800;
}


.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


.calendar-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}


.calendar-legend-available {
    background: #3da66c;
}


.calendar-legend-reduced {
    background: #d69a2e;
}


.calendar-legend-none {
    background: #d64b5c;
}


.team-month-calendar {
    overflow: hidden;
    border: 1px solid #dbe5e8;
    border-radius: 15px;
    background: #fff;
}


.calendar-weekdays {
    display: grid;
    grid-template-columns:
        repeat(7, minmax(0,1fr));
    border-bottom: 1px solid #e6edef;
    background: #f7fafb;
}


.calendar-weekdays span {
    padding: 10px;
    color: #71868e;
    text-align: center;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}


.calendar-grid {
    display: grid;
    grid-template-columns:
        repeat(7, minmax(0,1fr));
}


.calendar-day {
    position: relative;
    min-height: 148px;
    padding: 9px;
    border-right: 1px solid #edf2f4;
    border-bottom: 1px solid #edf2f4;
    background: #fff;
}


.calendar-day:nth-child(7n) {
    border-right: 0;
}


.calendar-day-outside {
    background: #fafcfc;
    opacity: .50;
}


.calendar-day-today {
    box-shadow:
        inset 0 0 0 2px
        rgba(21,80,159,.24);
}


.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}


.calendar-day-number {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #405a64;
    font-size: 9px;
    font-weight: 900;
}


.calendar-day-today
.calendar-day-number {
    background: var(--ceeb-blue);
    color: #fff;
}


.calendar-coverage-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}


.calendar-coverage-ok {
    background: #3da66c;
}


.calendar-coverage-reduced {
    background: #d69a2e;
}


.calendar-coverage-none {
    background: #d64b5c;
}


.calendar-coverage-neutral {
    background: #c9d4d8;
}


.calendar-event {
    width: 100%;
    min-height: 36px;
    display: grid;
    grid-template-columns:
        25px minmax(0,1fr);
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    padding: 5px 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}


.calendar-event-avatar {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(255,255,255,.72);
    font-size: 7px;
    font-weight: 900;
}


.calendar-event-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}


.calendar-event-copy strong,
.calendar-event-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.calendar-event-copy strong {
    font-size: 8px;
}


.calendar-event-copy small {
    font-size: 7px;
    opacity: .76;
}


.calendar-event-vacation {
    background: #eaf3ff;
    color: #285e9a;
}


.calendar-event-training {
    background: #f1ecfb;
    color: #6947a5;
}


.calendar-event-personal {
    background: #fff5dc;
    color: #9b6a13;
}


.calendar-event-sick {
    background: #fff0f1;
    color: #af3949;
}


.calendar-event-other {
    background: #eff3f4;
    color: #687c84;
}


.calendar-day-footer {
    position: absolute;
    right: 8px;
    bottom: 7px;
    left: 8px;
    color: #8b9ca2;
    font-size: 7px;
    font-weight: 800;
}


.calendar-more {
    display: inline-block;
    margin-top: 2px;
    color: #70848c;
    font-size: 7px;
    font-weight: 850;
}


.calendar-modal-body {
    padding: 20px;
}


.calendar-modal-type {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: #edf4fb;
    color: var(--ceeb-blue);
    font-size: 8px;
    font-weight: 900;
}


.calendar-modal-body p {
    margin: 13px 0 0;
    color: #647a83;
    font-size: 10px;
    line-height: 1.5;
}


@media (max-width: 1100px) {

    .team-calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }


    .calendar-filters {
        flex-wrap: wrap;
    }

}


@media (max-width: 850px) {

    .team-month-calendar {
        overflow-x: auto;
    }


    .calendar-weekdays,
    .calendar-grid {
        min-width: 900px;
    }

}


/* =========================================================
   UI-R3-CAL-R2 · MES / ANY + PDF
   ========================================================= */

.team-calendar-heading {
    align-items: center;
}


.calendar-heading-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}


.calendar-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border: 1px solid #dce6e9;
    border-radius: 11px;
    background: #fff;
}


.calendar-view-switch a {
    min-width: 52px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 11px;
    border-radius: 8px;
    color: #71858d;
    text-decoration: none;
    font-size: 9px;
    font-weight: 850;
}


.calendar-view-switch a:hover {
    background: #f5f8f9;
}


.calendar-view-switch a.active {
    background: var(--ceeb-blue-soft);
    color: var(--ceeb-blue);
}


.calendar-pdf-button {
    min-height: 42px;
}


/* YEAR */

.year-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 13px;
    color: #788c94;
    font-size: 8px;
    font-weight: 800;
}


.year-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


.year-event-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
}


.year-event-vacation {
    background: #568bc8;
}


.year-event-training {
    background: #8464bd;
}


.year-event-personal {
    background: #d8a23b;
}


.year-event-sick {
    background: #d64c5d;
}


.year-event-other {
    background: #80939a;
}


.year-calendar-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 14px;
}


.year-month-card {
    overflow: hidden;
    border: 1px solid #dce6e9;
    border-radius: 14px;
    background: #fff;
}


.year-month-header {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    border-bottom: 1px solid #edf2f4;
    color: inherit;
    text-decoration: none;
}


.year-month-header:hover {
    background: #f8fafb;
}


.year-month-header strong {
    color: #29434d;
    font-size: 12px;
}


.year-month-header span {
    color: #8a9ba1;
    font-size: 8px;
    font-weight: 750;
}


.year-weekdays,
.year-days {
    display: grid;
    grid-template-columns:
        repeat(
            7,
            minmax(0,1fr)
        );
}


.year-weekdays {
    padding: 7px 9px 2px;
}


.year-weekdays span {
    color: #91a0a5;
    text-align: center;
    font-size: 7px;
    font-weight: 850;
}


.year-days {
    padding: 4px 9px 11px;
    gap: 2px 0;
}


.year-day,
.year-day-empty {
    min-height: 32px;
}


.year-day {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #536b74;
    text-decoration: none;
    font-size: 8px;
    font-weight: 750;
}


.year-day:hover {
    background: #f2f6f8;
}


.year-day-has-events {
    background: #f5f8fb;
    color: #29434d;
    font-weight: 900;
}


.year-day-dots {
    position: absolute;
    right: 2px;
    bottom: 2px;
    left: 2px;
    display: flex;
    justify-content: center;
    gap: 2px;
}


.year-day-dots
.year-event-dot {
    width: 4px;
    height: 4px;
}


@media (max-width: 1150px) {

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

}


@media (max-width: 720px) {

    .calendar-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }


    .year-calendar-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   UI-R3-CAL-R3 · FESTIUS
   ========================================================= */

.calendar-day-holiday {
    background:
        linear-gradient(
            180deg,
            #fff8f8 0%,
            #fffafa 100%
        );
}


.calendar-day-holiday
.calendar-day-number {
    color: #b64150;
}


.calendar-holiday {
    display: grid;
    gap: 1px;

    margin: 2px 0 7px;

    padding: 6px 7px;

    border:
        1px solid
        rgba(197,65,81,.14);

    border-radius: 8px;

    background:
        rgba(216,68,86,.07);
}


.calendar-holiday strong {
    color: #bd4050;

    font-size: 7px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: .04em;
}


.calendar-holiday span {
    overflow: hidden;

    color: #7b5960;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 7px;
    font-weight: 750;
}


.year-day-holiday {
    background: #fff0f2 !important;

    color: #ac3546 !important;
}


.year-holiday-mark {
    position: absolute;

    top: 2px;
    right: 3px;

    min-width: 10px;
    height: 10px;

    display: grid;
    place-items: center;

    border-radius: 3px;

    background: #d84a5c;

    color: #fff;

    font-size: 5px;
    font-weight: 900;

    line-height: 1;
}


.year-holiday-legend {
    width: 10px;
    height: 10px;

    display: inline-block;

    border-radius: 3px;

    background: #fff0f2;

    border:
        1px solid
        rgba(216,74,92,.28);
}


/* =========================================================
   UI-R3-CAL-R3-R1
   FESTIU = DIA DE CALENDARI, NO ABSÈNCIA
   ========================================================= */


/*
 * Paleta pròpia per festius.
 *
 * Evitem vermell perquè ja representa
 * "Baixa" dins dels tipus d'absència.
 */

.calendar-day-holiday {
    background:
        linear-gradient(
            180deg,
            #f4f8fa 0%,
            #f8fafb 100%
        ) !important;
}


.calendar-day-holiday
.calendar-day-number {
    color: #355b6a !important;
}


.calendar-holiday {

    border:
        1px solid
        rgba(65,103,119,.18) !important;

    background:
        rgba(65,103,119,.08) !important;
}


.calendar-holiday strong {
    color: #416777 !important;
}


.calendar-holiday span {
    color: #5b747e !important;
}


/*
 * Vista anual:
 * el festiu no és un punt de tipus.
 */

.year-day-holiday {
    background: #eef4f7 !important;

    color: #355b6a !important;

    box-shadow:
        inset 0 0 0 1px
        rgba(65,103,119,.12);
}


.year-holiday-mark {

    min-width: 11px !important;
    height: 11px !important;

    border-radius: 3px !important;

    background: #416777 !important;

    color: #fff !important;

    font-size: 5px !important;
    font-weight: 900 !important;
}


.year-holiday-legend {

    position: relative;

    width: 12px !important;
    height: 12px !important;

    border: 0 !important;

    border-radius: 3px !important;

    background: #416777 !important;
}


.year-holiday-legend::after {

    content: "F";

    position: absolute;

    inset: 0;

    display: grid;
    place-items: center;

    color: #fff;

    font-size: 6px;
    font-weight: 900;
}


/* =========================================================
   UI-R3-SUB-B2 · COBERTURES
   ========================================================= */

.substitution-page {
    width: 100%;
}


.substitution-summary-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0,1fr)
        );

    gap: 12px;

    margin-bottom: 14px;
}


.substitution-summary-card {

    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding:
        15px
        17px;

    border:
        1px solid #dce6e9;

    border-radius: 13px;

    background: #fff;
}


.substitution-summary-card span {
    color: #7c9097;

    font-size: 9px;
    font-weight: 800;
}


.substitution-summary-card strong {
    color: #29434d;

    font-size: 21px;
}


.substitution-summary-covered {
    border-color: #cbe5d5;
}


.substitution-summary-covered strong {
    color: #26764d;
}


.substitution-summary-uncovered {
    border-color: #ecd9bd;
}


.substitution-summary-uncovered strong {
    color: #a66e19;
}


.substitution-info {

    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 15px;

    padding:
        10px
        12px;

    border:
        1px solid #dce6e9;

    border-radius: 10px;

    background: #f7fafb;
}


.substitution-info strong {
    flex: 0 0 auto;

    color: #3d5c67;

    font-size: 9px;
}


.substitution-info span {
    color: #7d9097;

    font-size: 8px;
    line-height: 1.4;
}


.substitution-list {
    display: grid;

    gap: 12px;
}


.substitution-card {

    display: grid;

    grid-template-columns:
        minmax(250px, .75fr)
        minmax(0, 1.25fr);

    overflow: hidden;

    border:
        1px solid #dce6e9;

    border-radius: 14px;

    background: #fff;

    scroll-margin-top: 85px;
}


.substitution-absence {

    padding: 18px;

    border-right:
        1px solid #edf2f4;

    background:
        #fbfcfd;
}


.substitution-person {

    display: flex;
    align-items: center;

    gap: 9px;
}


.substitution-avatar {

    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 10px;

    background: #eaf2fa;

    color: var(--ceeb-blue);

    font-size: 9px;
    font-weight: 900;
}


.substitution-person > div {
    min-width: 0;

    display: grid;

    gap: 1px;
}


.substitution-person strong {
    color: #29434d;

    font-size: 11px;
}


.substitution-person span {
    color: #7b9097;

    font-size: 8px;
    font-weight: 750;
}


.substitution-person-small
.substitution-avatar {

    width: 30px;
    height: 30px;

    border-radius: 9px;

    font-size: 8px;
}


.substitution-period {

    margin-top: 12px;

    color: #506a73;

    font-size: 9px;
    font-weight: 800;
}


.substitution-department {

    position: relative;

    min-height: 22px;

    display: inline-flex;
    align-items: center;

    margin-top: 8px;

    padding:
        0
        8px
        0
        11px;

    overflow: hidden;

    border:
        1px solid
        color-mix(
            in srgb,
            var(--sub-department-color)
            25%,
            transparent
        );

    border-radius: 7px;

    background:
        color-mix(
            in srgb,
            var(--sub-department-color)
            8%,
            white
        );

    color:
        var(--sub-department-color);

    font-size: 8px;
    font-weight: 900;
}


.substitution-department::before {

    content: "";

    position: absolute;

    top: 4px;
    bottom: 4px;
    left: 4px;

    width: 2px;

    border-radius: 999px;

    background:
        var(--sub-department-color);
}


.substitution-coverage {
    padding: 18px;
}


.substitution-coverage-heading {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    margin-bottom: 12px;
}


.substitution-coverage-heading > div {

    display: grid;

    gap: 2px;
}


.substitution-coverage-heading small {

    color: #8a9ba1;

    font-size: 7px;
    font-weight: 850;

    text-transform: uppercase;

    letter-spacing: .06em;
}


.substitution-coverage-heading strong {

    font-size: 11px;
}


.substitution-covered {
    color: #28774e;
}


.substitution-uncovered {
    color: #a66d18;
}


.substitution-active-list {

    display: grid;

    gap: 8px;
}


.substitution-active-item {

    position: relative;

    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        auto
        auto;

    align-items: center;

    gap: 12px;

    padding:
        10px
        11px;

    border:
        1px solid #d8e9df;

    border-radius: 10px;

    background: #f4faf6;
}


.substitution-active-period {

    color: #657c84;

    font-size: 8px;
    font-weight: 800;
}


.substitution-note {

    grid-column:
        1 / -1;

    color: #7c9097;

    font-size: 8px;
}


.substitution-deactivate {

    min-height: 30px;

    padding:
        0
        9px;

    border:
        1px solid #ecc8cd;

    border-radius: 8px;

    background: #fff;

    color: #ad3948;

    cursor: pointer;

    font-family: inherit;

    font-size: 8px;
    font-weight: 850;
}


.substitution-history {

    margin-top: 11px;

    padding-top: 9px;

    border-top:
        1px solid #edf2f4;
}


.substitution-history summary {

    color: #71858d;

    cursor: pointer;

    font-size: 8px;
    font-weight: 850;
}


.substitution-history-list {

    display: grid;

    gap: 6px;

    margin-top: 8px;
}


.substitution-history-list > div {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding:
        7px
        9px;

    border-radius: 8px;

    background: #f5f7f8;

    color: #71858d;

    font-size: 8px;
}


.substitution-history-list strong {
    color: #5d737b;
}


.substitution-empty {

    padding: 48px;

    border:
        1px dashed #d5e1e4;

    border-radius: 14px;

    text-align: center;
}


.substitution-empty strong {

    color: #405b65;

    font-size: 12px;
}


.substitution-empty p {

    margin:
        6px
        0
        0;

    color: #83969d;

    font-size: 9px;
}


.substitution-modal-subject {

    margin:
        18px
        20px
        0;

    padding:
        11px
        12px;

    display: grid;

    gap: 2px;

    border:
        1px solid #dde7ea;

    border-radius: 10px;

    background: #f7fafb;
}


.substitution-modal-subject small {

    color: #87999f;

    font-size: 7px;
    font-weight: 850;

    text-transform: uppercase;
}


.substitution-modal-subject strong {

    color: #29434d;

    font-size: 11px;
}


.substitution-modal-subject span {

    color: #71868e;

    font-size: 8px;
}


.substitution-modal-help {

    margin-top: 13px;

    padding:
        9px
        10px;

    border-radius: 8px;

    background: #f5f8f9;

    color: #7b8f96;

    font-size: 8px;

    line-height: 1.45;
}


.substitution-deactivate-form {

    padding:
        18px
        20px
        20px;
}


.substitution-deactivate-form p {

    margin:
        0
        0
        18px;

    color: #657c84;

    font-size: 10px;

    line-height: 1.5;
}


@media (max-width: 1000px) {

    .substitution-summary-grid {

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


    .substitution-card {

        grid-template-columns: 1fr;
    }


    .substitution-absence {

        border-right: 0;

        border-bottom:
            1px solid #edf2f4;
    }

}


@media (max-width: 650px) {

    .substitution-summary-grid {

        grid-template-columns: 1fr;
    }


    .substitution-coverage-heading {

        align-items: flex-start;

        flex-direction: column;
    }


    .substitution-active-item {

        grid-template-columns: 1fr;
    }

}


/* =========================================================
   UI-R3-NAV1 · BREADCRUMB
   ========================================================= */

.app-breadcrumb {

    margin:
        0
        0
        9px;

    font-size: 9px;
}


.app-breadcrumb ol {

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 4px;

    margin: 0;
    padding: 0;

    list-style: none;
}


.app-breadcrumb li {

    display: inline-flex;
    align-items: center;

    gap: 4px;

    min-width: 0;
}


.app-breadcrumb a {

    color: #477181;

    font-weight: 800;

    text-decoration: none;

    transition:
        color .15s ease,
        background .15s ease;
}


.app-breadcrumb a:hover {

    color: var(--ceeb-blue);

    text-decoration: underline;

    text-underline-offset: 3px;
}


.app-breadcrumb li[aria-current="page"]
span {

    color: #8a9da4;

    font-weight: 750;
}


.app-breadcrumb-separator {

    width: 11px;
    height: 11px;

    flex: 0 0 auto;

    fill: none;
    stroke: #aebdc2;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


@media (max-width: 650px) {

    .app-breadcrumb {

        margin-bottom: 7px;

        font-size: 8px;
    }

}


/* =========================================================
   UI-R3-SKILL-B2 · PERFILS TÈCNICS
   ========================================================= */

.team-skills-page {
    width: 100%;
}


.team-skills-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}


.team-skills-catalog-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    padding: 10px 13px;
    border: 1px solid #e0e8ea;
    border-radius: 11px;
    background: #fff;
}


.team-skills-catalog-summary span {
    color: #91a1a6;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}


.team-skills-catalog-summary strong {
    color: #415d66;
    font-size: 10px;
}


.team-skills-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}


.team-skills-summary-card {
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid #e1e9eb;
    border-radius: 12px;
    background: #fff;
}


.team-skills-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: #84969d;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}


.team-skills-summary-card strong {
    color: #253f48;
    font-size: 21px;
    line-height: 1;
}


.team-skills-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 15px;
    align-items: start;
}


.team-skills-agents,
.team-skills-profile {
    border: 1px solid #e0e8ea;
    border-radius: 14px;
    background: #fff;
}


.team-skills-agents {
    position: sticky;
    top: 14px;
    overflow: hidden;
}


.team-skills-panel-title {
    padding: 13px 14px;
    border-bottom: 1px solid #e7edef;
}


.team-skills-panel-title span {
    display: block;
    color: #91a1a6;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}


.team-skills-panel-title strong {
    display: block;
    margin-top: 2px;
    color: #314e58;
    font-size: 13px;
}


.team-skills-agent-list {
    padding: 6px;
}


.team-skills-agent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition:
        background .15s ease,
        box-shadow .15s ease;
}


.team-skills-agent:hover {
    background: #f5f8f9;
}


.team-skills-agent.is-selected {
    background: rgba(23,107,120,.08);
    box-shadow:
        inset 3px 0 0
        #176b78;
}


.team-skills-avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #edf3f4;
    color: #45656f;
    font-size: 11px;
    font-weight: 900;
}


.team-skills-agent.is-selected
.team-skills-avatar {
    background: #176b78;
    color: #fff;
}


.team-skills-agent-copy {
    min-width: 0;
}


.team-skills-agent-copy strong,
.team-skills-agent-copy small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.team-skills-agent-copy strong {
    color: #304d56;
    font-size: 10px;
}


.team-skills-agent-copy small {
    margin-top: 2px;
    color: #91a1a6;
    font-size: 8px;
}


.team-skills-profile {
    overflow: hidden;
}


.team-skills-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 19px;
    border-bottom: 1px solid #e5edef;
}


.team-skills-profile-header span {
    display: block;
    color: #899ca3;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}


.team-skills-profile-header h2 {
    margin: 2px 0;
    color: #284650;
    font-size: 20px;
}


.team-skills-profile-header p {
    margin: 0;
    color: #83969d;
    font-size: 9px;
}


.team-skills-section {
    padding: 18px 19px;
    border-bottom: 1px solid #e8edef;
}


.team-skills-section:last-of-type {
    border-bottom: 0;
}


.team-skills-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}


.team-skills-section-heading span {
    display: block;
    color: #899ca3;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
}


.team-skills-section-heading h3 {
    margin: 2px 0 0;
    color: #304f59;
    font-size: 14px;
}


.team-skills-section-heading p {
    max-width: 330px;
    margin: 0;
    color: #82959b;
    font-size: 9px;
    line-height: 1.5;
    text-align: right;
}


.team-support-level-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}


.team-support-level-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 69px;
    padding: 11px;
    border: 1px solid #dfe8ea;
    border-radius: 11px;
    background: #fbfcfc;
    cursor: pointer;
}


.team-support-level-card:has(input:checked) {
    border-color: rgba(23,107,120,.35);
    background: rgba(23,107,120,.055);
}


.team-support-level-card input {
    position: absolute;
    top: 9px;
    right: 9px;
}


.team-support-level-code {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #eaf0f2;
    color: #4c6871;
    font-size: 11px;
    font-weight: 900;
}


.team-support-level-card:has(input:checked)
.team-support-level-code {
    background: #176b78;
    color: #fff;
}


.team-support-level-copy {
    min-width: 0;
    padding-right: 14px;
}


.team-support-level-copy strong,
.team-support-level-copy small {
    display: block;
}


.team-support-level-copy strong {
    color: #324f59;
    font-size: 10px;
}


.team-support-level-copy small {
    margin-top: 3px;
    color: #85979d;
    font-size: 8px;
    line-height: 1.35;
}


.team-skills-help {
    border: 0;
    background: transparent;
    color: #176b78;
    cursor: pointer;
    font-size: 8px;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 3px;
}


.team-skills-families {
    display: grid;
    gap: 12px;
}


.team-skill-family {
    overflow: hidden;
    border: 1px solid #e2eaec;
    border-radius: 12px;
}


.team-skill-family > header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 13px;
    border-bottom: 1px solid #e6edef;
    background: #f8fafb;
}


.team-skill-family > header h4 {
    margin: 0;
    color: #31505a;
    font-size: 11px;
}


.team-skill-family > header p {
    margin: 2px 0 0;
    color: #899a9f;
    font-size: 8px;
}


.team-skill-family > header > span {
    flex: 0 0 auto;
    color: #8c9da2;
    font-size: 8px;
}


.team-skill-table {
    display: grid;
}


.team-skill-row {
    display: grid;
    grid-template-columns:
        minmax(190px, 1.3fr)
        155px
        105px
        minmax(160px, .8fr);
    gap: 10px;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid #eef2f3;
}


.team-skill-row:last-child {
    border-bottom: 0;
}


.team-skill-name strong,
.team-skill-name small {
    display: block;
}


.team-skill-name strong {
    color: #334f58;
    font-size: 9px;
}


.team-skill-name small {
    margin-top: 2px;
    color: #91a0a5;
    font-size: 7.5px;
    line-height: 1.35;
}


.team-skill-level label,
.team-skill-note label {
    display: block;
}


.team-skill-level label > span,
.team-skill-note label > span {
    display: block;
    margin-bottom: 3px;
    color: #91a0a5;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}


.team-skill-level select,
.team-skill-note input {
    width: 100%;
    min-height: 34px;
    border: 1px solid #dbe5e7;
    border-radius: 8px;
    background: #fff;
    color: #425f68;
    font-size: 8px;
}


.team-skill-level select {
    padding: 0 8px;
}


.team-skill-note input {
    padding: 0 9px;
}


.team-skill-specialist {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #677e86;
    font-size: 8px;
    font-weight: 750;
    cursor: pointer;
}


.team-skill-specialist:has(input:checked) {
    color: #8a6411;
}


.team-skills-save-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 19px;
    border-top: 1px solid #dfe8ea;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
}


.team-skills-save-bar strong,
.team-skills-save-bar span {
    display: block;
}


.team-skills-save-bar strong {
    color: #324f59;
    font-size: 9px;
}


.team-skills-save-bar span {
    margin-top: 2px;
    color: #8c9ca1;
    font-size: 8px;
}


.team-skills-level-help {
    display: grid;
    gap: 8px;
    padding: 15px 17px 18px;
}


.team-skills-level-help > div {
    padding: 9px 10px;
    border: 1px solid #e2eaec;
    border-radius: 9px;
    background: #fafcfc;
}


.team-skills-level-help strong,
.team-skills-level-help span {
    display: block;
}


.team-skills-level-help strong {
    color: #33515a;
    font-size: 9px;
}


.team-skills-level-help span {
    margin-top: 2px;
    color: #87989e;
    font-size: 8px;
}


.team-skills-modal-body {
    padding: 16px 18px;
}


.team-skills-modal-body p {
    margin: 0;
    color: #536e76;
    font-size: 10px;
    line-height: 1.55;
}


.team-skills-modal-body
.team-skills-modal-note {
    margin-top: 9px;
    color: #8a9ba0;
    font-size: 8px;
}


.team-skills-empty {
    padding: 35px;
    color: #87999f;
    text-align: center;
    font-size: 10px;
}


.team-hub-card-skills
.team-hub-icon {
    background: rgba(23,107,120,.09);
    color: #176b78;
}


@media (max-width: 1050px) {

    .team-skill-row {
        grid-template-columns:
            minmax(180px, 1fr)
            145px
            100px;
    }


    .team-skill-note {
        grid-column: 1 / -1;
    }

}


@media (max-width: 850px) {

    .team-skills-summary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .team-skills-layout {
        grid-template-columns: 1fr;
    }


    .team-skills-agents {
        position: static;
    }


    .team-skills-agent-list {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .team-support-level-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 650px) {

    .team-skills-heading,
    .team-skills-profile-header,
    .team-skills-section-heading,
    .team-skills-save-bar {
        flex-direction: column;
        align-items: stretch;
    }


    .team-skills-catalog-summary {
        align-items: flex-start;
    }


    .team-skills-section-heading p {
        max-width: none;
        text-align: left;
    }


    .team-skills-agent-list {
        grid-template-columns: 1fr;
    }


    .team-skill-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }


    .team-skill-note {
        grid-column: auto;
    }

}


/* =========================================================
   UI-R3-SKILL-B2-R2 · UX
   ========================================================= */


/* ---------------------------------------------------------
   Competència sense nivell
   --------------------------------------------------------- */

.team-skill-row.is-unassigned
.team-skill-name {
    opacity: .72;
}


.team-skill-specialist.is-disabled,
.team-skill-note.is-disabled {
    opacity: .42;
}


.team-skill-specialist.is-disabled {
    cursor: not-allowed;
}


.team-skill-note.is-disabled input {
    background: #f4f6f7;
    color: #99a7ac;
    cursor: not-allowed;
}


/* ---------------------------------------------------------
   Famílies plegables
   --------------------------------------------------------- */

.team-skill-family > header.team-skill-family-toggle {
    position: relative;
    align-items: center;
    padding-right: 40px;
    cursor: pointer;
    user-select: none;
    transition:
        background .15s ease;
}


.team-skill-family > header.team-skill-family-toggle:hover {
    background: #f3f7f8;
}


.team-skill-family > header.team-skill-family-toggle:focus-visible {
    outline: 2px solid rgba(23,107,120,.28);
    outline-offset: -2px;
}


.team-skill-family > header.team-skill-family-toggle::after {
    content: "⌃";
    position: absolute;
    top: 50%;
    right: 13px;
    transform:
        translateY(-50%);
    color: #73898f;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    transition:
        transform .16s ease;
}


.team-skill-family.is-collapsed
> header.team-skill-family-toggle::after {
    transform:
        translateY(-50%)
        rotate(180deg);
}


.team-skill-family.is-collapsed
.team-skill-table {
    display: none;
}


.team-skill-family-summary {
    margin-left: auto;
    padding-right: 7px;
    color: #7d9197;
    font-size: 8px;
    font-weight: 750;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   Agent seleccionat
   --------------------------------------------------------- */

.team-skills-agent.is-selected {
    border:
        1px solid
        rgba(23,107,120,.14);
}


@media (max-width: 650px) {

    .team-skill-family > header.team-skill-family-toggle {
        align-items: flex-start;
        flex-direction: column;
        padding-right: 38px;
    }


    .team-skill-family-summary {
        margin-left: 0;
        padding-right: 0;
        white-space: normal;
    }

}


/* =========================================================
   UI-R3-SKILL-C1 · CATALOG
   ========================================================= */

.skill-catalog-page {
    width: 100%;
}


.skill-catalog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}


.skill-catalog-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}


.skill-catalog-summary article {
    padding: 13px 15px;
    border: 1px solid #e0e8ea;
    border-radius: 12px;
    background: #fff;
}


.skill-catalog-summary span {
    display: block;
    margin-bottom: 4px;
    color: #87999f;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}


.skill-catalog-summary strong {
    color: #294851;
    font-size: 17px;
}


.skill-catalog-layout {
    display: grid;
    grid-template-columns:
        255px minmax(0, 1fr);
    gap: 15px;
    align-items: start;
}


.skill-catalog-families,
.skill-catalog-detail {
    border: 1px solid #e0e8ea;
    border-radius: 14px;
    background: #fff;
}


.skill-catalog-families {
    position: sticky;
    top: 14px;
    overflow: hidden;
}


.skill-catalog-families > header {
    padding: 13px 14px;
    border-bottom: 1px solid #e6edef;
}


.skill-catalog-families > header span,
.skill-catalog-families > header strong {
    display: block;
}


.skill-catalog-families > header span {
    color: #8c9ca2;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
}


.skill-catalog-families > header strong {
    margin-top: 2px;
    color: #314f58;
    font-size: 13px;
}


.skill-family-list {
    padding: 6px;
}


.skill-family-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    padding: 8px 9px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}


.skill-family-item:hover {
    background: #f5f8f9;
}


.skill-family-item.is-selected {
    background: rgba(23,107,120,.08);
    box-shadow:
        inset 3px 0 0
        #176b78;
}


.skill-family-item.is-inactive {
    opacity: .58;
}


.skill-family-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: #eef3f4;
    color: #526d75;
    font-size: 10px;
    font-weight: 900;
}


.skill-family-item.is-selected
.skill-family-icon {
    background: #176b78;
    color: #fff;
}


.skill-family-copy {
    min-width: 0;
    flex: 1;
}


.skill-family-copy strong,
.skill-family-copy small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.skill-family-copy strong {
    color: #334f58;
    font-size: 9px;
}


.skill-family-copy small {
    margin-top: 2px;
    color: #8b9ba0;
    font-size: 7.5px;
}


.skill-state-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #edf1f2;
    color: #73878d;
    font-size: 7px;
    font-weight: 850;
    text-transform: uppercase;
}


.skill-catalog-detail {
    overflow: hidden;
}


.skill-catalog-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 18px;
    border-bottom: 1px solid #e4ecee;
}


.skill-catalog-detail-header span {
    display: block;
    color: #8a9ca2;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
}


.skill-catalog-detail-header h2 {
    margin: 2px 0;
    color: #294852;
    font-size: 20px;
}


.skill-catalog-detail-header p {
    margin: 0;
    color: #87999f;
    font-size: 9px;
}


.skill-catalog-header-actions {
    display: flex;
    gap: 7px;
}


.skill-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #e8edef;
    background: #fafcfc;
}


.skill-catalog-toolbar strong,
.skill-catalog-toolbar span {
    display: block;
}


.skill-catalog-toolbar strong {
    color: #34515a;
    font-size: 11px;
}


.skill-catalog-toolbar span {
    margin-top: 2px;
    color: #899a9f;
    font-size: 8px;
}


.skill-catalog-list {
    display: grid;
}


.skill-catalog-row {
    display: grid;
    grid-template-columns:
        minmax(240px, 1.4fr)
        minmax(235px, .8fr)
        auto;
    gap: 15px;
    align-items: center;
    padding: 12px 17px;
    border-bottom: 1px solid #edf2f3;
}


.skill-catalog-row:last-child {
    border-bottom: 0;
}


.skill-catalog-row.is-inactive {
    background: #fafbfb;
    opacity: .64;
}


.skill-catalog-row-main > div {
    display: flex;
    align-items: center;
    gap: 8px;
}


.skill-catalog-row-main strong {
    color: #314f58;
    font-size: 10px;
}


.skill-code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eff3f4;
    color: #71878e;
    font-size: 7px;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;
}


.skill-catalog-row-main p {
    margin: 4px 0 0;
    color: #899ba0;
    font-size: 8px;
    line-height: 1.4;
}


.skill-catalog-row-meta {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 7px;
}


.skill-catalog-row-meta span {
    padding: 7px 8px;
    border: 1px solid #e5ecee;
    border-radius: 8px;
    color: #8a9ba0;
    font-size: 7px;
    text-align: center;
}


.skill-catalog-row-meta strong {
    display: block;
    margin-top: 2px;
    color: #405e67;
    font-size: 10px;
}


.skill-catalog-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}


.skill-action-button {
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid #dbe5e7;
    border-radius: 8px;
    background: #fff;
    color: #4b6871;
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
}


.skill-action-button:hover {
    border-color: rgba(23,107,120,.28);
    color: #176b78;
}


.skill-catalog-form {
    display: grid;
    gap: 12px;
    padding: 16px 18px 18px;
}


.skill-catalog-form label {
    display: block;
}


.skill-catalog-form label > span {
    display: block;
    margin-bottom: 4px;
    color: #617980;
    font-size: 8px;
    font-weight: 850;
}


.skill-catalog-form label > small {
    display: block;
    margin-top: 4px;
    color: #8c9ca1;
    font-size: 7px;
}


.skill-catalog-form input,
.skill-catalog-form textarea,
.skill-catalog-form select {
    width: 100%;
    border: 1px solid #dbe5e7;
    border-radius: 9px;
    background: #fff;
    color: #38565f;
    font-size: 9px;
}


.skill-catalog-form input,
.skill-catalog-form select {
    min-height: 38px;
    padding: 0 10px;
}


.skill-catalog-form textarea {
    padding: 9px 10px;
    resize: vertical;
}


.skill-toggle-body {
    padding: 16px 18px;
}


.skill-toggle-body p {
    margin: 0;
    color: #506c75;
    font-size: 10px;
    line-height: 1.5;
}


.skill-toggle-body
.skill-toggle-note {
    margin-top: 8px;
    color: #899ba0;
    font-size: 8px;
}


.skill-catalog-empty,
.skill-catalog-empty-small {
    color: #85979d;
    text-align: center;
}


.skill-catalog-empty {
    padding: 40px 25px;
}


.skill-catalog-empty strong,
.skill-catalog-empty span {
    display: block;
}


.skill-catalog-empty strong {
    color: #4d6972;
    font-size: 11px;
}


.skill-catalog-empty span {
    margin-top: 4px;
    font-size: 8px;
}


.skill-catalog-empty-small {
    padding: 20px 10px;
    font-size: 8px;
}


@media (max-width: 1050px) {

    .skill-catalog-row {
        grid-template-columns:
            minmax(220px, 1fr)
            auto;
    }


    .skill-catalog-row-meta {
        grid-column: 1 / -1;
        grid-row: 2;
    }

}


@media (max-width: 850px) {

    .skill-catalog-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .skill-catalog-layout {
        grid-template-columns: 1fr;
    }


    .skill-catalog-families {
        position: static;
    }


    .skill-family-list {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .skill-catalog-heading,
    .skill-catalog-detail-header,
    .skill-catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }


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


    .skill-family-list {
        grid-template-columns: 1fr;
    }


    .skill-catalog-row {
        grid-template-columns: 1fr;
    }


    .skill-catalog-row-meta {
        grid-column: auto;
        grid-row: auto;
    }


    .skill-catalog-row-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }


    .skill-catalog-header-actions {
        flex-wrap: wrap;
    }

}


/* =========================================================
   UI-R3-SKILL-D1 · DEPARTMENTS
   ========================================================= */

.skill-department-filter {
    display: grid;
    grid-template-columns:
        auto minmax(240px, 340px) 1fr;
    gap: 18px;
    align-items: center;
    margin: 17px 0;
    padding: 13px 15px;
    border: 1px solid #dde7e9;
    border-radius: 12px;
    background: #fff;
}


.skill-department-filter > div span,
.skill-department-filter > div strong {
    display: block;
}


.skill-department-filter > div span {
    color: #8b9da3;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}


.skill-department-filter > div strong {
    margin-top: 2px;
    color: #2f4e58;
    font-size: 12px;
}


.skill-department-filter form {
    margin: 0;
}


.skill-department-filter label > span {
    display: block;
    margin-bottom: 4px;
    color: #84979d;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}


.skill-department-filter select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #d8e4e6;
    border-radius: 9px;
    background: #fff;
    color: #36555e;
    font-size: 9px;
    font-weight: 750;
}


.skill-department-filter p {
    margin: 0;
    color: #84969c;
    font-size: 8px;
    line-height: 1.45;
}


@media (max-width: 850px) {

    .skill-department-filter {
        grid-template-columns: 1fr;
        gap: 10px;
    }

}


/* =========================================================
   UI-R3-SKILL-D1-R2 · COMPACT DEPARTMENT
   ========================================================= */

.skill-department-filter-r2 {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    margin: 14px 0;
    padding: 9px 12px;
}


.skill-department-filter-context {
    flex: 0 0 auto;
    min-width: 92px;
}


.skill-department-filter-context span,
.skill-department-filter-context strong {
    display: block;
}


.skill-department-filter-context span {
    color: #8a9ca2;
    font-size: 7px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}


.skill-department-filter-context strong {
    margin-top: 1px;
    color: #314f58;
    font-size: 10px;
}


.skill-department-filter-form {
    flex: 0 0 245px;
}


.skill-department-filter-form label {
    display: block;
}


.skill-department-filter-form select {
    width: 100%;
    min-height: 34px;
    padding: 0 30px 0 10px;
    border: 1px solid #d9e4e6;
    border-radius: 8px;
    background: #fff;
    color: #36545e;
    font-size: 8.5px;
    font-weight: 750;
}


.skill-department-filter-help {
    flex: 1;
    margin: 0 0 0 3px;
    color: #87999f;
    font-size: 7.5px;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   Department badges
   --------------------------------------------------------- */

.skill-department-badge {
    --department-color: #176B78;

    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 9px;
    flex: 0 0 auto;
    border:
        1px solid
        color-mix(
            in srgb,
            var(--department-color) 24%,
            #ffffff
        );
    border-radius: 999px;
    background:
        color-mix(
            in srgb,
            var(--department-color) 8%,
            #ffffff
        );
    color:
        color-mix(
            in srgb,
            var(--department-color) 74%,
            #1f3c45
        );
    font-size: 8px;
    font-weight: 850;
    white-space: nowrap;
}


.skill-department-badge-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background:
        var(--department-color);
    box-shadow:
        0 0 0 3px
        color-mix(
            in srgb,
            var(--department-color) 12%,
            transparent
        );
}


.skill-department-badge-small {
    min-height: 23px;
    padding: 0 7px;
    gap: 5px;
    font-size: 7px;
}


.skill-department-badge-small
.skill-department-badge-dot {
    width: 6px;
    height: 6px;
}


/* ---------------------------------------------------------
   Family title + badges
   --------------------------------------------------------- */

.skill-family-title-line {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}


.skill-family-title-line h2 {
    margin: 2px 0;
}


.skill-family-department-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}


/* ---------------------------------------------------------
   Override D1 large selector
   --------------------------------------------------------- */

.skill-department-filter.skill-department-filter-r2 {
    grid-template-columns: none;
}


.skill-department-filter-r2
.skill-department-filter-form label > span {
    display: none;
}


@media (max-width: 850px) {

    .skill-department-filter-r2 {
        display: grid;
        grid-template-columns:
            auto minmax(0, 1fr);
        gap: 8px 10px;
    }


    .skill-department-filter-form {
        flex: auto;
        width: 100%;
    }


    .skill-department-filter-help {
        grid-column: 1 / -1;
        margin-left: 0;
    }

}


@media (max-width: 560px) {

    .skill-department-filter-r2 {
        grid-template-columns: 1fr;
    }


    .skill-department-badge {
        width: fit-content;
    }


    .skill-department-filter-help {
        grid-column: auto;
    }

}


/* =========================================================
   UI-R3-SKILL-D1-R2-BADGEFIX
   ========================================================= */

.skill-department-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 9px;
    line-height: 1;
    vertical-align: middle;
}


.skill-department-badge-dot {
    display: block;
    width: 6px;
    height: 6px;
    min-width: 6px;
    min-height: 6px;
    margin: 0;
    padding: 0;
    flex: 0 0 6px;
    align-self: center;
    border-radius: 50%;
    background: var(--department-color);
    box-shadow: none;
    line-height: 0;
}


.skill-department-badge-small {
    min-height: 22px;
    padding: 0 7px;
    gap: 5px;
    line-height: 1;
}


.skill-department-badge-small
.skill-department-badge-dot {
    width: 5px;
    height: 5px;
    min-width: 5px;
    min-height: 5px;
    flex-basis: 5px;
}


.skill-family-department-badges {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    line-height: 1;
}


.skill-family-title-line {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    line-height: 1.2;
}


/* =========================================================
   UI-R3-SKILL-D1-R2-BADGEFIX-R2
   Badges dins de skill-catalog-detail-header
   ========================================================= */

/*
 * La regla genèrica:
 *
 * .skill-catalog-detail-header span {
 *     display: block;
 * }
 *
 * té més especificitat que .skill-department-badge
 * i trenca el flex intern del badge.
 */

.skill-catalog-detail-header
.skill-family-department-badges {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    line-height: 1;
}


.skill-catalog-detail-header
.skill-family-department-badges
.skill-department-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 22px;
    padding: 0 7px;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}


.skill-catalog-detail-header
.skill-family-department-badges
.skill-department-badge-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    min-width: 5px;
    min-height: 5px;
    flex: 0 0 5px;
    margin: 0;
    padding: 0;
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    align-self: center;
    border-radius: 50%;
    background: var(--department-color);
    box-shadow: none;
    font-size: 0;
    line-height: 0;
}


.skill-catalog-detail-header
.skill-family-department-badges
.skill-department-badge:not(.skill-department-badge-dot) {
    text-transform: none;
}


/*
 * També assegurem que el contenidor del títol
 * mantingui títol i badges alineats.
 */

.skill-catalog-detail-header
.skill-family-title-line {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}


.skill-catalog-detail-header
.skill-family-title-line h2 {
    margin: 2px 0;
    line-height: 1.15;
}


/* =========================================================
   UI-R3-SKILL-D1-R3 · DEPARTMENT OPTIONS
   ========================================================= */

.skill-family-department-fieldset {
    margin: 2px 0;
    padding: 12px;
    border: 1px solid #dfe8ea;
    border-radius: 10px;
    background: #fafcfc;
}


.skill-family-department-fieldset legend {
    padding: 0 5px;
    color: #506b74;
    font-size: 8px;
    font-weight: 850;
}


.skill-family-department-fieldset > p {
    margin: 0 0 9px;
    color: #84969c;
    font-size: 7.5px;
    line-height: 1.45;
}


.skill-family-department-options {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 7px;
}


.skill-family-department-option {
    --department-color: #176B78;

    position: relative;
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid #dfe7e9;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition:
        border-color .15s ease,
        background .15s ease;
}


.skill-family-department-option:hover {
    border-color:
        color-mix(
            in srgb,
            var(--department-color) 30%,
            #dfe7e9
        );
}


.skill-family-department-option:has(input:checked) {
    border-color:
        color-mix(
            in srgb,
            var(--department-color) 38%,
            #ffffff
        );

    background:
        color-mix(
            in srgb,
            var(--department-color) 7%,
            #ffffff
        );
}


.skill-family-department-option input {
    position: absolute;
    top: 8px;
    right: 8px;
    width: auto;
    min-height: 0;
}


.skill-family-department-option-dot {
    display: block;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--department-color);
}


.skill-family-department-option-copy {
    min-width: 0;
    padding-right: 17px;
}


.skill-family-department-option-copy strong,
.skill-family-department-option-copy small {
    display: block;
}


.skill-family-department-option-copy strong {
    color: #35525b;
    font-size: 8.5px;
}


.skill-family-department-option-copy small {
    margin-top: 2px;
    color: #8b9ca1;
    font-size: 7px;
}


@media (max-width: 650px) {

    .skill-family-department-options {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2 · RECOMMENDATIONS
   ========================================================= */

.substitution-recommendations {
    margin: 4px 0 14px;
    padding: 12px;
    border: 1px solid #dfe8ea;
    border-radius: 12px;
    background: #f8fafb;
}


.substitution-recommendations-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}


.substitution-recommendations-heading span,
.substitution-recommendations-heading strong {
    display: block;
}


.substitution-recommendations-heading span {
    color: #83969c;
    font-size: 7px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .05em;
}


.substitution-recommendations-heading strong {
    margin-top: 2px;
    color: #2f4e58;
    font-size: 11px;
}


.substitution-recommendations-heading small {
    max-width: 230px;
    color: #8b9ca1;
    font-size: 7.5px;
    line-height: 1.35;
    text-align: right;
}


.substitution-recommendation-list {
    display: grid;
    gap: 7px;
}


.substitution-recommendation-card {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #dde7e9;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}


.substitution-recommendation-card:not(:disabled):hover {
    border-color: rgba(23,107,120,.30);
    transform: translateY(-1px);
}


.substitution-recommendation-card.is-selected {
    border-color: #176b78;
    background: rgba(23,107,120,.055);
    box-shadow:
        inset 3px 0 0
        #176b78;
}


.substitution-recommendation-card:disabled {
    cursor: not-allowed;
    opacity: .62;
}


.substitution-recommendation-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


.substitution-recommendation-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}


.substitution-recommendation-rank {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    border-radius: 8px;
    background: #edf3f4;
    color: #4b6972;
    font-size: 8px;
    font-weight: 900;
}


.substitution-recommendation-identity strong,
.substitution-recommendation-identity small {
    display: block;
}


.substitution-recommendation-identity strong {
    color: #304e58;
    font-size: 9px;
}


.substitution-recommendation-identity small {
    margin-top: 2px;
    color: #899ba0;
    font-size: 7px;
}


.substitution-recommendation-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #edf2f3;
    color: #617981;
    font-size: 7px;
    font-weight: 850;
}


.substitution-recommendation-card.is-excellent
.substitution-recommendation-badge {
    background: #e9f6ef;
    color: #28704a;
}


.substitution-recommendation-card.is-good
.substitution-recommendation-badge {
    background: #edf6f7;
    color: #176b78;
}


.substitution-recommendation-card.is-partial
.substitution-recommendation-badge {
    background: #fff5df;
    color: #9b6815;
}


.substitution-recommendation-card.is-low
.substitution-recommendation-badge,
.substitution-recommendation-card.is-unavailable
.substitution-recommendation-badge,
.substitution-recommendation-card.is-not_eligible
.substitution-recommendation-badge {
    background: #fbecec;
    color: #985151;
}


.substitution-recommendation-score {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    margin-top: 8px;
}


.substitution-recommendation-score > span:first-child {
    color: #748990;
    font-size: 7px;
    font-weight: 750;
}


.substitution-recommendation-bar {
    position: relative;
    display: block;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eeef;
}


.substitution-recommendation-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #176b78;
}


.substitution-recommendation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}


.substitution-recommendation-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 6px;
    border: 1px solid #e1e9eb;
    border-radius: 999px;
    background: #fafcfc;
    color: #647c84;
    font-size: 6.8px;
    font-weight: 750;
}


.substitution-recommendation-reason {
    margin: 7px 0 0;
    color: #83969c;
    font-size: 7.2px;
    line-height: 1.4;
}


.substitution-recommendation-empty {
    padding: 15px;
    border: 1px dashed #dce5e7;
    border-radius: 9px;
    color: #87999f;
    font-size: 8px;
    text-align: center;
}


@media (max-width: 650px) {

    .substitution-recommendations-heading {
        flex-direction: column;
    }


    .substitution-recommendations-heading small {
        max-width: none;
        text-align: left;
    }


    .substitution-recommendation-score {
        grid-template-columns: 1fr;
        gap: 4px;
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2-R1 · PROFESSIONAL MODAL
   ========================================================= */


/* ---------------------------------------------------------
   Amplada i estructura general
   --------------------------------------------------------- */

[data-substitution-modal]
.app-modal-panel {
    width: min(1080px, calc(100vw - 40px));
    max-width: 1080px;
    max-height: calc(100vh - 32px);
    overflow: hidden;
}


[data-substitution-modal]
.app-modal-header {
    padding: 18px 24px;
}


[data-substitution-modal]
.request-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 24px 0;
    overflow-y: auto;
    overflow-x: hidden;
}


/* ---------------------------------------------------------
   Agent absent
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-modal-subject {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "label label"
        "name department";
    column-gap: 12px;
    row-gap: 3px;
    align-items: center;
    min-height: 66px;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid #dce6e8;
    border-radius: 11px;
    background: #f8fafb;
}


[data-substitution-modal]
.substitution-modal-subject small {
    grid-area: label;
    margin: 0;
    color: #83969c;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}


[data-substitution-modal]
.substitution-modal-subject strong {
    grid-area: name;
    color: #294953;
    font-size: 10px;
}


[data-substitution-modal]
.substitution-modal-subject
[data-substitution-department-name] {
    grid-area: department;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid #dce6e8;
    border-radius: 999px;
    background: #fff;
    color: #607a82;
    font-size: 7px;
    font-weight: 750;
}


/* ---------------------------------------------------------
   Recomanacions
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendations {
    margin: 0;
    padding: 14px;
    border-radius: 12px;
}


[data-substitution-modal]
.substitution-recommendations-heading {
    align-items: center;
    margin-bottom: 12px;
}


[data-substitution-modal]
.substitution-recommendations-heading strong {
    font-size: 12px;
}


[data-substitution-modal]
.substitution-recommendations-heading small {
    max-width: 320px;
}


[data-substitution-modal]
.substitution-recommendation-list {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 9px;
    align-items: stretch;
}


[data-substitution-modal]
.substitution-recommendation-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 158px;
    padding: 11px;
}


[data-substitution-modal]
.substitution-recommendation-top {
    align-items: flex-start;
}


[data-substitution-modal]
.substitution-recommendation-identity {
    min-width: 0;
}


[data-substitution-modal]
.substitution-recommendation-identity > div {
    min-width: 0;
}


[data-substitution-modal]
.substitution-recommendation-identity strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


[data-substitution-modal]
.substitution-recommendation-score {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 10px;
}


[data-substitution-modal]
.substitution-recommendation-bar {
    height: 4px;
}


[data-substitution-modal]
.substitution-recommendation-bar.is-pending {
    background:
        repeating-linear-gradient(
            90deg,
            #e3eaec 0,
            #e3eaec 6px,
            #f7f9fa 6px,
            #f7f9fa 11px
        );
}


[data-substitution-modal]
.substitution-recommendation-meta {
    margin-top: 8px;
}


[data-substitution-modal]
.substitution-recommendation-reason {
    margin-top: auto;
    padding-top: 8px;
}


/* ---------------------------------------------------------
   Assignació manual
   --------------------------------------------------------- */

[data-substitution-modal]
.request-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 14px;
    border: 1px solid #dfe8ea;
    border-radius: 12px;
    background: #fff;
}


[data-substitution-modal]
.request-form-grid::before {
    content: "Assignació manual";
    grid-column: 1 / -1;
    display: block;
    margin-bottom: -2px;
    color: #34545d;
    font-size: 10px;
    font-weight: 850;
}


[data-substitution-modal]
.request-form-grid
.request-field {
    min-width: 0;
    margin: 0;
}


[data-substitution-modal]
.request-form-grid
.request-field > span {
    display: block;
    margin-bottom: 5px;
    color: #587078;
    font-size: 7.5px;
    font-weight: 800;
}


/*
 * Abans Substitut i Àmbit eren request-field-wide.
 * En escriptori els posem un al costat de l'altre.
 */

[data-substitution-modal]
.request-form-grid
.request-field-wide:has(
    select[name="substitute_user_id"]
) {
    grid-column: auto;
}


[data-substitution-modal]
.request-form-grid
.request-field-wide:has(
    select[name="scope"]
) {
    grid-column: auto;
}


/*
 * Nota continua ocupant tota l'amplada.
 */

[data-substitution-modal]
.request-form-grid
.request-field-wide:has(
    textarea[name="note"]
) {
    grid-column: 1 / -1;
}


[data-substitution-modal]
.request-form-grid select,
[data-substitution-modal]
.request-form-grid input,
[data-substitution-modal]
.request-form-grid textarea {
    width: 100%;
    box-sizing: border-box;
}


[data-substitution-modal]
.request-form-grid select,
[data-substitution-modal]
.request-form-grid input[type="datetime-local"] {
    min-height: 44px;
}


[data-substitution-modal]
.request-form-grid textarea {
    min-height: 78px;
    resize: vertical;
}


/* ---------------------------------------------------------
   Help + footer
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-modal-help {
    margin: 0;
    padding: 9px 12px;
    border-radius: 8px;
    background: #f4f7f8;
    color: #788d94;
    font-size: 7.5px;
    line-height: 1.45;
}


[data-substitution-modal]
.app-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 0 -24px;
    padding: 14px 24px;
    border-top: 1px solid #e3eaec;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 900px) {

    [data-substitution-modal]
    .app-modal-panel {
        width: min(760px, calc(100vw - 24px));
    }


    [data-substitution-modal]
    .substitution-recommendation-list {
        grid-template-columns: 1fr;
    }


    [data-substitution-modal]
    .substitution-recommendation-card {
        min-height: auto;
    }

}


@media (max-width: 620px) {

    [data-substitution-modal]
    .request-form-grid {
        grid-template-columns: 1fr;
    }


    [data-substitution-modal]
    .request-form-grid
    .request-field,
    [data-substitution-modal]
    .request-form-grid
    .request-field-wide {
        grid-column: 1 / -1 !important;
    }


    [data-substitution-modal]
    .substitution-modal-subject {
        grid-template-columns: 1fr;
        grid-template-areas:
            "label"
            "name"
            "department";
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2-R2 · VISUAL HIERARCHY
   ========================================================= */


/* ---------------------------------------------------------
   Department badge
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-modal-subject
[data-substitution-department-name] {

    --department-color: #15509F;

    position: relative;

    display: inline-flex;

    align-items: center;

    gap: 6px;

    min-height: 24px;

    padding: 0 9px;

    border:
        1px solid
        color-mix(
            in srgb,
            var(--department-color) 25%,
            #ffffff
        );

    border-radius: 999px;

    background:
        color-mix(
            in srgb,
            var(--department-color) 8%,
            #ffffff
        );

    color:
        color-mix(
            in srgb,
            var(--department-color) 75%,
            #294953
        );

    font-weight: 800;
}


[data-substitution-modal]
.substitution-modal-subject
[data-substitution-department-name]::before {

    content: "";

    display: block;

    width: 6px;

    height: 6px;

    flex: 0 0 6px;

    border-radius: 50%;

    background:
        var(--department-color);
}


/* ---------------------------------------------------------
   Base candidate card
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card {

    --candidate-accent: #789097;
    --candidate-soft: #f3f6f7;

    position: relative;

    overflow: hidden;

    border-left:
        4px solid
        var(--candidate-accent);

    background:
        linear-gradient(
            180deg,
            var(--candidate-soft) 0,
            #ffffff 52px
        );
}


/*
 * L'accent indica adequació tècnica,
 * no simplement posició visual.
 */

[data-substitution-modal]
.substitution-recommendation-card.is-excellent {

    --candidate-accent: #2f8a5e;
    --candidate-soft: #edf8f2;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good {

    --candidate-accent: #178092;
    --candidate-soft: #eef8f9;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial {

    --candidate-accent: #c48a27;
    --candidate-soft: #fff8e9;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low {

    --candidate-accent: #b75b5b;
    --candidate-soft: #fcf1f1;
}


[data-substitution-modal]
.substitution-recommendation-card.is-profile_pending {

    --candidate-accent: #78939b;
    --candidate-soft: #f3f7f8;
}


[data-substitution-modal]
.substitution-recommendation-card.is-unavailable,
[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible {

    --candidate-accent: #aab7bb;
    --candidate-soft: #f6f8f8;
}


/* ---------------------------------------------------------
   Ranking token
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-rank {

    border:
        1px solid
        color-mix(
            in srgb,
            var(--candidate-accent) 22%,
            #ffffff
        );

    background:
        color-mix(
            in srgb,
            var(--candidate-accent) 10%,
            #ffffff
        );

    color:
        var(--candidate-accent);
}


/* ---------------------------------------------------------
   Recommendation badge
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-badge {

    border:
        1px solid
        color-mix(
            in srgb,
            var(--candidate-accent) 18%,
            transparent
        );

    background:
        color-mix(
            in srgb,
            var(--candidate-accent) 10%,
            #ffffff
        );

    color:
        var(--candidate-accent);
}


/* ---------------------------------------------------------
   Score line
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-bar > span {

    background:
        var(--candidate-accent);
}


/*
 * Perfil pendent:
 * patró neutral perquè no sembli
 * una puntuació real.
 */

[data-substitution-modal]
.substitution-recommendation-card.is-profile_pending
.substitution-recommendation-bar {

    background:
        repeating-linear-gradient(
            90deg,
            #dfe7e9 0,
            #dfe7e9 7px,
            #f7f9fa 7px,
            #f7f9fa 12px
        );
}


/* ---------------------------------------------------------
   Selected candidate
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-selected {

    border-color:
        var(--candidate-accent);

    border-left-color:
        var(--candidate-accent);

    box-shadow:
        0 0 0 2px
        color-mix(
            in srgb,
            var(--candidate-accent) 15%,
            transparent
        ),
        0 8px 22px
        rgba(32,58,66,.08);
}


/* ---------------------------------------------------------
   Eligible candidate hover
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card:not(:disabled):hover {

    border-color:
        color-mix(
            in srgb,
            var(--candidate-accent) 48%,
            #dfe7e9
        );

    border-left-color:
        var(--candidate-accent);
}


/* ---------------------------------------------------------
   Agent name emphasis
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-identity strong {

    color: #294953;

    font-weight: 850;
}


/* ---------------------------------------------------------
   Disabled / not eligible
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible {

    opacity: .62;

    filter: saturate(.72);
}


/* ---------------------------------------------------------
   Future technical levels
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-meta span {

    border-color:
        color-mix(
            in srgb,
            var(--candidate-accent) 15%,
            #e1e9eb
        );

    background:
        color-mix(
            in srgb,
            var(--candidate-accent) 5%,
            #ffffff
        );
}



/* =========================================================
   UI-R3-SUB-B2-R2-R3 · MODAL BOTTOM POLISH
   ========================================================= */


/*
 * El cos del modal necessita aire abans del footer sticky.
 */

[data-substitution-modal]
.request-form {
    padding-bottom: 96px;
}


/*
 * La nota ha de respirar visualment i no quedar
 * enganxada al límit inferior.
 */

[data-substitution-modal]
.request-form-grid
.request-field-wide:has(
    textarea[name="note"]
) {
    margin-top: 2px;
    padding-bottom: 2px;
}


[data-substitution-modal]
.request-form-grid
textarea[name="note"] {
    min-height: 92px;
    padding: 12px 13px;
    line-height: 1.45;
}


/*
 * Bloc d'ajuda separat de la graella manual.
 */

[data-substitution-modal]
.substitution-modal-help {
    margin-top: 2px;
    margin-bottom: 4px;
    padding: 10px 12px;
    border: 1px solid #e4ebed;
}


/*
 * Footer més net i amb separació visual.
 */

[data-substitution-modal]
.app-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;

    margin: 0 -24px -1px;

    padding:
        15px
        24px
        17px;

    border-top:
        1px solid #dde6e8;

    background:
        rgba(
            255,
            255,
            255,
            .98
        );

    box-shadow:
        0 -10px 24px
        rgba(
            38,
            65,
            74,
            .055
        );

    backdrop-filter:
        blur(10px);
}


/*
 * Evitem que l'últim camp quedi visualment
 * per sota del footer.
 */

[data-substitution-modal]
.request-form-grid {
    margin-bottom: 2px;
}


/*
 * Scroll una mica més fi i discret.
 */

[data-substitution-modal]
.request-form {
    scrollbar-width: thin;
    scrollbar-color:
        #c8d4d7
        transparent;
}


[data-substitution-modal]
.request-form::-webkit-scrollbar {
    width: 8px;
}


[data-substitution-modal]
.request-form::-webkit-scrollbar-track {
    background: transparent;
}


[data-substitution-modal]
.request-form::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c8d4d7;
}


/*
 * En pantalles petites deixem una mica menys
 * d'espai reservat al footer.
 */

@media (max-width: 620px) {

    [data-substitution-modal]
    .request-form {
        padding-bottom: 84px;
    }


    [data-substitution-modal]
    .app-modal-actions {
        padding:
            13px
            18px
            15px;
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2-R4 · FINAL BOTTOM SPACING
   ========================================================= */


/*
 * Més espai real al final del contingut.
 */

[data-substitution-modal]
.request-form {
    padding-bottom: 150px !important;
}


/*
 * La graella manual necessita una mica més
 * d'aire a la part inferior.
 */

[data-substitution-modal]
.request-form-grid {
    padding-bottom: 22px;
}


/*
 * Nota amb separació clara respecte al final
 * de la secció.
 */

[data-substitution-modal]
.request-form-grid
.request-field-wide:has(
    textarea[name="note"]
) {
    margin-top: 4px;
    margin-bottom: 18px;
    padding-bottom: 0;
}


[data-substitution-modal]
.request-form-grid
textarea[name="note"] {
    min-height: 96px;
    margin-bottom: 0;
}


/*
 * Si apareix el text d'ajuda després del formulari,
 * també deixem espai abans del footer.
 */

[data-substitution-modal]
.substitution-modal-help {
    margin-top: 8px;
    margin-bottom: 22px;
}


/*
 * Footer amb més aire vertical.
 */

[data-substitution-modal]
.app-modal-actions {
    min-height: 74px;

    padding:
        16px
        24px
        18px !important;

    margin-top: 8px;
}


/*
 * Evitem que l'últim element visual quedi
 * enganxat al límit inferior del modal.
 */

[data-substitution-modal]
.request-form > :last-child {
    margin-bottom: 18px;
}


/*
 * En pantalles petites mantenim separació,
 * però sense exagerar.
 */

@media (max-width: 620px) {

    [data-substitution-modal]
    .request-form {
        padding-bottom: 120px !important;
    }


    [data-substitution-modal]
    .request-form-grid
    .request-field-wide:has(
        textarea[name="note"]
    ) {
        margin-bottom: 14px;
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2-R5 · DEFINITIVE MODAL LAYOUT
   ========================================================= */


/*
 * El panell es converteix en un layout de dues files:
 *
 * 1. capçalera fixa
 * 2. formulari amb scroll intern
 *
 * Això evita que el contingut quedi tallat per sota.
 */

[data-substitution-modal]
.app-modal-panel {

    display: grid;

    grid-template-rows:
        auto
        minmax(0, 1fr);

    width:
        min(
            1080px,
            calc(100vw - 40px)
        );

    max-width: 1080px;

    max-height:
        calc(
            100vh
            - 40px
        );

    overflow: hidden;
}


/*
 * Header sempre visible.
 */

[data-substitution-modal]
.app-modal-header {

    position: relative;

    z-index: 5;

    flex: 0 0 auto;

    background: #ffffff;
}


/*
 * El formulari és ara el contenidor scrollable real.
 */

[data-substitution-modal]
.request-form {

    min-height: 0;

    height: 100%;

    overflow-y: auto;

    overflow-x: hidden;

    display: flex;

    flex-direction: column;

    gap: 18px;

    padding:
        18px
        24px
        0 !important;
}


/*
 * Eliminem els paddings artificials dels R3/R4.
 * Ja no són necessaris perquè el scroll ara funciona bé.
 */

[data-substitution-modal]
.request-form {
    padding-bottom: 0 !important;
}


/*
 * La graella manual respira per si mateixa.
 */

[data-substitution-modal]
.request-form-grid {

    flex: 0 0 auto;

    margin: 0;

    padding:
        15px
        15px
        20px;
}


/*
 * Nota completament integrada dins la graella.
 */

[data-substitution-modal]
.request-form-grid
.request-field-wide:has(
    textarea[name="note"]
) {

    margin-top: 4px;

    margin-bottom: 0;

    padding-bottom: 0;
}


[data-substitution-modal]
.request-form-grid
textarea[name="note"] {

    min-height: 96px;

    margin: 0;

    padding:
        12px
        13px;

    resize: vertical;
}


/*
 * Ajuda separada de la nota.
 */

[data-substitution-modal]
.substitution-modal-help {

    flex: 0 0 auto;

    margin:
        -2px
        0
        0;

    padding:
        10px
        12px;
}


/*
 * Footer sticky dins del contenidor scrollable.
 *
 * Sempre serà visible quan arribem a la part inferior
 * i no quedarà enganxat al textarea.
 */

[data-substitution-modal]
.app-modal-actions {

    position: sticky;

    bottom: 0;

    z-index: 20;

    display: flex;

    justify-content: flex-end;

    gap: 10px;

    flex: 0 0 auto;

    min-height: auto;

    margin:
        0
        -24px;

    padding:
        16px
        24px
        18px !important;

    border-top:
        1px solid #dde6e8;

    background:
        rgba(
            255,
            255,
            255,
            .98
        );

    box-shadow:
        0
        -10px
        24px
        rgba(
            38,
            65,
            74,
            .06
        );

    backdrop-filter:
        blur(10px);
}


/*
 * Aire real entre ajuda i footer.
 */

[data-substitution-modal]
.substitution-modal-help
+ .app-modal-actions {

    margin-top: 8px;
}


/*
 * Scroll discret.
 */

[data-substitution-modal]
.request-form {

    scrollbar-width: thin;

    scrollbar-color:
        #c9d5d8
        transparent;
}


[data-substitution-modal]
.request-form::-webkit-scrollbar {

    width: 8px;
}


[data-substitution-modal]
.request-form::-webkit-scrollbar-track {

    background: transparent;
}


[data-substitution-modal]
.request-form::-webkit-scrollbar-thumb {

    border-radius: 999px;

    background: #c9d5d8;
}


/*
 * Desktop gran:
 * intentem que es vegi pràcticament tot sense scroll.
 */

@media (
    min-height: 900px
)
and (
    min-width: 1000px
) {

    [data-substitution-modal]
    .app-modal-panel {

        max-height:
            calc(
                100vh
                - 52px
            );
    }

}


/*
 * Portàtil / pantalla baixa:
 * el cos fa scroll i el footer continua accessible.
 */

@media (
    max-height: 780px
) {

    [data-substitution-modal]
    .app-modal-panel {

        max-height:
            calc(
                100vh
                - 24px
            );
    }


    [data-substitution-modal]
    .request-form {

        gap: 14px;

        padding:
            14px
            20px
            0 !important;
    }


    [data-substitution-modal]
    .app-modal-actions {

        margin:
            0
            -20px;

        padding:
            13px
            20px
            15px !important;
    }

}


/*
 * Mobile.
 */

@media (
    max-width: 620px
) {

    [data-substitution-modal]
    .app-modal-panel {

        width:
            calc(
                100vw
                - 20px
            );

        max-height:
            calc(
                100vh
                - 20px
            );
    }


    [data-substitution-modal]
    .request-form {

        padding:
            14px
            16px
            0 !important;
    }


    [data-substitution-modal]
    .app-modal-actions {

        margin:
            0
            -16px;

        padding:
            13px
            16px
            15px !important;
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2-R6 · AFFINITY DESIGN
   Jerarquia visual professional dels candidats
   ========================================================= */


/* ---------------------------------------------------------
   BASE
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card {

    --affinity-color: #7f9298;
    --affinity-soft: #f4f7f8;
    --affinity-border: #dbe4e6;
    --affinity-text: #526b73;

    position: relative;

    border:
        1px solid
        var(--affinity-border) !important;

    border-left:
        5px solid
        var(--affinity-color) !important;

    background:
        linear-gradient(
            145deg,
            var(--affinity-soft) 0,
            #ffffff 44%
        ) !important;

    box-shadow:
        0 2px 6px
        rgba(27,55,64,.035);

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        border-color .16s ease;
}


/* ---------------------------------------------------------
   MOLT ADEQUAT · 80-100
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-excellent {

    --affinity-color: #2f8a5e;
    --affinity-soft: #eef8f2;
    --affinity-border: #bcdcc9;
    --affinity-text: #256f4b;
}


/* ---------------------------------------------------------
   ADEQUAT · 60-79
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-good {

    --affinity-color: #167d91;
    --affinity-soft: #eef8fa;
    --affinity-border: #bddde3;
    --affinity-text: #17697a;
}


/* ---------------------------------------------------------
   PARCIAL · 35-59
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-partial {

    --affinity-color: #c58a25;
    --affinity-soft: #fff8e9;
    --affinity-border: #ecd49f;
    --affinity-text: #946414;
}


/* ---------------------------------------------------------
   POC ADEQUAT · <35
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-low {

    --affinity-color: #b85d5d;
    --affinity-soft: #fcf1f1;
    --affinity-border: #e4bcbc;
    --affinity-text: #964747;
}


/* ---------------------------------------------------------
   PERFIL PENDENT
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-profile_pending {

    --affinity-color: #78939b;
    --affinity-soft: #f3f7f8;
    --affinity-border: #d5e0e3;
    --affinity-text: #637d85;
}


/* ---------------------------------------------------------
   NO DISPONIBLE / NO ELEGIBLE
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-unavailable,
[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible {

    --affinity-color: #a7b3b7;
    --affinity-soft: #f7f9f9;
    --affinity-border: #e0e6e8;
    --affinity-text: #8b999e;

    opacity: .66 !important;

    filter:
        saturate(.58);
}


/* ---------------------------------------------------------
   BADGE CLASSIFICACIÓ
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-badge {

    border:
        1px solid
        color-mix(
            in srgb,
            var(--affinity-color) 24%,
            #ffffff
        ) !important;

    background:
        color-mix(
            in srgb,
            var(--affinity-color) 12%,
            #ffffff
        ) !important;

    color:
        var(--affinity-text) !important;

    font-weight: 850;

    box-shadow:
        inset 0 0 0 1px
        rgba(255,255,255,.35);
}


/* ---------------------------------------------------------
   NÚMERO DE RÀNQUING
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-rank {

    border:
        1px solid
        color-mix(
            in srgb,
            var(--affinity-color) 25%,
            #ffffff
        ) !important;

    background:
        color-mix(
            in srgb,
            var(--affinity-color) 13%,
            #ffffff
        ) !important;

    color:
        var(--affinity-text) !important;

    font-weight: 900;
}


/* ---------------------------------------------------------
   NOM
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-identity strong {

    color: #294953 !important;

    font-weight: 850;
}


/* ---------------------------------------------------------
   PERCENTATGE
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-score
> span:first-child {

    display: inline-flex;

    align-items: center;

    width: fit-content;

    min-height: 24px;

    padding:
        0
        8px;

    border-radius: 999px;

    background:
        color-mix(
            in srgb,
            var(--affinity-color) 10%,
            #ffffff
        );

    color:
        var(--affinity-text) !important;

    font-weight: 850 !important;

    letter-spacing: .01em;
}


/* ---------------------------------------------------------
   BARRA D'ADEQUACIÓ
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-bar {

    height: 7px !important;

    border-radius: 999px;

    background:
        color-mix(
            in srgb,
            var(--affinity-color) 12%,
            #edf2f3
        ) !important;

    box-shadow:
        inset 0 1px 2px
        rgba(34,60,68,.08);
}


[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-bar
> span {

    background:
        var(--affinity-color) !important;

    box-shadow:
        0 0 0 1px
        color-mix(
            in srgb,
            var(--affinity-color) 10%,
            transparent
        );
}


/* ---------------------------------------------------------
   METADADES
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-meta span {

    border:
        1px solid
        color-mix(
            in srgb,
            var(--affinity-color) 18%,
            #e1e9eb
        ) !important;

    background:
        color-mix(
            in srgb,
            var(--affinity-color) 6%,
            #ffffff
        ) !important;

    color:
        color-mix(
            in srgb,
            var(--affinity-text) 82%,
            #647c84
        ) !important;
}


/* ---------------------------------------------------------
   TEXT EXPLICATIU
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card
.substitution-recommendation-reason {

    color:
        color-mix(
            in srgb,
            var(--affinity-text) 72%,
            #83969c
        ) !important;
}


/* ---------------------------------------------------------
   HOVER CANDIDAT ELEGIBLE
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card:not(:disabled):hover {

    transform:
        translateY(-2px);

    border-color:
        color-mix(
            in srgb,
            var(--affinity-color) 55%,
            #dfe7e9
        ) !important;

    border-left-color:
        var(--affinity-color) !important;

    box-shadow:
        0 8px 18px
        color-mix(
            in srgb,
            var(--affinity-color) 12%,
            transparent
        ) !important;
}


/* ---------------------------------------------------------
   SELECCIONAT
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-selected {

    border-color:
        var(--affinity-color) !important;

    border-left-color:
        var(--affinity-color) !important;

    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--affinity-color) 13%,
                #ffffff
            ),
            #ffffff 48%
        ) !important;

    box-shadow:
        0 0 0 2px
        color-mix(
            in srgb,
            var(--affinity-color) 18%,
            transparent
        ),
        0 10px 24px
        rgba(35,59,67,.08) !important;
}


/* ---------------------------------------------------------
   PETIT INDICADOR SUPERIOR
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card::after {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 3px;

    background:
        var(--affinity-color);

    opacity: .82;
}


/* ---------------------------------------------------------
   PERFIL PENDENT: no mostrar una puntuació falsa
   --------------------------------------------------------- */

[data-substitution-modal]
.substitution-recommendation-card.is-profile_pending
.substitution-recommendation-bar {

    background:
        repeating-linear-gradient(
            90deg,
            #dfe7e9 0,
            #dfe7e9 7px,
            #f7f9fa 7px,
            #f7f9fa 12px
        ) !important;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {

    [data-substitution-modal]
    .substitution-recommendation-card {

        border-left-width:
            4px !important;
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2-R7 · EXPLICIT AFFINITY
   ========================================================= */


/*
 * Targeta.
 */

[data-substitution-modal]
.substitution-recommendation-card {

    border:
        1px solid
        var(--affinity-border) !important;

    border-left:
        6px solid
        var(--affinity-color) !important;

    background:
        linear-gradient(
            135deg,
            var(--affinity-soft) 0%,
            #ffffff 58%
        ) !important;

    box-shadow:
        0 3px 10px
        rgba(34,58,66,.045) !important;
}


/*
 * Franja superior: reforça molt la lectura
 * sense pintar tota la targeta.
 */

[data-substitution-modal]
.substitution-recommendation-card::after {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 4px;

    background:
        var(--affinity-color) !important;

    opacity: 1 !important;
}


/*
 * Classificació.
 */

[data-substitution-modal]
.substitution-recommendation-badge {

    min-height: 26px;

    padding:
        0
        10px;

    border:
        1px solid
        var(--affinity-border) !important;

    background:
        var(--affinity-soft) !important;

    color:
        var(--affinity-text) !important;

    font-weight: 900 !important;
}


/*
 * Número de rànquing.
 */

[data-substitution-modal]
.substitution-recommendation-rank {

    width: 30px;

    height: 30px;

    flex-basis: 30px;

    border:
        1px solid
        var(--affinity-border) !important;

    background:
        var(--affinity-color) !important;

    color:
        #ffffff !important;

    font-size: 8.5px;

    font-weight: 900;
}


/*
 * Percentatge.
 */

[data-substitution-modal]
.substitution-recommendation-score
> span:first-child {

    min-height: 28px;

    padding:
        0
        10px;

    border:
        1px solid
        var(--affinity-border);

    background:
        var(--affinity-soft) !important;

    color:
        var(--affinity-text) !important;

    font-size: 8px;

    font-weight: 900 !important;
}


/*
 * Barra de percentatge més visible.
 */

[data-substitution-modal]
.substitution-recommendation-bar {

    height:
        8px !important;

    background:
        color-mix(
            in srgb,
            var(--affinity-color) 14%,
            #edf1f2
        ) !important;
}


[data-substitution-modal]
.substitution-recommendation-bar
> span {

    background:
        var(--affinity-color) !important;

    box-shadow:
        0 0 4px
        color-mix(
            in srgb,
            var(--affinity-color) 25%,
            transparent
        );
}


/*
 * Competències i nivells.
 */

[data-substitution-modal]
.substitution-recommendation-meta span {

    border:
        1px solid
        color-mix(
            in srgb,
            var(--affinity-color) 28%,
            #dfe7e9
        ) !important;

    background:
        color-mix(
            in srgb,
            var(--affinity-color) 8%,
            #ffffff
        ) !important;

    color:
        var(--affinity-text) !important;

    font-weight: 750;
}


/*
 * Nom una mica més potent.
 */

[data-substitution-modal]
.substitution-recommendation-identity strong {

    color:
        #203f49 !important;

    font-weight:
        900 !important;
}


/*
 * Selecció manual d'un candidat.
 */

[data-substitution-modal]
.substitution-recommendation-card.is-selected {

    border:
        2px solid
        var(--affinity-color) !important;

    border-left:
        7px solid
        var(--affinity-color) !important;

    background:
        linear-gradient(
            135deg,
            color-mix(
                in srgb,
                var(--affinity-color) 16%,
                #ffffff
            ),
            #ffffff 64%
        ) !important;

    box-shadow:
        0 0 0 3px
        color-mix(
            in srgb,
            var(--affinity-color) 16%,
            transparent
        ),
        0 10px 26px
        rgba(32,57,65,.10) !important;
}


/*
 * Hover només pels elegibles.
 */

[data-substitution-modal]
.substitution-recommendation-card:not(:disabled):hover {

    transform:
        translateY(-2px);

    border-color:
        var(--affinity-color) !important;

    box-shadow:
        0 8px 22px
        color-mix(
            in srgb,
            var(--affinity-color) 15%,
            transparent
        ) !important;
}


/*
 * No elegible:
 * mantenim visualment subordinat.
 */

[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible {

    opacity:
        .58 !important;

    filter:
        saturate(.40);
}


/*
 * Però el percentatge continua llegible.
 */

[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible
.substitution-recommendation-score
> span:first-child {

    opacity:
        .82;
}


/*
 * En pantalles petites reduïm lleugerament
 * el lateral.
 */

@media (max-width: 900px) {

    [data-substitution-modal]
    .substitution-recommendation-card {

        border-left-width:
            5px !important;
    }

}


/* =========================================================
   UI-R3-SUB-B2-R2-R8 · HARD COLORS
   Colors explícits finals.
   No depenen de variables CSS ni color-mix().
   ========================================================= */


/* =========================================================
   MOLT ADEQUAT · VERD
   ========================================================= */

[data-substitution-modal]
.substitution-recommendation-card.is-excellent {
    border: 1px solid #a7d9b9 !important;
    border-left: 6px solid #168447 !important;
    background:
        linear-gradient(
            135deg,
            #edf9f1 0%,
            #ffffff 68%
        ) !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-excellent::after {
    background: #168447 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-excellent
.substitution-recommendation-rank {
    border-color: #168447 !important;
    background: #168447 !important;
    color: #ffffff !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-excellent
.substitution-recommendation-badge {
    border-color: #9bd3af !important;
    background: #ddf4e6 !important;
    color: #126b3b !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-excellent
.substitution-recommendation-score
> span:first-child {
    border-color: #a7d9b9 !important;
    background: #e7f7ed !important;
    color: #126b3b !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-excellent
.substitution-recommendation-bar {
    background: #d7ecdf !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-excellent
.substitution-recommendation-bar
> span {
    background: #168447 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-excellent
.substitution-recommendation-meta span {
    border-color: #b7ddc5 !important;
    background: #f0faf4 !important;
    color: #17683d !important;
}


/* =========================================================
   ADEQUAT · BLAU / TURQUESA
   ========================================================= */

[data-substitution-modal]
.substitution-recommendation-card.is-good {
    border: 1px solid #a8d5e5 !important;
    border-left: 6px solid #167fa3 !important;
    background:
        linear-gradient(
            135deg,
            #edf8fc 0%,
            #ffffff 68%
        ) !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good::after {
    background: #167fa3 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good
.substitution-recommendation-rank {
    border-color: #167fa3 !important;
    background: #167fa3 !important;
    color: #ffffff !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good
.substitution-recommendation-badge {
    border-color: #a0d0df !important;
    background: #dff2f8 !important;
    color: #126681 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good
.substitution-recommendation-score
> span:first-child {
    border-color: #a8d5e5 !important;
    background: #e5f5fa !important;
    color: #126681 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good
.substitution-recommendation-bar {
    background: #d5eaf1 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good
.substitution-recommendation-bar
> span {
    background: #167fa3 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good
.substitution-recommendation-meta span {
    border-color: #b7dce8 !important;
    background: #eff9fc !important;
    color: #16667e !important;
}


/* =========================================================
   PARCIAL · AMBRE
   ========================================================= */

[data-substitution-modal]
.substitution-recommendation-card.is-partial {
    border: 1px solid #ebcb8c !important;
    border-left: 6px solid #c47a0b !important;
    background:
        linear-gradient(
            135deg,
            #fff8e9 0%,
            #ffffff 68%
        ) !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial::after {
    background: #c47a0b !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial
.substitution-recommendation-rank {
    border-color: #c47a0b !important;
    background: #c47a0b !important;
    color: #ffffff !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial
.substitution-recommendation-badge {
    border-color: #e6c47f !important;
    background: #fff0ce !important;
    color: #925b09 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial
.substitution-recommendation-score
> span:first-child {
    border-color: #ebcb8c !important;
    background: #fff4dc !important;
    color: #925b09 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial
.substitution-recommendation-bar {
    background: #f3e2bd !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial
.substitution-recommendation-bar
> span {
    background: #c47a0b !important;
}


/* =========================================================
   POC ADEQUAT · VERMELL SUAU
   ========================================================= */

[data-substitution-modal]
.substitution-recommendation-card.is-low {
    border: 1px solid #e4b2b2 !important;
    border-left: 6px solid #b94d4d !important;
    background:
        linear-gradient(
            135deg,
            #fdf0f0 0%,
            #ffffff 68%
        ) !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low::after {
    background: #b94d4d !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low
.substitution-recommendation-rank {
    border-color: #b94d4d !important;
    background: #b94d4d !important;
    color: #ffffff !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low
.substitution-recommendation-badge {
    border-color: #dfa8a8 !important;
    background: #f9dede !important;
    color: #913c3c !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low
.substitution-recommendation-score
> span:first-child {
    border-color: #e4b2b2 !important;
    background: #fbe7e7 !important;
    color: #913c3c !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low
.substitution-recommendation-bar {
    background: #efd1d1 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low
.substitution-recommendation-bar
> span {
    background: #b94d4d !important;
}


/* =========================================================
   NO ELEGIBLE / NO DISPONIBLE · GRIS
   ========================================================= */

[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible,
[data-substitution-modal]
.substitution-recommendation-card.is-unavailable {
    border: 1px solid #d9e0e2 !important;
    border-left: 6px solid #9aa9ae !important;
    background: #f7f9f9 !important;

    opacity: .62 !important;
    filter: none !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible::after,
[data-substitution-modal]
.substitution-recommendation-card.is-unavailable::after {
    background: #9aa9ae !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible
.substitution-recommendation-rank,
[data-substitution-modal]
.substitution-recommendation-card.is-unavailable
.substitution-recommendation-rank {
    border-color: #aab6ba !important;
    background: #aab6ba !important;
    color: #ffffff !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible
.substitution-recommendation-badge,
[data-substitution-modal]
.substitution-recommendation-card.is-unavailable
.substitution-recommendation-badge {
    border-color: #d5dddf !important;
    background: #edf1f2 !important;
    color: #718187 !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible
.substitution-recommendation-bar,
[data-substitution-modal]
.substitution-recommendation-card.is-unavailable
.substitution-recommendation-bar {
    background: #e6ebec !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-not_eligible
.substitution-recommendation-bar
> span,
[data-substitution-modal]
.substitution-recommendation-card.is-unavailable
.substitution-recommendation-bar
> span {
    background: #9aa9ae !important;
}


/* =========================================================
   PERFIL PENDENT · NEUTRE
   ========================================================= */

[data-substitution-modal]
.substitution-recommendation-card.is-profile_pending {
    border-left-color: #78939b !important;
}


/* =========================================================
   SELECCIÓ
   ========================================================= */

[data-substitution-modal]
.substitution-recommendation-card.is-excellent.is-selected {
    box-shadow:
        0 0 0 3px rgba(22,132,71,.18),
        0 10px 24px rgba(22,132,71,.10) !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-good.is-selected {
    box-shadow:
        0 0 0 3px rgba(22,127,163,.18),
        0 10px 24px rgba(22,127,163,.10) !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-partial.is-selected {
    box-shadow:
        0 0 0 3px rgba(196,122,11,.18),
        0 10px 24px rgba(196,122,11,.10) !important;
}


[data-substitution-modal]
.substitution-recommendation-card.is-low.is-selected {
    box-shadow:
        0 0 0 3px rgba(185,77,77,.18),
        0 10px 24px rgba(185,77,77,.10) !important;
}



/* =========================================================
   UI-R3-SUB-C-B · CALENDAR COVERAGE
   ========================================================= */


/*
 * Calendari mensual.
 */

.calendar-event-coverage {

    display: inline-flex;

    align-items: center;

    width: fit-content;

    max-width: 100%;

    margin-top: 2px;

    padding:
        2px
        5px;

    border:
        1px solid #b9ddc8;

    border-radius: 999px;

    background: #edf8f2;

    color: #26724b;

    font-size: 6.5px !important;

    font-weight: 850;

    opacity: 1 !important;
}


/*
 * Calendari anual.
 *
 * C = hi ha cobertura operativa.
 */

.year-coverage-mark {

    position: absolute;

    top: 2px;

    right: 2px;

    display: grid;

    place-items: center;

    width: 11px;

    height: 11px;

    border-radius: 50%;

    border:
        1px solid #8ec8a8;

    background: #2f8a5e;

    color: #ffffff;

    font-size: 5px;

    font-weight: 900;

    line-height: 1;

    z-index: 3;
}


.year-day {

    position: relative;
}


/*
 * Un dia amb cobertura conserva els colors
 * d'absència; la cobertura és informació
 * operacional addicional.
 */



/* =========================================================
   RELEASE-R1-A-R3-A · GLOBAL DIALOGS
   ========================================================= */

body.app-global-dialog-open {
    overflow: hidden;
}


.app-global-dialog[hidden],
.app-global-toast[hidden] {
    display: none !important;
}


.app-global-dialog {

    position: fixed;

    inset: 0;

    z-index: 2000;

    display: grid;

    place-items: center;

    padding: 20px;
}


.app-global-dialog-backdrop {

    position: absolute;

    inset: 0;

    background:
        rgba(21, 40, 49, .45);

    backdrop-filter:
        blur(2px);
}


.app-global-dialog-panel {

    position: relative;

    z-index: 1;

    width:
        min(
            470px,
            100%
        );

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .8
        );

    border-radius: 17px;

    background: #fff;

    box-shadow:
        0 24px 70px
        rgba(
            18,
            42,
            53,
            .26
        );

    overflow: hidden;
}


.app-global-dialog-header {

    display: flex;

    align-items:
        flex-start;

    justify-content:
        space-between;

    gap: 20px;

    padding:
        20px
        21px
        16px;

    border-bottom:
        1px solid #edf2f4;
}


.app-global-dialog-header small {

    display: block;

    margin-bottom: 3px;

    color:
        var(
            --ceeb-blue,
            #167fa3
        );

    font-size: 8px;

    font-weight: 900;

    letter-spacing: .1em;

    text-transform: uppercase;
}


.app-global-dialog-header h2 {

    margin: 0;

    color: #29434d;

    font-size: 19px;
}


.app-global-dialog-close {

    width: 32px;

    height: 32px;

    display: grid;

    place-items: center;

    border: 0;

    border-radius: 9px;

    background: #f3f6f7;

    color: #72868d;

    cursor: pointer;

    font-family: inherit;

    font-size: 20px;

    line-height: 1;
}


.app-global-dialog-body {

    padding:
        20px
        21px;

    color: #526a73;

    font-size: 11px;

    line-height: 1.55;
}


.app-global-dialog-body p {

    margin: 0;

    white-space:
        pre-line;
}


.app-global-dialog-actions {

    display: flex;

    justify-content:
        flex-end;

    gap: 10px;

    padding:
        0
        21px
        20px;
}


.app-global-dialog-danger {

    background:
        #b83a49 !important;

    border-color:
        #b83a49 !important;

    color:
        #fff !important;
}


/* TOAST GLOBAL */

.app-global-toast {

    position: fixed;

    right: 24px;

    bottom: 24px;

    z-index: 2100;

    max-width:
        min(
            390px,
            calc(
                100vw - 48px
            )
        );

    padding:
        13px
        16px;

    border-radius: 11px;

    box-shadow:
        0 16px 38px
        rgba(
            25,
            52,
            63,
            .19
        );

    opacity: 0;

    transform:
        translateY(
            12px
        );

    transition:
        opacity .2s ease,
        transform .2s ease;

    font-size: 10px;

    font-weight: 800;
}


.app-global-toast.is-visible {

    opacity: 1;

    transform:
        translateY(0);
}


.app-global-toast.is-info {

    border:
        1px solid #bed7e2;

    background: #eff7fa;

    color: #356b80;
}


.app-global-toast.is-success {

    border:
        1px solid #b9dec7;

    background: #eff9f2;

    color: #276f4b;
}


.app-global-toast.is-warning {

    border:
        1px solid #ebd39d;

    background: #fff8e7;

    color: #89631d;
}


.app-global-toast.is-error {

    border:
        1px solid #ebc1c7;

    background: #fff2f3;

    color: #a83242;
}


@media (
    max-width: 600px
) {

    .app-global-dialog {
        padding: 12px;
    }


    .app-global-dialog-actions {

        flex-direction:
            column-reverse;
    }


    .app-global-dialog-actions
    .button {

        width: 100%;
    }


    .app-global-toast {

        right: 14px;

        bottom: 14px;

        max-width:
            calc(
                100vw - 28px
            );
    }
}


/* Statistics filters spacing fix */
.statistics-filter-panel {
    padding: 16px 18px 14px;
    overflow: visible;
}

.statistics-filter-panel .statistics-filters {
    margin: 0;
}

