/* ============================================
   ESTILS DASHBOARD
   ============================================ */

/* --- Capçalera principal --- */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.dash-header h2 {
    color: var(--primary-dark);
    font-family: var(--font-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 30px;
}

.dash-header-subtitle {
    color: var(--text-medium);
    margin-top: 5px;
    font-size: 16px;
}

.dash-group-badge {
    font-size: 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 12px;
    vertical-align: middle;
}

.dash-expired-badge {
    color: var(--danger);
    font-weight: bold;
}

.dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Cards de cartes --- */
.carta-card-propia {
    /* estils base al styles.css */
}

.carta-card-compartida {
    /* estils base al styles.css */
}

.carta-card.is-blocked {
    opacity: 0.6;
    border: 1px dashed var(--border-color);
    filter: grayscale(0.5);
}

/* --- Capçalera de la carta --- */
.carta-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.carta-card-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 22px;
}

.carta-card-header h3 a {
    text-decoration: none;
    color: inherit;
}

.carta-card-header h3.is-blocked-title {
    color: var(--text-medium);
}

.carta-card-header h3:not(.is-blocked-title) {
    color: var(--primary-dark);
}

/* --- Badge Propia/Compartida --- */
.carta-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 8px;
}

.carta-badge.propia {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.carta-badge.compartida {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9d174d;
}

/* --- Bloqueig --- */
.carta-blocked-warning {
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--danger);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* --- Info de la carta --- */
.carta-info {
    margin-top: 15px;
}

.carta-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 16px;
}

.carta-info-label {
    font-weight: 600;
    color: var(--primary);
    font-size: 16px;
}

/* --- Botons d'acció --- */
.carta-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.carta-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card, #fff);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.carta-btn-icon:hover {
    background: var(--bg-hover, #f3f4f6);
    border-color: var(--primary);
}

.carta-btn-icon.carta-btn-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.carta-btn-icon.featured-star {
    color: #ccc;
    -webkit-text-stroke: 1px #bbb;
    -webkit-text-fill-color: transparent;
}

.carta-btn-icon.featured-star:hover {
    transform: scale(1.1);
    -webkit-text-stroke-color: #f5a623;
}

.carta-btn-icon.featured-star.featured {
    -webkit-text-stroke: 1px #f5a623;
    -webkit-text-fill-color: #f5a623;
}

/* --- Estat buit --- */
.dash-empty {
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-light);
    border-radius: 12px;
}

.dash-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.dash-empty h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-size: 16px;
}

.dash-empty p {
    color: var(--text-medium);
    margin-bottom: 25px;
    font-size: 16px;
}

/* --- Secció --- */
.section-divider .section-title {
    margin-top: 40px;
}

/* --- Animació d'entrada --- */
.carta-card {
    transition: all 0.4s ease;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .carta-btn-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}
