:root {
            --sidebar-width: 250px;
            --primary-color: #4B49AC;
            --link-color: #6c757d;
            --link-hover-bg: rgba(75, 73, 172, 0.08);
            --sidebar-border: #dee2e6;
}
    
body {
            background-color: white;
}

/* Logo animat (compartit: base.html, auth_base.html, login.html) */
.logo-dots-svg circle {
    opacity: 0;
    animation: logoDotsFade 4s infinite;
}

.logo-dots-svg .circle1 { animation-delay: 0s; }
.logo-dots-svg .circle2 { animation-delay: 0.5s; }
.logo-dots-svg .circle3 { animation-delay: 1s; }

@keyframes logoDotsFade {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}


/* Estils per al landing page modern */
.public-landing {
    position: relative;
    background: linear-gradient(135deg, rgba(13, 109, 253, 0.021) 0%, rgba(0, 81, 147, 0.114) 100%),
        /* Imatge de fons */
       url("../img/landing.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: overlay; /* Això barreja el gradient amb la imatge */
    padding: 5rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}



.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.features {
    position: relative;
    z-index: 1;
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Efectes addicionals */
.btn-primary {
    background: var(--bs-primary);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 94, 215, 0.4);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* Botons "principal" i "secundari": migrats a static/css/buttons.css
   (.btn-principal / .btn-secundari). No s'han de tornar a crear aquí. */

.tercer-btn {
  background: linear-gradient(135deg, #f5f5f5, #dcdcdc);
  
  border: none;
  border-radius: 50%;              /* forma rodona */
  width: 50px;
  height: 50px;
  display: flex;                   /* centra la icona */
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 1.25rem;              /* mida de la icona */
  padding: 0;                      /* evita que desquadri */
  text-decoration: none;
  transition: all 0.3s ease;
}



.tercer-btn:hover,
.tercer-btn:focus {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #c0c0c0, #808080); /* degradat més fosc en hover */
    color: white;
}

.tercer-btn i {
    margin-right: 0.5rem;
}


.tercer-btn.active {
  background: linear-gradient(135deg, #bbbbbb, #999999);
  color: white;
  pointer-events: none;
}



.sidebar {
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            width: var(--sidebar-width);
            background-color: #ffffff;
            border-right: 1px solid var(--sidebar-border);
            transition: transform 0.3s ease-in-out;
            z-index: 1000;
            overflow-y: auto;
}
    
.sidebar.collapsed {
            transform: translateX(-100%);
}
    
.sidebar .nav-link {
            color: var(--link-color);
            border-radius: 8px;
            margin: 2px 8px;
            padding: 12px 16px;
            transition: all 0.3s ease;
}
    
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
            color: var(--primary-color);
            background-color: var(--link-hover-bg);
            transform: translateX(5px);
}
    
.sidebar .nav-link i {
            margin-right: 10px;
            width: 20px;
}

/* Subopció niada sota una opció principal (p. ex. Informes > Resum alumnes) */
.sidebar .nav-link.nav-sublink {
            margin-left: 28px;
            padding: 8px 16px;
            font-size: 0.9rem;
}
    
.main-content {
            margin-left: var(--sidebar-width);
            transition: margin-left 0.3s ease-in-out;
            min-height: 100vh;
            padding-bottom: 3rem;
}
    
.main-content.expanded {
            margin-left: 0;
}
    
.top-navbar {
            background: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            padding: 1rem 0;
            margin-bottom: 2rem;
}
    
.sidebar-brand {
            padding: 1.5rem 1rem;
            border-bottom: 0px solid var(--sidebar-border);
            margin-bottom: 1rem;           
            background-color: white;
}
    
.sidebar-brand h4 {
            color: var(--primary-color);
            font-family: 'Fraunces', serif;
            margin: 0;
            font-weight: 600;
}
    
.sidebar-brand small {
            color: var(--link-color);
}
    
.user-info {
            padding: 1rem;
            border-top: 1px solid var(--sidebar-border);
            margin-top: auto;
            background-color: white;
}
    
.user-info .user-avatar {
            width: 40px;
            height: 40px;
            background: rgba(75, 73, 172, 0.1);
            color: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
}

.user-info .username {
            font-weight: 500;
            color: #212529;
}

/* El botó "Tancar sessió" (.btn-principal) està pensat per a CTAs de
   pàgina (min-width 210px); dins la barra estreta l'adaptem perquè
   ocupi tot l'ample disponible en lloc de forçar la mida de píndola. */
.user-info .btn-principal {
            width: 100%;
            min-width: 0;
            height: 44px;
            font-size: 0.9rem;
}
    
.btn-toggle-sidebar {
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 1001;
            background: var(--primary-color);
            border: none;
            border-radius: 8px;
            padding: 10px;
            color: white;
            display: none;
}
    
.card {
            border: none;
            box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
            border-radius: 12px;
}
    
.card-header {
            background: white;
            border-bottom: 1px solid #dee2e6;
            font-weight: 600;
            border-radius: 12px 12px 0 0 !important;
}

.oferta-card {
        border-radius: 12px;
        transition: all 0.3s ease;
        border: 1px solid rgba(0,0,0,0.08) !important;
        background-color: rgba(0,0,0,0.03) !important;
    }
  
 .oferta-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
    }
   


.avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.candidatura-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.06) !important;
    border-left: 4px solid #7A7686 !important;
    background-color: #ffffff !important;
}

