/* =================================
   BASE UNIFICAT ADABIDA
   Paleta: Blanc + Blau + Grisos
   ================================= */

:root {
  /* Colors principals */
  --color-blanc: #FFFFFF;
  --color-blau: #2563EB;
  --color-blau-clar: #DBEAFE;
  --color-blau-fosc: #1E40AF;
  
  /* Grisos */
  --color-text: #1F2937;
  --color-text-secundari: #6B7280;
  --color-border: #D1D5DB;
  --color-fons-alt: #F9FAFB;
  --color-fons-clar: #F3F4F6;
  
  /* Estat */
  --color-error: #DC2626;
  --color-exit: #059669;
  
  /* Espais */
  --espai-xs: 4px;
  --espai-sm: 8px;
  --espai-md: 16px;
  --espai-lg: 24px;
  --espai-xl: 32px;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Ombres */
  --ombra-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --ombra-md: 0 2px 4px rgba(0, 0, 0, 0.1);
  --ombra-lg: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Reset bàsic */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--color-text);
  background-color: var(--color-blanc);
  line-height: 1.6;
  font-size: 16px;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--espai-md);
  color: var(--color-text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: var(--espai-md);
}

/* Links */
a {
  color: var(--color-blau);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-blau-fosc);
}

/* Inputs globals */
input,
textarea,
select {
  width: 100%;
  padding: var(--espai-sm) var(--espai-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-blanc);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-blau);
  box-shadow: 0 0 0 3px var(--color-blau-clar);
}

/* Botons */
button,
.boto {
  padding: var(--espai-sm) var(--espai-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.boto-primari {
  background: var(--color-blau);
  color: var(--color-blanc);
}

.boto-primari:hover {
  background: var(--color-blau-fosc);
}

.boto-secundari {
  background: var(--color-blanc);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.boto-secundari:hover {
  background: var(--color-fons-clar);
}

/* Contenidors */
.contenidor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--espai-lg);
}

.contenidor-estret {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--espai-lg);
}

/* Cards */
.card {
  background: var(--color-blanc);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--espai-lg);
  box-shadow: var(--ombra-sm);
}

/* Utilitats */
.text-center { text-align: center; }
.text-secundari { color: var(--color-text-secundari); }
.mb-sm { margin-bottom: var(--espai-sm); }
.mb-md { margin-bottom: var(--espai-md); }
.mb-lg { margin-bottom: var(--espai-lg); }

.page-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
}

 .icona-missatges {
      position: relative;
      font-size: 1.5rem;
      text-decoration: none;
      margin: 0 1rem;
      display: inline-block;
    }
    
    .badge-notificacions {
      position: absolute;
      top: -8px;
      right: -10px;
      background: #d32f2f;
      color: white;
      border-radius: 50%;
      padding: 2px 6px;
      font-size: 0.7rem;
      font-weight: bold;
      min-width: 18px;
      text-align: center;
    }
    
    .icona-missatges:hover {
      opacity: 0.8;
    }

     .cookie-banner {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(0, 0, 0, 0.95);
      color: white;
      padding: 1.5rem;
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
      z-index: 9999;
      animation: slideUp 0.3s ease-out;
    }

    @keyframes slideUp {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }

    .cookie-banner-content {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 2rem;
    }

    .cookie-banner p {
      margin: 0;
      line-height: 1.6;
      flex: 1;
    }

    .cookie-btn {
      background: #14d8ce;
      color: white;
      border: none;
      padding: 0.8rem 2rem;
      border-radius: 4px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.3s;
    }

    .cookie-btn:hover {
      background: #0e9f94;
    }

    @media (max-width: 768px) {
      .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
      }

      .cookie-banner {
        padding: 1rem;
      }

      .cookie-btn {
        width: 100%;
      }
    }