/* ═══════════════════════════════════════════════════════════════
   JAURIA WORKSTATION — Detail & Edit Styles (Light Theme)
═══════════════════════════════════════════════════════════════ */

/* ── Cabecera de detalle ── */
.jauria-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--j-muted);
    text-decoration: none !important;
    font-size: 13px;
    margin-bottom: 16px;
    transition: color 0.2s;
}
.jauria-back:hover { color: var(--j-magenta); }

.jauria-detail__header { margin-bottom: 28px; }

.jauria-detail__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.jauria-detail__header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--j-text);
    margin: 0 0 6px;
}

.jauria-detail__artist {
    color: var(--j-magenta);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.jauria-detail__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.jauria-badge--lg {
    font-size: 14px !important;
    padding: 6px 16px !important;
}

/* ── Feedback banner ── */
.jauria-feedback-banner {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: var(--j-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.jauria-feedback-banner strong {
    color: #991b1b;
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}
.jauria-feedback-banner p {
    color: #7f1d1d;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Body del detalle ── */
.jauria-detail__body { display: flex; flex-direction: column; gap: 20px; }

.jauria-detail__top {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: start;
}

.jauria-detail__cover img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--j-radius);
    border: 1px solid var(--j-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.jauria-detail__cover-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--j-surface);
    border: 1px solid var(--j-border);
    border-radius: var(--j-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* ── Meta rows ── */
.jauria-detail__meta,
.jauria-detail__grid { display: flex; flex-direction: column; gap: 8px; }

.jauria-meta-row {
    display: flex;
    gap: 12px;
    font-size: 14px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid var(--j-border);
}
.jauria-meta-row:last-child { border-bottom: none; }

.jauria-meta-row__label {
    color: var(--j-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 150px;
    flex-shrink: 0;
}
.jauria-meta-row__value { color: var(--j-text); font-weight: 500; }

/* ── Secciones ── */
.jauria-detail__section {
    background: var(--j-surface);
    border: 1px solid var(--j-border);
    border-radius: var(--j-radius);
    padding: 20px 24px;
}
.jauria-detail__section h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--j-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--j-border);
}
.jauria-detail__section--internal {
    border-color: #e9d5ff;
    background: #faf5ff;
}
.jauria-detail__section--internal h3 { color: #6b21a8; }
.jauria-detail__section--internal h3 span {
    font-size: 11px;
    color: #9333ea;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 8px;
}
.jauria-detail__text {
    color: var(--j-text);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ── Tracks ── */
.jauria-tracks-list { display: flex; flex-direction: column; gap: 10px; }

.jauria-track-card {
    background: var(--j-bg);
    border: 1px solid var(--j-border);
    border-radius: var(--j-radius);
    overflow: hidden;
}
.jauria-track-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--j-border);
    background: var(--j-surface);
    flex-wrap: wrap;
}
.jauria-track-card__num {
    width: 26px;
    height: 26px;
    background: var(--j-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--j-muted);
    flex-shrink: 0;
}
.jauria-track-card__title {
    font-weight: 700;
    color: var(--j-text);
    font-size: 15px;
    flex: 1;
}
.jauria-track-card__badges { display: flex; gap: 6px; flex-wrap: wrap; }
.jauria-track-card__body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

/* ── Pills ── */
.jauria-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
}
.jauria-pill--magenta { background: var(--j-magenta-light); color: var(--j-magenta); border: 1px solid #e9b3e9; }
.jauria-pill--red     { background: #fee2e2; color: #991b1b;  border: 1px solid #fecaca; }
.jauria-pill--green   { background: #d1fae5; color: #065f46;  border: 1px solid #a7f3d0; }
.jauria-pill--grey    { background: #f3f4f6; color: #374151;  border: 1px solid #e5e7eb; }

/* ── Contribuidores ── */
.jauria-contributors__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--j-muted);
    margin: 0 0 8px;
}
.jauria-contributors__list { display: flex; flex-wrap: wrap; gap: 8px; }
.jauria-contributor {
    display: flex;
    flex-direction: column;
    background: var(--j-surface);
    border: 1px solid var(--j-border);
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 120px;
}
.jauria-contributor__name { font-size: 13px; font-weight: 600; color: var(--j-text); }
.jauria-contributor__role { font-size: 11px; color: var(--j-muted); margin-top: 2px; }

/* ── Alertas ── */
.jauria-alert {
    padding: 14px 18px;
    border-radius: var(--j-radius);
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}
.jauria-alert--success { background: #d1fae5; border: 1px solid #a7f3d0; color: #065f46; }
.jauria-alert--error   { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }

/* ── Formulario de edición ── */
.jauria-edit-form { padding: 24px 0; }

.jauria-form__section {
    background: var(--j-surface);
    border: 1px solid var(--j-border);
    border-radius: var(--j-radius);
    padding: 24px;
    margin-bottom: 20px;
}
.jauria-form__section h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--j-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--j-border);
}
.jauria-form__section--internal {
    border-color: #e9d5ff;
    background: #faf5ff;
}
.jauria-form__section--internal h3 {
    color: #6b21a8;
    border-bottom-color: #e9d5ff;
}
.jauria-form__section--internal h3 span {
    font-size: 11px;
    color: #9333ea;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 8px;
    font-weight: 400;
}

.jauria-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.jauria-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.jauria-form__field--full { grid-column: 1 / -1; }

.jauria-form__field label {
    font-size: 11px;
    font-weight: 700;
    color: var(--j-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.jauria-form__field label .required { color: var(--j-magenta); }

.jauria-form__field input[type="text"],
.jauria-form__field input[type="date"],
.jauria-form__field select,
.jauria-form__field textarea {
    background: var(--j-bg);
    border: 1px solid var(--j-border);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--j-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.jauria-form__field input:focus,
.jauria-form__field select:focus,
.jauria-form__field textarea:focus {
    outline: none;
    border-color: var(--j-magenta);
    box-shadow: 0 0 0 3px rgba(204, 0, 204, 0.1);
}

.jauria-form__field input[type="file"] {
    color: var(--j-text);
    font-size: 13px;
    padding: 8px 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.jauria-form__field small {
    color: var(--j-muted);
    font-size: 12px;
}

.jauria-form__checkbox {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    font-size: 13px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--j-text) !important;
    cursor: pointer;
    margin-top: 6px;
    font-weight: 500 !important;
}

.jauria-form__current-image { margin-bottom: 12px; }
.jauria-form__current-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--j-border);
    display: block;
    margin-bottom: 6px;
}
.jauria-form__current-image p {
    font-size: 12px;
    color: var(--j-muted);
    margin: 0;
}

.jauria-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
}

/* ── Tracks en formulario de edición ── */
.jauria-track-edit {
    background: var(--j-bg);
    border: 1px solid var(--j-border);
    border-radius: var(--j-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.jauria-track-edit__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--j-border);
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.jauria-track-edit__num {
    width: 26px;
    height: 26px;
    background: var(--j-surface2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--j-muted);
    flex-shrink: 0;
}

/* ── Contribuidores en formulario ── */
.jauria-contribs { display: flex; flex-direction: column; gap: 8px; }

.jauria-contrib-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: center;
}

.jauria-contrib-row select,
.jauria-contrib-row input[type="text"] {
    background: var(--j-bg);
    border: 1px solid var(--j-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--j-text);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.jauria-contrib-row select:focus,
.jauria-contrib-row input:focus {
    outline: none;
    border-color: var(--j-magenta);
}

@media (max-width: 600px) {
    .jauria-contrib-row { grid-template-columns: 1fr; }
}
    .jauria-detail__top { grid-template-columns: 1fr; }
    .jauria-detail__cover { max-width: 160px; }
    .jauria-detail__title-row { flex-direction: column; }
    .jauria-detail__actions { width: 100%; }
    .jauria-form__grid { grid-template-columns: 1fr; }
    .jauria-meta-row { flex-direction: column; gap: 2px; }
    .jauria-meta-row__label { min-width: unset; }
}

/* ── Tracks sortables en formulario de edición ── */
.jauria-tracks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.jauria-tracks-header h3 { margin: 0; border: none; padding: 0; }
.jauria-tracks-hint { font-size: 12px; color: var(--j-muted); margin: 0 0 14px; }

.jauria-tracks-sortable { display: flex; flex-direction: column; gap: 8px; }

.jauria-track-item {
    background: var(--j-bg);
    border: 1px solid var(--j-border);
    border-radius: var(--j-radius);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.jauria-track-item.dragging   { opacity: 0.45; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.jauria-track-item.drag-over  { border-color: var(--j-magenta); box-shadow: 0 0 0 2px rgba(204,0,204,0.15); }

.jauria-track-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--j-surface);
    cursor: pointer;
    user-select: none;
    flex-wrap: wrap;
}
.jauria-track-item__header:hover { background: var(--j-surface2); }

.jauria-drag-handle { color: var(--j-muted); cursor: grab; font-size: 16px; flex-shrink: 0; }
.jauria-drag-handle:active { cursor: grabbing; }

.jauria-track-item__num {
    width: 26px; height: 26px;
    background: var(--j-border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--j-muted);
    flex-shrink: 0;
}
.jauria-track-item__title {
    font-weight: 700; color: var(--j-text); font-size: 14px;
    flex: 1; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.jauria-track-item__pills { display: flex; gap: 5px; flex-wrap: wrap; flex-shrink: 0; }
.jauria-track-item__chevron { color: var(--j-muted); font-size: 11px; transition: transform 0.2s; flex-shrink: 0; }
.jauria-track-item__body { padding: 20px 16px 16px; border-top: 1px solid var(--j-border); }