.candidatura-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08) !important;
}


    /* Paginació: estil unificat a static/css/buttons.css */

    .img-fixed {
      height: 200px;
      object-fit: cover;
      width: 100%;
    }
    
    .puntuacio-badge {
        width: 40px;
        height: 40px;
        font-weight: bold;
        font-size: 0.9rem;
    }
    
    .estat-select {
       
        transition: all 0.3s ease;
    }
    
    .estat-select:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    }


    .current-file {
    border-radius: 8px;
    }
   
    .form-control:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    }
    
    .progress-bar {
        transition: width 0.3s ease;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.5em 0.75em;
    }
    
    .sticky-top {
        z-index: 1020;
    }
    

    /* Estil per al text informatiu del dropdown */
    .dropdown-item-text {
        padding: 0.375rem 1rem;
        font-size: 0.875rem;
        font-style: italic;
    }

    /* Estil per destacar el nombre de candidatures */
    .dropdown-item:has(.bi-people) {
        font-weight: 500;
    }
   
    .alert-info-small {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0.75rem 1rem;
    }

    .alert-info-small .alert-icon {
        flex-shrink: 0;
        margin-top: 0.1rem;
        color: #0ea5e9;
    }

    .alert-info-small .alert-content {
        flex-grow: 1;
    }

    .alert-info-small .alert-content p {
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .alert-info-small .alert-content p:last-child {
        margin-bottom: 0;
    }

    
@media (max-width: 768px) {

     .sticky-top {
            position: relative !important;
        }
            .sidebar {
                transform: translateX(-100%);
            }
    
            .main-content {
                margin-left: 0;
            }
    
            .btn-toggle-sidebar {
                display: block;
            }
    
            .sidebar.show {
                transform: translateX(0);
            }

             .candidatura-card .row > div {
            margin-bottom: 1rem;
        }
        
        .candidatura-card .d-flex.gap-2 {
            justify-content: center !important;
        }
}
    
.dashboard-benvinguda {
            padding: 0.25rem 0 1.5rem;
            border-bottom: 1px solid rgba(30, 27, 46, 0.08);
}

.dashboard-benvinguda h2 {
            font-family: 'Fraunces', serif;
            font-weight: 600;
            color: #1E1B2E;
}

.dashboard-benvinguda p {
            color: #7A7686;
}

/* KPI de l'admin al Dashboard: abans no estava definida enlloc i es
   veia com una targeta normal, sense cap jerarquia per als números. */
.stat-card {
            border: none;
            border-top: 3px solid #4B49AC;
            box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.stat-card h3 {
            font-family: 'IBM Plex Mono', monospace;
            font-weight: 600;
            color: #4B49AC;
}

/* Placeholder de notícia sense imatge i capçalera de targeta amb
   color de marca (Dashboard de l'admin). */
.placeholder-lletra {
            background: linear-gradient(135deg, #7DA0FA, #4B49AC);
}

.noticia-dashboard-titol {
            font-family: 'Fraunces', serif;
            color: #1E1B2E;
}

.card-header-indigo {
            background: #4B49AC;
            color: #ffffff;
}

/* Bootstrap .btn-primary / .btn-outline-danger: només s'usen al
   Dashboard (targetes de notícies), amb els colors de marca. */
.btn-primary {
            background-color: #4B49AC;
            border-color: #4B49AC;
}

.btn-primary:hover,
.btn-primary:focus {
            background-color: #34317c;
            border-color: #34317c;
}

.btn-outline-danger {
            color: #A23E3E;
            border-color: #A23E3E;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
            background-color: #A23E3E;
            border-color: #A23E3E;
            color: #ffffff;
}
 

.icon-size-3rem {
    font-size: 3rem;
}



.funcio-item {
    background: #ffffff;
    border: 1px solid rgba(75, 73, 172, 0.14);
    transition: border-color 0.2s ease;
}

.funcio-item:hover {
    border-color: rgba(75, 73, 172, 0.4);
}

/* Botons rodons "afegir" i "treure" de les llistes dels formularis
   d'oferta (estudis, capacitats, funcions, idiomes): mateixa forma
   que .tercer-btn, però diferenciats per color perquè afegir i
   eliminar no es confonguin visualment. */
.tercer-btn-afegir {
    background: linear-gradient(135deg, #7DA0FA, #4B49AC);
    color: #ffffff;
}

.tercer-btn-afegir:hover,
.tercer-btn-afegir:focus {
    background: linear-gradient(135deg, #4B49AC, #34317c);
    color: #ffffff;
}

.tercer-btn-treure {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid rgba(162, 62, 62, 0.35);
    color: #A23E3E;
}

.tercer-btn-treure:hover,
.tercer-btn-treure:focus {
    background: rgba(162, 62, 62, 0.08);
    color: #A23E3E;
    border-color: #A23E3E;
    transform: none;
}

/* Zona per afegir un ítem nou (cicle/capacitat/funció/idioma) als
   formularis d'oferta: abans no estava definida enlloc i es veia
   com una targeta normal. Ara sí que es distingeix visualment de
   la llista d'ítems ja afegits. */
.border-dashed {
    border: 2px dashed rgba(75, 73, 172, 0.35) !important;
    background: rgba(75, 73, 172, 0.03);
}

/* Bootstrap .text-primary: color de marca en lloc del blau per
   defecte (usat als títols de secció dels formularis, etc.) */
.text-primary {
    color: #4B49AC !important;
}

/* Bootstrap .btn-outline-primary: usat només per al botó "Accions"
   dels formularis/detall d'oferta. Es manté la mida compacta de
   Bootstrap (no és una acció principal/secundària de pàgina) però
   amb el color de marca. */
.btn-outline-primary {
    color: #4B49AC;
    border-color: #4B49AC;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #4B49AC;
    border-color: #4B49AC;
    color: #ffffff;
}

/* Títol principal i subtítols de secció dins les targetes de
   formulari (Nova/Editar Oferta, Informació Bàsica...): mateixa
   Fraunces que la resta de l'app. */
.card-body h2.h4,
.card-body h5.text-primary,
h4.text-dark {
    font-family: 'Fraunces', serif;
    font-weight: 600;
}

/* Capçalera de modal de confirmació destructiva (eliminar compte...):
   el granate de marca en lloc del bg-danger saturat de Bootstrap,
   perquè no hi convisquin dos vermells diferents. */
.modal-header-eliminar {
    background: #A23E3E;
    color: #ffffff;
}

/* Etiqueta d'estat d'oferta (substitueix els badges bg-*-subtle de
   Bootstrap) amb la paleta de marca ja usada a "Les meves ofertes"
   i al tauler públic. */
.badge-estat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
}

.badge-estat.is-activa {
    color: #4B7F63;
    background: rgba(75, 127, 99, 0.12);
}

.badge-estat.is-revisio {
    color: #B8863B;
    background: rgba(184, 134, 59, 0.12);
}

.badge-estat.is-oculta,
.badge-estat.is-tancada {
    color: #7A7686;
    background: rgba(122, 118, 134, 0.1);
}

.badge-estat.is-caducada {
    color: #A23E3E;
    background: rgba(162, 62, 62, 0.12);
}

/* Estat de candidatura (reutilitza el mateix component .badge-estat,
   amb modificadors amb els codis del model EstatCandidatura perquè
   quedin inequívocs: CO=contractada, RJ=rebutjada, PR=preseleccionada,
   EN=entrevista, EP=en procés, pendent=no activada pel responsable). */
.badge-estat.is-CO {
    color: #4B7F63;
    background: rgba(75, 127, 99, 0.12);
}

.badge-estat.is-RJ {
    color: #A23E3E;
    background: rgba(162, 62, 62, 0.12);
}

.badge-estat.is-PR {
    color: #B8863B;
    background: rgba(184, 134, 59, 0.12);
}

.badge-estat.is-EN {
    color: #4B49AC;
    background: rgba(75, 73, 172, 0.12);
}

.badge-estat.is-EP {
    color: #7A7686;
    background: rgba(122, 118, 134, 0.1);
}

.badge-estat.is-pendent {
    color: #B8863B;
    background: rgba(184, 134, 59, 0.12);
}


.forgot-password-link {
    font-size: 0.9rem;
    color: #98BDFF;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forgot-password-link:hover {
    color: #4B49AC;
    text-decoration: underline;
}