.extranet-header {
    width: 100%;
    background-color: #de266f !important;
    border-bottom: 1px solid #e8e8e8;
    position: relative;
}

.extranet-header-inner {
    width: 100%;
    min-height: 86px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background-color: #3fab2f !important;
}

.extranet-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.extranet-brand {
    display: inline-flex;
    align-items: center;
    align-self: center;
    line-height: 0;
    text-decoration: none;
}

.extranet-header .header-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0;
}

.extranet-header .header-logo-wrap img {
    height: 40px;
    width: auto;
    display: block;
}

.extranet-header .header-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #fff;
    color: #de266f;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.extranet-header .header-logo-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.extranet-nav {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
}

.extranet-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.extranet-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 0 auto;
    background-color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.extranet-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.extranet-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.extranet-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.extranet-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    margin-left: auto;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.extranet-header .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 1.5rem 1rem;
    color: #fff;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.extranet-header .nav-link:hover,
.extranet-header .nav-link:focus {
    color: #de266f;
    background-color: #e8e8e8;
}

.extranet-header .nav-link.is-active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.12);
    border-bottom-color: #fff;
}

.extranet-user-row {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.extranet-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 24px;
    color: #fff;
    line-height: 1;
}

.extranet-user-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex: 0 0 auto;
    display: block;
}

.extranet-user-name {
    color: inherit;
    line-height: 1;
}

.extranet-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: inherit;
    line-height: 1;
}

.extranet-logout:hover,
.extranet-logout:focus {
    color: #fff !important;
    background-color: transparent !important;
}

.extranet-logout svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
    flex: 0 0 auto;
}

.extranet-lang {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    margin-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
}

/* Per defecte (desktop): la còpia mòbil amagada, la del user-row visible */
.extranet-lang-mobile {
    display: none !important;
}

.extranet-lang .lang-link {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.extranet-lang .lang-link:hover,
.extranet-lang .lang-link:focus,
.extranet-lang .lang-link.is-active {
    color: #fff;
}

.extranet-lang .lang-link.is-active {
    text-decoration: underline;
}

.extranet-lang .lang-sep {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0.25rem;
}

/* ── Pàgina de login ── */
body.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f5f5;
}

body.login-page main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card .card {
    background-color: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
}

.login-card-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card-logo img {
    display: block;
    height: 48px;
    width: auto;
    margin: 0 auto;
}

.login-card .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #333;
}

.login-card .form-control:focus {
    border-color: #de266f;
    box-shadow: 0 0 0 0.2rem rgba(181, 13, 74, 0.2);
}

.btn-login {
    background-color: #de266f !important;
    border-color: #de266f !important;
    color: #fff !important;
    font-weight: 700;
    padding: 0.6rem;
    width: 100%;
}

.btn-login:hover,
.btn-login:focus {
    background-color: #96093d !important;
    border-color: #96093d !important;
    color: #fff !important;
}

.btn-login:focus {
    box-shadow: 0 0 0 0.2rem rgba(181, 13, 74, 0.35) !important;
}

body.login-page footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #e8e8e8;
    background-color: #fff;
}

/* ── Títols ── */
h1, h2, h3 { color: #de266f !important; }

/* ── Paginació ── */
.page-link { color: #de266f; }
.page-link:hover,
.page-link:focus { color: #8a0938; }
.page-item.active .page-link {
    background-color: #de266f;
    border-color: #de266f;
    color: #fff;
}

/* ── Llistat d'incidències: filtres de cerca ── */
.filter-row th {
    background-color: #eceef1;
    font-weight: normal;
    padding: 0.5rem 0.6rem;
    vertical-align: middle;
    border-top: 1px solid #d3d7dc;
    border-bottom: 1px solid #d3d7dc;
}

.filter-row:first-of-type th {
    border-top: 2px solid #b6bcc4;
}

.filter-row:last-of-type th {
    border-bottom: 2px solid #b6bcc4;
}

.filter-row .form-control-sm,
.filter-row .form-select-sm {
    font-size: 0.8rem;
    border-color: #c4c9d0;
}

.filter-row .form-control-sm:focus,
.filter-row .form-select-sm:focus {
    border-color: #8a929c;
    box-shadow: 0 0 0 0.15rem rgba(108, 117, 125, 0.2);
}

.filter-row input[type="date"] {
    min-width: 0;
}

.btn-filtrar {
    background-color: #de266f;
    border-color: #de266f;
    color: #fff;
}

.btn-filtrar:hover,
.btn-filtrar:focus {
    background-color: #96093d;
    border-color: #96093d;
    color: #fff;
}

@media (max-width: 991.98px) {
    .extranet-lang {
        border-left: 0;
        margin-left: 0;
        padding-left: 0;
    }

    /* A mòbil: mostrem la còpia del header-inner (sota l'hamburguesa), amaguem la del user-row */
    .extranet-lang-mobile {
        display: flex !important;
        justify-content: flex-end;
        align-self: stretch;
        padding: 0.25rem 1.5rem;
    }

    .extranet-lang-desktop {
        display: none !important;
    }

    .extranet-header-inner {
        align-items: stretch;
        flex-direction: column;
        padding-top: 0.5rem;
        padding-bottom: 1rem;
        gap: 0.5rem;
    }

    .extranet-header-top {
        width: 100%;
    }

    .extranet-menu-toggle {
        display: inline-flex;
    }

    .extranet-nav {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-left: 0;
    }

    .extranet-nav.is-open {
        display: flex;
    }

    .extranet-menu {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .extranet-header .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.9rem 0;
        border-bottom-width: 0;
    }

    .extranet-user {
        justify-content: flex-end;
        margin-left: 0;
    }

    .extranet-user-row {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: flex-end;
        gap: 0.75rem;
    }

    .extranet-logout {
        flex: 0 0 auto;
        margin-bottom: 0;
        padding-left: 0;
        padding-right: 0;
        align-self: auto;
    }
}
