/* ==========================================================================
   NeuroIA Edu - Main Stylesheet
   ========================================================================== */

/* ── NOVA LANDING PAGE ─────────────────────────────────────────────────── */
.lp-new {
    font-family: 'Inter', sans-serif;
    background: #eaebf4 !important;
    background-image: none !important;
    background-attachment: initial !important;
    filter: none !important;
    color: #1e1b4b;
    overflow-x: hidden;
}

/* Nav */
.lp-nav { background: #f8f7ff; padding: 0 2.5rem; height: 68px; display: flex; align-items: center; justify-content: space-between; border-bottom: 0.5px solid #ddd9ff; position: sticky; top: 0; z-index: 200; }
.lp-nav-logo { display: flex; align-items: center; gap: 10px; }
.lp-icon { height: 44px; width: auto; flex-shrink: 0; }
.lp-wordmark { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.lp-wm-neuroia { color: #1e1b4b; }
.lp-wm-edu { color: #7c3aed; border-bottom: 2px solid #10b981; padding-bottom: 1px; }
.lp-nav-right { display: flex; gap: 14px; align-items: center; }
.lp-lang-switcher { display: flex; gap: 4px; background: #edeaff; border-radius: 8px; padding: 3px; }
.lp-lang-btn { padding: 4px 12px; border-radius: 6px; border: none; font-size: 0.8rem; font-weight: 600; cursor: pointer; background: transparent; color: #6366f1; }
.lp-lang-btn.active { background: #fff; color: #312e81; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.lp-btn-ghost { padding: 8px 20px; border-radius: 10px; border: 1.5px solid #c4bcf7; color: #4f46e5; font-weight: 500; font-size: 0.875rem; cursor: pointer; background: transparent; font-family: inherit; }
.lp-btn-main { padding: 8px 22px; border-radius: 10px; background: #4f46e5; color: #fff; font-weight: 600; font-size: 0.875rem; cursor: pointer; border: none; font-family: inherit; }
.lp-btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: 12px; }
.lp-btn-cta { padding: 13px 34px; border-radius: 12px; background: #fff; color: #312e81; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; font-family: inherit; }

/* Hero */
.lp-s1 { background: #f8f7ff; padding: 5rem 2.5rem 0; }
.lp-hero { display: flex; align-items: center; gap: 4rem; max-width: 1100px; margin: 0 auto; padding-bottom: 4rem; }
.lp-hero-text { flex: 1; }
.lp-pill { display: inline-flex; align-items: center; gap: 6px; background: #edeaff; color: #4f46e5; font-size: 0.78rem; font-weight: 600; padding: 5px 14px; border-radius: 20px; margin-bottom: 1.25rem; border: 1px solid #c4bcf7; }
.lp-h1 { font-size: 2.7rem; font-weight: 700; line-height: 1.2; color: #1e1b4b; margin-bottom: 0.9rem; }
.lp-h1 em { font-style: normal; color: #4f46e5; }
.lp-slogan { font-size: 1.15rem; font-weight: 500; color: #6366f1; margin-bottom: 1rem; }
.lp-desc { font-size: 0.97rem; color: #534AB7; margin-bottom: 2rem; max-width: 460px; line-height: 1.7; }
.lp-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-hero-img { flex: 0 0 280px; display: flex; justify-content: center; }
.lp-hero-img img { width: 260px; height: auto; opacity: 0.92; }
.lp-docent-band { background: #312e81; padding: 2.25rem 3rem; border-radius: 18px 18px 0 0; max-width: 1100px; margin: 0 auto; text-align: center; }
.lp-docent-band h2 { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.6rem; }
.lp-docent-band p { font-size: 0.97rem; color: #c7d2fe; line-height: 1.75; max-width: 580px; margin: 0 auto; }

/* Seccions */
.lp-s2 { background: #eaebf4; padding: 4rem 2.5rem; }
.lp-s3 { background: #f8f7ff; padding: 4rem 2.5rem; }
.lp-s4 { background: #eaebf4; padding: 4rem 2.5rem 0; }
.lp-inner { max-width: 1100px; margin: 0 auto; }
.lp-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: #6366f1; text-transform: uppercase; margin-bottom: 0.5rem; }
.lp-section-title { font-size: 1.8rem; font-weight: 700; color: #1e1b4b; margin-bottom: 0.5rem; }
.lp-section-hook { font-size: 1rem; color: #534AB7; margin-bottom: 2.5rem; max-width: 600px; line-height: 1.6; }
.lp-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.lp-grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lp-nav-link { font-size: 0.875rem; font-weight: 500; color: #534AB7; text-decoration: none; padding: 6px 4px; opacity: 0.85; }
.lp-nav-link:hover { opacity: 1; text-decoration: underline; }
.lp-s-preus { background: #eaebf4; padding: 4rem 2.5rem; }
.lp-toggle-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2rem; }
.lp-tog { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; padding: 6px 18px; border-radius: 20px; border: 1.5px solid #c4bcf7; background: transparent; color: #534AB7; cursor: pointer; font-family: inherit; }
.lp-tog.lp-tog-active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.lp-tog.lp-tog-disabled { opacity: 0.55; pointer-events: none; }
.lp-tog-soon { font-size: 0.62rem; font-weight: 700; background: rgba(79,70,229,0.12); color: #6366f1; border-radius: 4px; padding: 1px 5px; letter-spacing: 0.03em; text-transform: uppercase; }
.lp-preus-grid { align-items: stretch; }
.lp-pcard { background: #fff; border: 0.5px solid #ddd9ff; border-radius: 16px; padding: 1.75rem 1.5rem; display: flex; flex-direction: column; }
.lp-pcard-featured { border: 2px solid #4f46e5; }
.lp-pcard-badge { display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; margin-bottom: 0.85rem; align-self: flex-start; }
.lp-badge-free { background: #f0eefd; color: #7c73d4; border: 1px solid #ddd9ff; }
.lp-badge-pro { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.lp-badge-school { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.lp-pcard-name { font-size: 1.05rem; font-weight: 700; color: #1e1b4b; margin-bottom: 2px; }
.lp-pcard-price { font-size: 2rem; font-weight: 700; color: #1e1b4b; margin: 0.4rem 0 0.2rem; line-height: 1.1; }
.lp-pcard-price span { font-size: 0.85rem; font-weight: 400; color: #9490c8; }
.lp-pcard-desc { font-size: 0.83rem; color: #6d6aaa; line-height: 1.5; margin-bottom: 0.25rem; }
.lp-pcard-div { border: none; border-top: 1px solid #ede9ff; margin: 0.9rem 0; }
.lp-pcard-feat { display: flex; align-items: flex-start; gap: 8px; font-size: 0.83rem; color: #534AB7; margin: 0.4rem 0; line-height: 1.4; }
.lp-feat-check { color: #8b87cc; font-weight: 700; flex-shrink: 0; line-height: 1.4; }
.lp-feat-check-pro { color: #4f46e5; }
.lp-pcard-cta { margin-top: auto; padding-top: 1.25rem; }
.lp-btn-pcard { width: 100%; padding: 10px; font-size: 0.875rem; font-weight: 600; border-radius: 10px; cursor: pointer; font-family: inherit; }
.lp-btn-pcard-outline { background: transparent; color: #4f46e5; border: 1.5px solid #c4bcf7; }
.lp-btn-pcard-outline:hover { background: #f0eefd; }
.lp-btn-pcard-pro { background: #4f46e5; color: #fff; border: none; }
.lp-btn-pcard-pro:hover { background: #4338ca; }
.lp-btn-pcard-school { background: #059669; color: #fff; border: none; }
.lp-btn-pcard-school:hover { background: #047857; }
.lp-preus-note { text-align: center; font-size: 0.8rem; color: #9490c8; margin-top: 1.5rem; }
.lp-card { background: #f8f7ff; border: 0.5px solid #ddd9ff; border-radius: 16px; padding: 1.75rem 1.5rem; }
.lp-card-white { background: #fff; }
.lp-card-icon { width: 48px; height: 48px; border-radius: 12px; background: #edeaff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.lp-card h3 { font-size: 1rem; font-weight: 600; color: #312e81; margin-bottom: 0.5rem; }
.lp-card p { font-size: 0.875rem; color: #534AB7; line-height: 1.65; }

/* Testimonis */
.lp-tcard { background: #f8f7ff; border: 0.5px solid #ddd9ff; border-radius: 16px; padding: 1.5rem; position: relative; }
.lp-tmodule { position: absolute; top: 1rem; right: 1rem; background: #edeaff; color: #4f46e5; font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.lp-tquote { font-size: 2.5rem; color: #c7d2fe; line-height: 1; font-family: Georgia, serif; }
.lp-tcard p { font-size: 0.875rem; color: #374151; line-height: 1.7; margin-bottom: 1.25rem; font-style: italic; }
.lp-tauthor { display: flex; align-items: center; gap: 10px; }
.lp-tavatar { width: 36px; height: 36px; border-radius: 50%; background: #edeaff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: #4f46e5; flex-shrink: 0; }
.lp-tname { font-weight: 600; font-size: 0.85rem; color: #312e81; }
.lp-trole { font-size: 0.75rem; color: #6b7280; }

/* CTA band */
.lp-cta-band { background: #312e81; padding: 2.5rem 3rem; border-radius: 18px 18px 0 0; max-width: 1100px; margin: 2.5rem auto 0; text-align: center; }
.lp-cta-band h2 { font-size: 1.75rem; font-weight: 700; color: #fff; margin-bottom: 0.6rem; }
.lp-cta-band p { color: #c7d2fe; font-size: 0.97rem; margin-bottom: 1.75rem; line-height: 1.7; }

/* Footer */
.lp-footer { background: #1e1b4b; padding: 1.25rem 2.5rem; text-align: center; color: #818cf8; font-size: 0.82rem; }
.lp-footer a { color: #a5b4fc; }
/* Neural background */
.lp-neural-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}
.lp-s1, .lp-s2, .lp-s3, .lp-s4 { position: relative; }
.lp-hero, .lp-docent-band, .lp-inner, .lp-cta-band { position: relative; z-index: 1; }
/* ── FI NOVA LANDING ────────────────────────────────────────────────────── */

/* --- Variables & Theming --- */
:root {
    /* Color Palette */
    --primary-color: #4f46e5;
    /* Indigo 600 - Technology, Trust */
    --primary-light: #6366f1;
    --primary-dark: #3730a3;

    --secondary-color: #f59e0b;
    /* Amber 500 - Warmth, Energy, Pedagogy */
    --accent-color: #10b981;
    /* Emerald 500 - Success, Growth */

    /* Grays & Neutrals */
    --bg-main: #f8fafc;
    /* Slate 50 */
    --bg-surface: #ffffff;
    --bg-sidebar: #0f172a;
    /* Slate 900 */

    --text-primary-dark: #f8fafc;
    --text-secondary-dark: #94a3b8;

    --text-primary-light: #0f172a;
    --text-secondary-light: #475569;
    --text-muted: #94a3b8;

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* --- Base Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Utility: hide elements (used by notification panel, toast, and other toggled UI) */
.hidden { display: none !important; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 1.5rem;
}

h2 {
    font-size: 1.25rem;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* --- Layout Structure --- */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #eaebf4;
    padding: 10px;
    gap: 10px;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: #312e81;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 20px);
    flex-shrink: 0;
    position: relative;
    z-index: 200;
    transition: width 0.25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.sidebar.collapsed {
    width: 52px;
}
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-info {
    display: none;
}
.sidebar.collapsed .brand-name {
    display: none;
}
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.65rem 0;
    margin: 0.15rem 6px;
}
.sidebar.collapsed .logo-badge-sidebar {
    justify-content: center;
    min-width: 0;
}
.sidebar.collapsed .logo-badge-sidebar img {
    margin: 0 auto;
}
.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 4px;
}
.sidebar.collapsed #sidebarToggleBtn {
    width: 28px;
    height: 28px;
    margin: 0 auto;
}
.sidebar.collapsed .user-profile-mini {
    justify-content: center;
}
.sidebar.collapsed .sidebar-footer {
    padding: 0.75rem 6px;
}
.sidebar.collapsed .footer-actions {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 0.5rem;
}
.sidebar.collapsed .footer-nav-item {
    flex: none !important;
    justify-content: center !important;
    padding: 0.4rem 0 !important;
    width: 100%;
}
.sidebar.collapsed .footer-nav-item span {
    display: none;
}
.sidebar-toggle-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.65);
    border-radius: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
    font-size: 13px;
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,0.2); }

.sidebar-header {
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* --- Logotipos (Imagen Real) --- */
.logo-container-hero {
    display: inline-block;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.85); /* Glassmorphism base */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    box-shadow: 
        0 15px 35px -5px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(99, 102, 241, 0.3); /* Indigo glow */
    margin-bottom: 2.5rem;
    transition: all var(--transition-normal);
    animation: logoBreathe 4s ease-in-out infinite;
}

@keyframes logoBreathe {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.2)); }
    50% { transform: scale(1.02); filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)); }
}

.brand-logo-large {
    height: 85px; /* Ligeramente más grande */
    width: auto;
    display: block;
}

.logo-container-sidebar {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.75rem;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.brand-logo-small {
    height: 40px;
    width: auto;
    display: block;
}

.sidebar-nav {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: none;
    margin: 0.15rem 0.5rem;
    border-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-item.active i {
    color: #c7d2fe;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-item span {
    transition: opacity 0.2s, width 0.25s;
}

.sidebar-footer {
    padding: 0.75rem 0.5rem;
    border-top: none;
    flex-shrink: 0;
}

.sidebar-brain {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: opacity 0.2s;
}

/* Indicador de desplaçament a la sidebar */
.sidebar-scroll-hint {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2px 0 4px;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    flex-shrink: 0;
    animation: sidebar-bounce 1.6s ease-in-out infinite;
}
.sidebar-scroll-hint.visible {
    display: flex;
}
.sidebar.collapsed .sidebar-scroll-hint {
    display: none !important;
}
@keyframes sidebar-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50%       { transform: translateY(4px); opacity: 0.85; }
}

/* Barra de progrés generació SdA */
.sda-gen-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
}
.sda-gen-progress .sda-gen-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.sda-progress-track {
    width: 78%;
    max-width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}
.sda-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    transition: width 0.45s ease;
}
.sda-progress-pct {
    font-size: 0.7rem;
    opacity: 0.65;
    letter-spacing: 0.02em;
}

.sidebar-brain img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    display: block;
}

.sidebar.collapsed .sidebar-brain {
    display: none;
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary-dark);
}

/* --- Plan badge (sidebar footer) --- */
.plan-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 20px;
    flex-shrink: 0;
    line-height: 1.6;
}
.plan-badge.plan-free {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.18);
}
.plan-badge.plan-pro {
    background: rgba(139,92,246,0.25);
    color: #c4b5fd;
    border: 1px solid rgba(139,92,246,0.4);
}
.plan-badge.plan-school {
    background: rgba(16,185,129,0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16,185,129,0.35);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 20px);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    min-width: 0;
    background: #f8f7ff;
    border-radius: 16px;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: #f8f7ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: none;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 16px 16px 0 0;
    padding-bottom: 0;
}

#current-module-icon {
    color: #4f46e5;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.25rem;
    color: var(--text-secondary-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    font-size: 1.25rem;
    color: var(--text-secondary-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.btn-icon:hover {
    background-color: var(--bg-main);
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.4);
}

/* === Botons CTA unificats del generador de SdA === */
.btn-sda-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn-sda-cta:hover { transform: translateY(-2px) scale(1.03); }
.btn-sda-cta:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* PDF – índigo */
.btn-sda-cta--pdf { background-color: #6366f1; box-shadow: 0 4px 12px -1px rgba(99,102,241,0.35); }
.btn-sda-cta--pdf:hover:not(:disabled) { background-color: #4f46e5; box-shadow: 0 6px 18px -1px rgba(99,102,241,0.45); }

/* Calendari – teal */
.btn-sda-cta--cal { background-color: #14b8a6; box-shadow: 0 4px 12px -1px rgba(20,184,166,0.35); }
.btn-sda-cta--cal:hover:not(:disabled) { background-color: #0d9488; box-shadow: 0 6px 18px -1px rgba(20,184,166,0.45); }

/* Desar – emerald */
.btn-sda-cta--save { background-color: #10b981; box-shadow: 0 4px 12px -1px rgba(16,185,129,0.35); }
.btn-sda-cta--save:hover:not(:disabled) { background-color: #059669; box-shadow: 0 6px 18px -1px rgba(16,185,129,0.45); }

/* Retrocompat: àlies antics */
.btn-save-sda-green { background-color: #10b981; color: white; border: none; cursor: pointer; }
.btn-save-sda-green:hover { background-color: #059669; transform: translateY(-1px); }
.btn-save-sda-green:disabled { background-color: #6ee7b7; cursor: not-allowed; transform: none; }

/* Body Area */
.content-body {
    background-color: var(--bg-main);
    padding: 2rem;
    position: relative;
}

/* --- Modules Display --- */
/* By default, sections are hidden. Only sections with 'active' class inside module-view are shown */
body .module-view {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

body .module-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- UI Components (Cards, Forms etc.) --- */
.card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    scroll-margin-top: 100px; /* Offset for sticky header and action area */
}

.glow {
    position: relative;
    overflow: hidden;
}

.glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.card-content {
    position: relative;
    z-index: 1;
}

.welcome-card h2 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.welcome-card p {
    color: var(--text-secondary-light);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary-light);
}

.list-group {
    list-style: none;
}

.list-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary-light);
}

.list-item:last-child {
    border-bottom: none;
}

.badge {
    background-color: #f1f5f9;
    color: var(--text-secondary-light);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
}

.badge.highlight {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--secondary-color);
}

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

.stat-box {
    background: rgba(79, 70, 229, 0.03);
    border: 1px solid rgba(79, 70, 229, 0.1);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Forms */
.textarea-input {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary-light);
    resize: vertical;
    transition: border-color var(--transition-fast);
    margin-top: 1rem;
}

.textarea-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.w-full {
    width: 100%;
}

.text-sm {
    font-size: 0.875rem;
}

.text-primary {
    color: var(--primary-color);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary-light);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--primary-light);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out forwards;
}

.tab-content.active {
    display: block;
}

/* File Upload Area */
.file-drop-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 2.5rem 1rem;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--primary-light);
    background-color: rgba(99, 102, 241, 0.05);
}

.file-drop-area i {
    font-size: 2.5rem;
    color: var(--text-secondary-light);
    margin-bottom: 1rem;
    transition: color var(--transition-fast);
}

.file-drop-area:hover i {
    color: var(--primary-light);
}

.file-drop-area p {
    font-weight: 500;
    color: var(--text-primary-light);
    margin-bottom: 0.5rem;
}

.file-info {
    font-size: 0.8rem;
    color: var(--text-secondary-light);
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.remove-file-btn {
    color: #ef4444;
    /* red-500 */
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

/* Alerts / Results */
.alert {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-warning {
    background-color: #fffbeb;
    /* amber-50 */
    border: 1px solid #fcd34d;
    /* amber-300 */
    color: #92400e;
    /* amber-900 */
}

/* Nivell de confiança de l'Auditor de neuromites (basat en cerca bibliogràfica real) */
.confidence-box {
    margin-top: 0.9rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid;
    background: #fff;
}
.confidence-header { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; margin-bottom: 0.35rem; }
.confidence-detail, .confidence-caveat { font-size: 0.78rem; margin: 0.2rem 0 0 0; line-height: 1.4; }
.confidence-caveat { font-style: italic; opacity: 0.85; }
.confidence-box.nc-alt { border-color: #86efac; background: #f0fdf4; }
.confidence-box.nc-alt .confidence-header { color: #15803d; }
.confidence-box.nc-mitja { border-color: #fcd34d; background: #fffbeb; }
.confidence-box.nc-mitja .confidence-header { color: #b45309; }
.confidence-box.nc-baix { border-color: #fca5a5; background: #fef2f2; }
.confidence-box.nc-baix .confidence-header { color: #b91c1c; }
.confidence-box.nc-nodeterminat { border-color: #cbd5e1; background: #f8fafc; }
.confidence-box.nc-nodeterminat .confidence-header { color: #475569; }

.alert h4 {
    color: #b45309;
    /* amber-700 */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.quote {
    font-style: italic;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.75rem;
    border-left: 3px solid #fbbf24;
    /* amber-400 */
    margin-bottom: 1rem;
    border-radius: 0 4px 4px 0;
}

.alert hr {
    border: 0;
    height: 1px;
    background: rgba(245, 158, 11, 0.2);
    margin: 1rem 0;
}

/* --- Form Utilities --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.gap-4 {
    gap: 1rem;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary-light);
    transition: all var(--transition-fast);
    background-color: white;
}

.form-input option {
    background-color: white;
    color: #0f172a;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.min-h-20 {
    min-height: 5rem;
}

/* Toggles */
.toggle {
    width: 3.25rem;
    height: 1.75rem;
    background-color: #cbd5e1;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.5rem;
    height: 1.5rem;
    background-color: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle.active {
    background-color: var(--primary-light);
}

.toggle.active::after {
    transform: translateX(1.5rem);
}

/* --- Timeline components --- */
.timeline-container {
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 1.5rem;
}

.timeline-icon {
    top: -4px;
}

.alert h5 {
    color: #92400e;
    margin-bottom: 0.25rem;
}

.alert p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    background: rgba(79, 70, 229, 0.05);
}

/* --- Premium Utilities (Tailwind Ports) --- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--text-muted);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary-light);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* =========================================
   Interactive SdA Highlights (Tooltips)
   ========================================= */

.neuro-highlight {
    position: relative;
    display: inline-block;
    cursor: help;
    font-weight: 600;
    padding: 0 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Tooltip Base (Hidden) */
.neuro-highlight::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #1e293b;
    /* slate-800 */
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;

    /* FIX: Allow wrapping and limit width to prevent clipping */
    white-space: normal;
    width: max-content;
    max-width: 250px;
    text-align: center;
    line-height: 1.3;

    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 300;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

/* Tooltip Arrow (Hidden) */
.neuro-highlight::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 299;
    pointer-events: none;
}

/* Show Tooltip on Hover */
.neuro-highlight:hover::before,
.neuro-highlight:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Support Colors (Emerald Theme) */
.support-hl {
    background-color: #d1fae5;
    /* emerald-100 */
    color: #047857;
    /* emerald-700 */
    border-bottom: 2px dashed #34d399;
    /* emerald-400 */
}

.support-hl:hover {
    background-color: #a7f3d0;
    /* emerald-200 */
}

/* Executive Function Colors (Violet Theme) */
.ef-hl {
    background-color: #ede9fe;
    /* violet-100 */
    color: #6d28d9;
    /* violet-700 */
    border-bottom: 2px dashed #a78bfa;
    /* violet-400 */
}

.ef-hl:hover {
    background-color: #ddd6fe;
    /* violet-200 */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .mobile-menu-btn {
        display: block;
    }
}


/* ── Mobile sidebar overlay ───────────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
    display: block;
}
@media (max-width: 768px) {
    .sidebar {
        z-index: 999;
    }
}
/* ─────────────────────────────────────────────────────────────────────────── */
/* --- Adjustment Rows & iOS Style Toggles --- */
.adjustment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.adjustment-row .flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.adjustment-row .text-rose-500 {
    color: #f43f5e;
}

.adjustment-row .text-indigo-500 {
    color: #6366f1;
}

.adjustment-row .text-emerald-500 {
    color: #10b981;
}

/* Fix Button Generate SdA - Ensure it doesn't overlap results */
.btn-generate-sda-container {
    position: relative;
    z-index: 5;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-generate-sda {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Vector Transversal Badges / Buttons */
.vector-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.vector-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.vector-btn.active {
    background-color: var(--primary-light);
    color: #ffffff;
    border-color: var(--primary-light);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.vector-btn.active i {
    color: #ffffff;
}
/* --- Gemini-style Chat Interface --- */
.gemini-chat-outer-container {
    position: relative;
    width: 100%;
    margin-top: 1.5rem;
    z-index: 10005 !important;
    pointer-events: auto !important;
}

.gemini-chat-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 1.5rem;
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05), inset 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 10006 !important;
    pointer-events: auto !important;
}

.gemini-chat-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.1), 0 8px 10px -6px rgba(79, 70, 229, 0.1);
    background: #ffffff;
}

.gemini-textarea {
    flex: 1; min-height: 0;
    background: transparent;
    border: none;
    resize: none;
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    color: var(--text-primary-light);
    max-height: 200px;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
    position: relative;
    z-index: 10007 !important;
    pointer-events: auto !important;
}

.gemini-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.gemini-send-btn {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
    margin-bottom: 2px;
    position: relative;
    z-index: 10008 !important;
    pointer-events: auto !important;
}

.gemini-send-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
    box-shadow: 0 6px 10px -1px rgba(79, 70, 229, 0.4);
}

.gemini-send-btn:active {
    transform: scale(0.95);
}

.gemini-send-btn:disabled {
    background: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Fix for overlapping effect host if it exists */
#preact-border-shadow-host {
    pointer-events: none !important;
    display: none !important;
}

/* --- Login Screen Styles --- */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background-color: var(--bg-surface);
    overflow-y: auto;
}

.login-container {
    display: flex;
    min-height: 100vh;
    animation: fadeIn 0.6s ease-out;
}

.login-branding {
    flex: 1;
    background-color: var(--bg-sidebar);
    background-image: 
        linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%),
        url('sidebar-bg.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    display: flex;
    align-items: center;
    padding: 2rem 4rem;
    color: white;
}

.branding-content {
    max-width: 500px;
}

.benefit-list {
    list-style: none;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.login-forms {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--bg-main);
}

.forms-wrapper {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: var(--radius-md);
    gap: 0.25rem;
}

.auth-tab {
    flex: 1;
    padding: 0.6rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary-light);
    transition: all var(--transition-fast);
}

.auth-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
    animation: slideUp 0.4s ease-out;
}

.auth-form.active {
    display: block;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }
    .login-branding {
        padding: 3rem 2rem;
        text-align: center;
    }
    .branding-content {
        margin: 0 auto;
    }
    .benefit-list li {
        justify-content: center;
    }
}
.multi-select-nee { height: auto !important; min-height: 120px; padding: 0.5rem !important; } .multi-select-nee option { padding: 0.5rem; border-radius: 4px; margin-bottom: 2px; } .multi-select-nee option:checked { background-color: var(--primary-color) !important; color: white !important; }

/* --- Utility Spacing --- */
.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-8 { margin-top: 2rem !important; }
.mt-10 { margin-top: 2.5rem !important; }
.mt-12 { margin-top: 3rem !important; }

.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

.pt-6 { padding-top: 1.5rem !important; }
.pt-8 { padding-top: 2rem !important; }
.pt-10 { padding-top: 2.5rem !important; }
.pt-12 { padding-top: 3rem !important; }

/* --- Rubric Table Styles --- */
.sda-rubric-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    background-color: white;
    margin-bottom: 1rem;
}

.sda-rubric-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    table-layout: fixed;
    min-width: 800px; /* Force minimum width for horizontal scroll on mobile */
}

.sda-rubric-table th, 
.sda-rubric-table td {
    border: 1px solid #e2e8f0;
    padding: 1rem;
    text-align: left;
    vertical-align: top;
    line-height: 1.4;
}

.sda-rubric-table th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-size: 0.7rem;
}

.sda-rubric-table th:first-child { width: 25%; }
.sda-rubric-table th:not(:first-child) { width: 18.75%; }

.sda-rubric-table .level-excellent { background-color: #f0fdf4; color: #166534; }
.sda-rubric-table .level-notable { background-color: #f0f9ff; color: #075985; }
.sda-rubric-table .level-satisfactory { background-color: #fffbeb; color: #92400e; }
.sda-rubric-table .level-fail { background-color: #fef2f2; color: #991b1b; }

.sda-rubric-table [contenteditable]:focus {
    outline: 2px solid var(--primary-light);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    z-index: 10;
    position: relative;
}

.sda-rubric-table tr:hover .sda-btn-del-rubric-row {
    opacity: 1;
}

.sda-btn-del-rubric-row {
    opacity: 0;
    transition: opacity 0.2s;
}

/* --- Neuro Legend Styles --- */
.sda-legend-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px dashed rgba(99, 102, 241, 0.2);
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.fe {
    background-color: #34d399;
    box-shadow: 0 0 0 4px #d1fae5;
}
.legend-dot.fe-ic {
    background-color: #fb923c;
    box-shadow: 0 0 0 4px #ffedd5;
}
.legend-dot.fe-wm {
    background-color: #60a5fa;
    box-shadow: 0 0 0 4px #dbeafe;
}
.legend-dot.fe-cf {
    background-color: #34d399;
    box-shadow: 0 0 0 4px #d1fae5;
}
.legend-dot.dua {
    background-color: #a78bfa;
    box-shadow: 0 0 0 4px #ede9fe;
}

/* ====================================================
   TOOLTIP PORTAL (position: fixed, mai amagat)
   ==================================================== */
#neuro-tooltip-portal {
    position: fixed;
    z-index: 99999;
    width: 350px;
    max-width: calc(100vw - 24px);
    padding: 1.1rem 1.25rem;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.6;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 24px 32px -8px rgba(0, 0, 0, 0.55), 0 8px 12px -4px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    pointer-events: none;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    opacity: 0;
    display: none;
    transition: opacity 0.18s ease;
}
#neuro-tooltip-portal.visible {
    display: block;
    opacity: 1;
}

/* Suprimir el tooltip CSS ::after original quan el portal gestiona l'element */
.neuro-highlight.portal-init::after,
.neuro-highlight.portal-init::before {
    display: none !important;
}

/* --- Landing Page Redesign --- */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    overflow-x: hidden;
    background-color: #060912; /* Un tono más oscuro para contraste */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.4) 0%, transparent 70%),
        linear-gradient(135deg, rgba(99, 102, 241, 0.5) 0%, rgba(15, 23, 42, 0.7) 100%),
        url('sidebar-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: screen, normal, normal;
    filter: brightness(1.1);
}

.landing-header {
    padding: 0.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999; /* Asegurar que esté por encima de TODO */
    border: none !important;
    pointer-events: auto !important;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.landing-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    pointer-events: none; /* Dejar pasar clics a la cabecera si no estamos sobre la tarjeta */
}

.hero-section {
    max-width: 900px;
    width: 100%;
    text-align: center;
    margin-top: 100px; /* Reducido para que haya menos 'aire' */
    margin-bottom: 4rem;
    pointer-events: auto; /* Recuperar clics para la tarjeta y sus botones */
}

.glass-hero-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2.5rem;
    padding: 5rem 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.text-accent-glow {
    color: var(--primary-light);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    margin-bottom: 4rem;
}

.product-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}

.pillar {
    text-align: center;
}

.pillar i {
    font-size: 1.75rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    display: block;
}

.pillar h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.pillar p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    line-height: 1.4;
}

.landing-footer {
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.landing-lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 1rem;
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.lang-btn.active {
    color: rgba(255, 255, 255, 0.95);
}

.lang-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
}

.landing-footer-contact {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.landing-footer-contact a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    transition: color 0.2s, border-color 0.2s;
}

.landing-footer-contact a:hover {
    color: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

/* Auth Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.auth-modal.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.auth-modal-overlay {
    position: fixed; /* fix for overlay scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin: 5vh auto 2rem auto; /* Ensures top space and bottom space for scrolling */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal.hidden .auth-modal-content {
    transform: translateY(20px);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: #f1f5f9;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Button Variants for Landing */
.btn-ghost-sm {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-ghost-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-primary-sm {
    background: var(--primary-color);
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary-sm:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(79, 70, 229, 0.4);
}

.btn-primary-lg {
    background: var(--primary-color);
    border: none;
    color: #ffffff;
    padding: 1.25rem 2.5rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary-lg:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.shadow-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .product-pillars { grid-template-columns: 1fr; gap: 1.5rem; }
    .glass-hero-card { padding: 2.5rem 1.5rem; }
    .header-left { gap: 1rem; }
}

/* --- Original Logo Integrated (Transparent) --- */
.logo-badge-header {
    background: transparent;
    padding: 0;
    border: none !important; /* Eliminamos cualquier línea residual */
    outline: none !important;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.logo-badge-header:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
}

.brand-logo-original {
    height: 180px; /* Reducido ligeramente al ser más estrecho */
    width: auto;
    display: block;
    filter: brightness(1.1) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    transition: all var(--transition-normal);
}

.logo-badge-sidebar {
    background: transparent;
    padding: 0;
    display: inline-block;
}

.brand-logo-original-sm {
    height: 100px; /* Coherencia con el nuevo tamaño grande */
    width: auto;
    display: block;
    filter: brightness(1.1);
}
/* --- Pop-ups Neuroeducativos v2.0 --- */
.neuro-highlight {
    position: relative;
    cursor: help;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline;
}

.neuro-highlight.fe-hl {
    background: rgba(52, 211, 153, 0.1);
    border-bottom: 2px solid #34d399;
}

/* Subtipus FE específics (Diamond, 2013) */
.neuro-highlight.fe-ic-hl {
    background: rgba(251, 146, 60, 0.12);
    border-bottom: 2px solid #fb923c;
}
.neuro-highlight.fe-wm-hl {
    background: rgba(96, 165, 250, 0.12);
    border-bottom: 2px solid #60a5fa;
}
.neuro-highlight.fe-cf-hl {
    background: rgba(52, 211, 153, 0.1);
    border-bottom: 2px solid #34d399;
}

.neuro-highlight.dua-hl {
    background: rgba(167, 139, 250, 0.1);
    border-bottom: 2px solid #a78bfa;
}

.neuro-highlight:hover {
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

/* Tooltip base */
.neuro-highlight::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 350px;
    max-width: calc(100vw - 40px);
    padding: 1.25rem;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.6;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
    pointer-events: none;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    backdrop-filter: blur(8px);
}
/* Evitar que el tooltip surti de la pantalla pels marges */
.neuro-highlight {
    position: relative;
}

.neuro-highlight:hover::after {
    opacity: 1;
    visibility: visible;
    transform: var(--tooltip-transform, translateX(-50%)) translateY(0);
    left: var(--tooltip-left, 50%);
    right: var(--tooltip-right, auto);
}

/* Flecha del tooltip */
.neuro-highlight::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(99, 102, 241, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.neuro-highlight:hover::before {
    opacity: 1;
    visibility: visible;
}

/* --- RESPONSIVE DESIGN (Mòbils i tauletes petites) --- */
@media (max-width: 768px) {
    /* 1. Amagar Sidebar i convertir-la en un "Off-Canvas" */
    .sidebar {
        transform: translateX(-100%) !important;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 280px !important;
        height: 100vh !important;
        display: flex !important;
        z-index: 999999 !important;
        transition: transform 0.3s ease !important;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5) !important;
    }

    .sidebar.open {
        transform: translateX(0) !important;
    }

    /* 2. El Main Content ha d'ocupar tota l'amplada i treure marges */
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .content-body {
        padding: 1rem;
    }

    /* 3. Ajustar Top Header */
    .top-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        height: auto;
    }

    .top-header .header-left {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .top-header .header-right {
        width: 100%;
        justify-content: space-between;
    }

    /* Mostrar botó menú hamburguesa */
    .mobile-menu-btn {
        display: block !important;
        font-size: 1.5rem;
        color: var(--text-primary);
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        z-index: 1000;
        pointer-events: auto !important;
        padding: 0.5rem;
    }

    /* 4. Grids a 1 Columna */
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    /* 5. Ajustos de formularis i taules */
    .sda-rubric-wrapper {
        overflow-x: auto;
    }

    .auth-modal-content {
        padding: 1.5rem;
        margin: 2rem auto;
    }
}

/* --- Module G: NeuroIA Chat --- */
.neuro-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.neuro-chip:hover {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #6d28d9;
    transform: translateY(-1px);
}

.chat-msg-bot .chat-bubble {
    background: white;
    border-radius: 0 1rem 1rem 1rem;
    border: 1px solid #e2e8f0;
}

.chat-msg-user .chat-bubble {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: white;
    border-radius: 1rem 0 1rem 1rem;
}

/* Typing indicator */
.typing-dots {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    padding: 0.5rem 0;
}

.typing-dots span {
    width: 0.5rem;
    height: 0.5rem;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-6px); opacity: 1; }
}

/* Chat response markdown-like formatting */
#neuro-chat-messages strong {
    font-weight: 700;
    color: #1e293b;
}

#neuro-chat-messages .chat-msg-user strong {
    color: white;
}


/* ========== ONBOARDING MODAL ========== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: obFadeIn 0.2s ease;
}
@keyframes obFadeIn { from { opacity: 0; } to { opacity: 1; } }

.onboarding-card {
    background: #1e293b;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 1.5rem;
    padding: 2.25rem 2rem 2rem;
    max-width: 420px;
    width: 90%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    animation: obSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Contingut scrollable quan el text és llarg */
.onboarding-card p#onboarding-desc {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    margin-bottom: 1.25rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}

/* Botó sempre visible al fons */
.onboarding-btn-ok {
    flex-shrink: 0;
}
@keyframes obSlideUp {
    from { transform: translateY(32px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.onboarding-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.onboarding-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.75rem;
}

.onboarding-card p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: #94a3b8;
    margin-bottom: 1.75rem;
}

.onboarding-btn-ok {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.7rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s, transform 0.2s;
}
.onboarding-btn-ok:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.onboarding-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: 1.5px solid rgba(124, 58, 237, 0.45);
    color: #7c3aed;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.onboarding-help-btn:hover {
    background: rgba(124, 58, 237, 0.12);
    transform: scale(1.1);
}

/* ========== SdA OUTPUT - MILLORA LLEGIBILITAT ========== */

/* Paràgrafs generats per applyNeuroFormatting */
.sda-text-para {
    margin: 0 0 0.65rem 0;
    line-height: 1.75;
    font-size: 0.875rem;
    color: #1e3a5f;
}
.sda-text-para:last-child { margin-bottom: 0; }

/* Bloc de sessió */
.sda-session-block {
    margin-bottom: 1.75rem;
    border-left: 3px solid #5eead4;
    padding-left: 1rem;
}
.sda-session-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f766e;
    margin-bottom: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #ccfbf1;
}

/* Header de sessió: check + títol + data */
.sda-session-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #ccfbf1;
}
.sda-session-header .sda-session-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
}
.sda-session-check-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    color: #94a3b8;
    padding: 0.1rem 0.15rem;
    transition: color 0.15s, transform 0.12s;
    flex-shrink: 0;
    line-height: 1;
}
.sda-session-check-btn:hover { color: #14b8a6; transform: scale(1.15); }
.sda-session-check-btn.is-done { color: #10b981; }

/* Sessió completada */
.sda-session-block.completed { border-left-color: #10b981; }
.sda-session-block.completed .sda-session-title { color: #059669; }

/* Data (PRO) */
.sda-session-date-input {
    font-size: 0.7rem;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    padding: 0.18rem 0.4rem;
    background: rgba(255,255,255,0.7);
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
}
.sda-session-date-input:hover, .sda-session-date-input:focus {
    border-color: #5eead4;
    outline: none;
}

/* Check per activitat */
.sda-activity-check-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #cbd5e1;
    padding: 0 0.25rem 0 0;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s, transform 0.12s;
}
.sda-activity-check-btn:hover { color: #14b8a6; transform: scale(1.15); }
.sda-activity-check-btn.is-done { color: #10b981; }
.sda-activity-card.completed { opacity: 0.75; }
.sda-activity-card.completed .sda-activity-name { text-decoration: line-through; color: #64748b; }

/* Observacions */
.sda-observations-wrap {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px dashed #ccfbf1;
}
.sda-observations-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #5eead4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}
.sda-observations-textarea {
    width: 100%;
    min-height: 54px;
    background: rgba(255,255,255,0.5);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.55;
    resize: vertical;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}
.sda-observations-textarea:focus {
    outline: none;
    border-color: #5eead4;
    background: rgba(255,255,255,0.85);
}
.sda-observations-textarea::placeholder { color: #94a3b8; font-style: italic; }

/* Targeta d'activitat */
.sda-activity-card {
    background: rgba(255,255,255,0.65);
    border: 1px solid #99f6e4;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    margin-bottom: 0.9rem;
    box-shadow: 0 1px 4px rgba(20,184,166,0.07);
}
.sda-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}
.sda-activity-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f766e;
    line-height: 1.4;
}
.sda-activity-badges {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.sda-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}
.sda-badge-org {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.sda-badge-time {
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #99f6e4;
}
.sda-activity-body {
    font-size: 0.875rem;
    color: #134e4a;
    line-height: 1.75;
}

/* Més espaiat general als blocs de fase de la timeline */
.timeline-item .bg-slate-50 p,
.timeline-item .bg-indigo-50 p,
.timeline-item .bg-teal-50 p {
    line-height: 1.75;
    font-size: 0.875rem;
}

/* --- NOU PROJECTE DROPDOWN --- */
#new-project-wrapper {
    position: relative;
}
#new-project-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 280px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    z-index: 9999;
    overflow: hidden;
    animation: dropdownFadeIn 0.15s ease;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
#new-project-menu.hidden { display: none; }
.np-header {
    padding: 12px 16px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.np-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}
.np-option:last-child { margin-bottom: 6px; }
.np-option:hover { background: #f8fafc; }
.np-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}
.np-icon.sda  { background: #e0e7ff; color: #4f46e5; }
.np-icon.dua  { background: #f3e8ff; color: #9333ea; }
.np-icon.neuro { background: #ccfbf1; color: #0f766e; }
.np-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    display: block;
    line-height: 1.3;
}
.np-sublabel {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
    line-height: 1.3;
}
.np-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 2px 0;
}

/* Privacy disclaimer box (SdA form) */
.privacy-disclaimer-box {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.6rem;
    padding: 0.6rem 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    color: #92400e;
    line-height: 1.45;
}
.privacy-disclaimer-icon {
    color: #d97706;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ── Registration consent checkboxes ─────────────────────── */
.reg-consents-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.reg-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}
.reg-consent-check {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 0.18rem;
    accent-color: #4f46e5;
    cursor: pointer;
}
.reg-consent-text {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
}
.reg-consent-link {
    color: #4f46e5;
    text-decoration: underline;
    font-weight: 500;
}
.reg-consent-link:hover { color: #3730a3; }
.reg-consent-required {
    color: #ef4444;
    font-weight: 700;
}
.reg-consent-optional .reg-consent-text { color: #64748b; }
.reg-consent-optional-tag {
    font-size: 0.72rem;
    color: #94a3b8;
    font-style: italic;
}
.reg-consent-note {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}
/* Highlight row on error */
.reg-consent-row.consent-error .reg-consent-text { color: #ef4444; }
.reg-consent-row.consent-error .reg-consent-check { outline: 2px solid #ef4444; border-radius: 2px; }

/* ==========================================================================
   Notification System (bell + panel + toast)
   ========================================================================== */

/* Badge sobre la campana */
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 17px; height: 17px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    pointer-events: none;
    line-height: 1;
}

/* Panell desplegable */
.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow: hidden;
}
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
}
.notif-clear-btn {
    font-size: 0.72rem;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s;
}
.notif-clear-btn:hover { color: #ef4444; }

/* Llista */
.notif-list {
    max-height: 340px;
    overflow-y: auto;
}
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: #cbd5e1;
    font-size: 0.8rem;
}
.notif-empty i { font-size: 1.5rem; }

/* Item individual */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f8fafc; }
.notif-read { opacity: 0.55; }

.notif-item-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.15rem;
}
.notif-item-msg {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}
.notif-item-time {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Toast flotant */
.notif-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #1e293b;
    color: #fff;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 99999;
    max-width: 320px;
    min-width: 240px;
}
.notif-toast-in  { animation: toastSlideIn  0.28s cubic-bezier(.34,1.56,.64,1) forwards; }
.notif-toast-out { animation: toastSlideOut 0.25s ease-in forwards; }
@keyframes toastSlideIn  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastSlideOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(10px); } }

.notif-toast-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    color: #fff;
}
.notif-toast-body { flex: 1; min-width: 0; }
.notif-toast-title { font-size: 0.8rem; font-weight: 700; }
.notif-toast-msg   { font-size: 0.72rem; color: #94a3b8; margin-top: 0.1rem; line-height: 1.35; }
.notif-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: color 0.15s;
}
.notif-toast-close:hover { color: #fff; }

/* Password strength requirements */
.reg-pass-reqs {
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.req-item {
    font-size: 0.73rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}
.req-fail { color: #94a3b8; }
.req-fail i { color: #cbd5e1; }
.req-ok   { color: #16a34a; }
.req-ok i { color: #16a34a; }
.form-input.pass-error { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239,68,68,0.15); }

/* Password toggle button */
.password-toggle-btn {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}
.password-toggle-btn:hover { color: #6d28d9; }

/* ==========================================================================
   Neuromyth Audit History Accordion
   ========================================================================== */
.neuro-history-item {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: #ffffff;
    transition: box-shadow var(--transition-fast);
}
.neuro-history-item:hover {
    box-shadow: var(--shadow-md);
}
.neuro-history-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-fast);
}
.neuro-history-header:hover {
    background: #f8fafc;
}
.neuro-history-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.neuro-history-icon.has-neuromit {
    background: #fff7ed;
    color: #ea580c;
    border: 1.5px solid #fed7aa;
}
.neuro-history-icon.no-neuromit {
    background: #f0fdf4;
    color: #16a34a;
    border: 1.5px solid #bbf7d0;
}
.neuro-history-title {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.neuro-history-date {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 0.5rem;
}
.neuro-history-chevron {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform var(--transition-fast);
    margin-left: 0.25rem;
}
.neuro-history-chevron.open {
    transform: rotate(180deg);
}
.neuro-history-body {
    padding: 0.75rem 1rem 1rem 1rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}
.neuro-history-body.hidden {
    display: none;
}
.neuro-history-snippet {
    background: #f1f5f9;
    border-left: 3px solid #cbd5e1;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}
.neuro-history-snippet-text {
    font-size: 0.78rem;
    color: #475569;
    font-style: italic;
    line-height: 1.5;
}
.neuro-history-field {
    margin-bottom: 0.6rem;
}
.neuro-history-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.2rem;
}
.neuro-history-value {
    font-size: 0.82rem;
    color: #1e293b;
    line-height: 1.5;
}
.neuro-history-quote {
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: #92400e;
    font-style: italic;
    line-height: 1.5;
}
.neuro-history-ok {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    color: #15803d;
    font-weight: 500;
    margin-bottom: 0.6rem;
}
.neuro-history-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    color: #ef4444;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.neuro-history-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* ============================================================
   LEGAL DOCUMENT MODALS (Privacitat + Condicions d'Ús)
   ============================================================ */
#modal-privacitat,
#modal-condicions {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(49, 46, 129, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#modal-privacitat.open,
#modal-condicions.open {
    display: flex;
}
.legal-modal-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(49,46,129,0.18);
    width: 100%;
    max-width: 780px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem 1rem;
    border-bottom: 1px solid #ede9fe;
    background: #f8f7ff;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}
.legal-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #312e81;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.legal-modal-header h2 i {
    color: #7c3aed;
    font-size: 1rem;
}
.legal-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.2rem;
    padding: 0.25rem 0.4rem;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.legal-modal-close:hover {
    background: #ede9fe;
    color: #312e81;
}
.legal-modal-body {
    overflow-y: auto;
    padding: 1.5rem 1.75rem 2rem;
    flex: 1;
    scroll-behavior: smooth;
}
.legal-modal-body h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #312e81;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}
.legal-modal-body .legal-subtitle {
    font-size: 0.82rem;
    color: #7c3aed;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: block;
}
.legal-modal-body h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #312e81;
    margin: 1.5rem 0 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ede9fe;
}
.legal-modal-body h3 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #4f46e5;
    margin: 1rem 0 0.3rem;
}
.legal-modal-body p {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.65;
    margin-bottom: 0.6rem;
}
.legal-modal-body ul {
    margin: 0.4rem 0 0.8rem 1.2rem;
    padding: 0;
}
.legal-modal-body ul li {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.3rem;
}
.legal-modal-body .legal-highlight {
    background: #f3f0ff;
    border-left: 3px solid #7c3aed;
    border-radius: 0 8px 8px 0;
    padding: 0.6rem 1rem;
    margin: 0.75rem 0;
    font-size: 0.82rem;
    color: #374151;
}
.legal-modal-footer {
    padding: 0.85rem 1.75rem;
    border-top: 1px solid #ede9fe;
    background: #f8f7ff;
    border-radius: 0 0 20px 20px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}
.legal-modal-footer button {
    background: #312e81;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s;
}
.legal-modal-footer button:hover {
    background: #4338ca;
}

/* ==========================================================================
   Design refresh – SdA history cards, aula profile cards, header help btn
   ========================================================================== */

/* --- Botó ajuda a la capçalera --- */
#current-help-btn.onboarding-help-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    margin-left: 2px;
}

/* --- Targetes SdA (Àrea Personal) --- */
.sda-history-card {
    background: #fff;
    border: 1px solid #e0deff;
    border-radius: 14px;
    padding: 1.1rem 1.15rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: box-shadow 0.18s, border-color 0.18s;
    cursor: pointer;
}
.sda-history-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 4px 18px rgba(99,102,241,0.10);
}
.sda-history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.sda-history-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.sda-history-card-del {
    background: none;
    border: none;
    color: #c7d2fe;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: color 0.15s, background 0.15s;
}
.sda-history-card-del:hover { color: #ef4444; background: #fff1f2; }
.sda-history-card-body { flex: 1; }
.sda-history-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e1b4b;
    line-height: 1.35;
    margin-bottom: 2px;
}
.sda-history-card-sub {
    font-size: 0.75rem;
    color: #818cf8;
    font-weight: 500;
}
.sda-history-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.35rem;
    padding-top: 0.6rem;
    border-top: 1px solid #f0eeff;
}
.sda-history-card-date {
    font-size: 0.72rem;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sda-history-card-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 2px 7px;
}

/* --- Targetes Aula (Perfil Docent) --- */
.aula-profile-card {
    background: #fff;
    border: 1px solid #e0deff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.aula-profile-card:hover { border-color: #a5b4fc; box-shadow: 0 2px 10px rgba(99,102,241,0.08); }
.aula-profile-card-left { display: flex; align-items: center; gap: 0.65rem; }
.aula-profile-icon {
    width: 32px; height: 32px;
    background: #eef2ff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #6366f1;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.aula-profile-name { font-size: 0.85rem; font-weight: 700; color: #1e1b4b; }
.aula-profile-nee { font-size: 0.72rem; color: #818cf8; font-weight: 500; margin-top: 1px; }
.aula-profile-funcional { font-size: 0.7rem; color: #64748b; font-weight: 400; margin-top: 3px; font-style: italic; cursor: help; }
.aula-profile-funcional i { color: #0d9488; margin-right: 2px; }
.aula-profile-del {
    background: none; border: none;
    color: #c7d2fe; cursor: pointer;
    padding: 4px 6px; border-radius: 6px;
    font-size: 0.8rem; flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}
.aula-profile-del:hover { color: #ef4444; background: #fff1f2; }

/* --- Targetes Matèria (Perfil Docent) --- */
.subject-profile-card {
    background: #fff;
    border: 1px solid #e0deff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.subject-profile-card:hover { border-color: #a5b4fc; box-shadow: 0 2px 10px rgba(99,102,241,0.08); }
.subject-profile-card-left { display: flex; align-items: center; gap: 0.65rem; }
.subject-profile-card-icon {
    width: 32px; height: 32px;
    background: #eef2ff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #6366f1;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.subject-profile-card-info { display: flex; flex-direction: column; }
.subject-profile-card-name { font-size: 0.85rem; font-weight: 700; color: #1e1b4b; }
.subject-profile-card-course { font-size: 0.72rem; color: #818cf8; font-weight: 500; margin-top: 1px; }
.subject-profile-card-del {
    background: none; border: none;
    color: #c7d2fe; cursor: pointer;
    padding: 4px 6px; border-radius: 6px;
    font-size: 0.8rem; flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}
.subject-profile-card-del:hover { color: #ef4444; background: #fff1f2; }
