/* Upload Workflow Styles */

/* Page Content Wrapper */
.page-content {
  padding: 20px;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 8px 0;
}

.page-header p {
  font-size: 16px;
  color: #718096;
  margin: 0;
}

.upload-container {
    max-width: 1800px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #F16623 0%, #FF8A50 100%);
    color: white;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #1a1a1a;
    color: #F16623;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 20px;
}

/* Step Content */
.step-content {
    display: none;
    padding: 40px;
}

.step-content.active {
    display: block;
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 8px;
}

.step-header p {
    color: #666;
    font-size: 16px;
}

/* Form Styles */
.upload-form, .track-form, .license-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #1a1a1a;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F16623;
    box-shadow: 0 0 0 3px rgba(241, 102, 35, 0.1);
}

.form-group small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

/* File Upload Areas */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #2a2a2a;
}

.file-upload-area:hover {
    border-color: #F16623;
    background: #1a1a1a5f0;
}

.file-upload-area.dragover {
    border-color: #F16623;
    background: #1a1a1a5f0;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.upload-placeholder p {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.upload-placeholder small {
    color: #6b7280;
}

/* File Upload Preview */
.file-preview {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    margin-top: 12px;
}

.file-preview-icon {
    font-size: 24px;
    margin-right: 12px;
}

.file-preview-info {
    flex: 1;
}

.file-preview-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.file-preview-size {
    font-size: 12px;
    color: #64748b;
}

.file-preview-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 12px;
    transform: scale(1.2);
}

/* Track Management */
.tracks-container {
    margin-bottom: 30px;
}

.track-item {
    border: 2px solid #404040;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    background: #2a2a2a;
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #404040;
}

.track-header h3 {
    color: #e5e7eb;
    font-size: 18px;
    margin: 0;
}

.btn-remove-track {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-remove-track:hover {
    background: #dc2626;
}

/* Artist Roles */
.artist-roles-container {
    margin-bottom: 15px;
}

.artist-role-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.artist-role-selectors {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Artist dropdown */
.artist-role-selectors .artist-select {
    flex: 2;
}

/* Role dropdown */
.artist-role-selectors .role-select {
    flex: 1.5;
}

/* Remove button */
.artist-role-selectors .remove {
    flex: 0 0 auto;
}

.btn-remove-artist {
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-artist,
.btn-add-track {
    background: #6b7280;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-add-artist:hover,
.btn-add-track:hover {
    background: #4b5563;
}

/* License Sections */
.license-section {
    background: #2a2a2a;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid #F16623;
}

.license-section h3 {
    color: #374151;
    font-size: 16px;
    margin-bottom: 16px;
}

/* Review Styles */
.review-container {
    max-width: 100%;
}

.review-section {
    margin-bottom: 32px;
    padding: 24px;
    background: #2a2a2a;
    border-radius: 12px;
    border: 1px solid #404040;
}

.review-section h3 {
    color: #1e293b;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #F16623;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.review-item {
    display: flex;
    flex-direction: column;
}

.review-item label {
    font-weight: 600;
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.review-item span {
    color: #e5e7eb;
    font-weight: 500;
    font-size: 14px;
}

.cover-preview {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    overflow: hidden;
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tracks-review {
    space-y: 16px;
}

.track-review-item {
    background: #1a1a1a;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #404040;
    margin-bottom: 12px;
}

.track-review-header {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.track-review-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    font-size: 14px;
}

/* Submission Notice */
.submission-notice {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 12px;
    margin-bottom: 32px;
}

.notice-icon {
    font-size: 24px;
    margin-right: 16px;
    margin-top: 2px;
}

.notice-content h4 {
    color: #F16623;
    font-size: 16px;
    margin-bottom: 8px;
}

.notice-content p {
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
    margin-top: 40px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #F16623;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #e55a1f;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4b5563;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit {
    background: #059669;
    color: white;
    font-size: 16px;
    padding: 14px 32px;
}

.btn-submit:hover:not(:disabled) {
    background: #047857;
    transform: translateY(-1px);
}

/* Links */
.create-artist-link {
    color: #F16623;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.create-artist-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-container {
        margin: 20px;
        border-radius: 8px;
    }
    
    .step-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .progress-indicator {
        padding: 20px 15px;
        flex-wrap: wrap;
    }
    
    .step-connector {
        width: 40px;
        margin: 0 10px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .artist-role-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .step-actions .btn {
        width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Date Input Calendar Icons */
input[type="date"] {
    position: relative;
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    font-size: 1.2em;
    width: 20px;
    height: 20px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 0.8;
}

/* Artist Role Tags */
.artist-role-selectors {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.artist-role-selectors .artist-select {
    flex: 2;
}

.artist-role-selectors .role-select {
    flex: 1.5;
}

.artist-role-selectors .btn-remove-artist {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.artist-role-selectors .btn-remove-artist:hover {
    background: #c82333;
}

.artist-role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 20px;
}

.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.role-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.role-tag .remove-role {
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.role-tag .remove-role:hover {
    opacity: 1;
}

/* Contributors */
.contributors-container {
    margin-bottom: 10px;
}

.contributor-item {
    margin-bottom: 10px;
}

.contributor-selectors {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contributor-selectors input[name="contributor_name"] {
    flex: 1.3;
}

.contributor-selectors .contributor-role-select {
    flex: 1;
}

.contributor-selectors .btn-remove-contributor {
    flex: 0 0 auto;
}


/* Release document notice action */
.notice-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.notice-action-link:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Draft auto-save status */
.draft-autosave-status {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-left: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.85;
}

.draft-autosave-status[data-state="saving"] {
    color: #d97706;
}

.draft-autosave-status[data-state="saved"] {
    color: #059669;
}

.draft-autosave-status[data-state="error"] {
    color: #dc2626;
}

/* Draft auto-save status */
.draft-autosave-status {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-left: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.85;
}

.draft-autosave-status[data-state="saving"] {
    color: #d97706;
}

.draft-autosave-status[data-state="saved"] {
    color: #059669;
}

.draft-autosave-status[data-state="error"] {
    color: #dc2626;
}

/* Final autosave toast placement: top of screen, no layout shift */
#draft-autosave-status.draft-autosave-status {
    position: fixed !important;
    top: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 20px !important;
    min-width: 140px !important;
    padding: 8px 14px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: rgba(17, 24, 39, 0.96) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28) !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    pointer-events: none !important;
}

#draft-autosave-status.draft-autosave-status:empty {
    display: none !important;
}

#draft-autosave-status.draft-autosave-status[data-state="saving"] {
    background: #d97706 !important;
    color: #ffffff !important;
}

#draft-autosave-status.draft-autosave-status[data-state="saved"] {
    background: #059669 !important;
    color: #ffffff !important;
}

#draft-autosave-status.draft-autosave-status[data-state="error"] {
    background: #dc2626 !important;
    color: #ffffff !important;
}

/* === Upload Workflow Row Alignment Polish ===
   Match Performers + Artist rows to Contributors layout.
*/

.contributors-container,
.performers-container,
.artist-roles-container,
.release-artist-roles-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.contributor-item,
.performer-item,
.artist-role-item {
    width: 100%;
}

.contributor-selectors,
.performer-selectors,
.artist-role-selectors {
    display: grid !important;
    grid-template-columns: minmax(220px, 1.6fr) minmax(180px, 1fr) 40px;
    gap: 10px;
    align-items: center;
    width: 100%;
    margin-bottom: 0 !important;
}

.contributor-selectors input,
.performer-selectors input,
.artist-role-selectors select,
.contributor-selectors select,
.performer-selectors select {
    width: 100%;
    min-height: 44px;
}

.btn-remove-contributor,
.btn-remove-performer,
.btn-remove-artist {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #dc3545 !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

.btn-remove-contributor:hover,
.btn-remove-performer:hover,
.btn-remove-artist:hover {
    background: #b91c1c !important;
}

.btn-add-contributor,
.btn-add-performer,
.btn-add-artist,
.btn-add-release-artist {
    margin-top: 8px;
    width: fit-content;
}

.performers-group {
    margin-top: 20px;
}

/* Give license step more breathing room before action buttons */
.license-form {
    padding-bottom: 12px;
}

#step-3 .step-actions {
    margin-top: 52px;
}

/* Mobile stacking */
@media (max-width: 768px) {
    .contributor-selectors,
    .performer-selectors,
    .artist-role-selectors {
        grid-template-columns: 1fr;
    }

    .btn-remove-contributor,
    .btn-remove-performer,
    .btn-remove-artist {
        width: 100% !important;
        border-radius: 8px !important;
    }
}

/* Match Release Artists and Track Artists spacing/layout */
.release-artist-roles-container,
.track-item .artist-roles-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
}

.release-artist-roles-container .artist-role-item,
.track-item .artist-roles-container .artist-role-item {
    width: 100% !important;
    margin: 0 !important;
}

.release-artist-roles-container .artist-role-selectors,
.track-item .artist-roles-container .artist-role-selectors {
    display: grid !important;
    grid-template-columns: minmax(220px, 1.6fr) minmax(180px, 1fr) 36px !important;
    gap: 10px !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
}

.release-artist-roles-container .artist-select,
.release-artist-roles-container .role-select,
.track-item .artist-roles-container .artist-select,
.track-item .artist-roles-container .role-select {
    width: 100% !important;
    min-height: 44px !important;
}

/* Make release artist and track artist Add buttons sit the same distance below rows */
.btn-add-release-artist,
.track-item .btn-add-artist {
    margin-top: 8px !important;
    width: fit-content !important;
}

/* If a dynamic track places + Add Artist inside the artist container, keep it aligned cleanly */
.track-item .artist-roles-container > .btn-add-artist {
    align-self: flex-start !important;
    margin-top: 0 !important;
}

/* Match artist remove X sizing everywhere */
.release-artist-roles-container .btn-remove-artist,
.track-item .artist-roles-container .btn-remove-artist {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 4px !important;
    font-size: 24px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Mobile stacking for release + track artists */
@media (max-width: 768px) {
    .release-artist-roles-container .artist-role-selectors,
    .track-item .artist-roles-container .artist-role-selectors {
        grid-template-columns: 1fr !important;
    }

    .release-artist-roles-container .btn-remove-artist,
    .track-item .artist-roles-container .btn-remove-artist {
        width: 100% !important;
        border-radius: 8px !important;
    }
}

/* === Final unified credit/artist row layout ===
   Release Artists, Track Artists, Contributors, and Performers should all match.
*/

.release-artist-roles-container,
.track-item .artist-roles-container,
.contributors-container,
.performers-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}

.release-artist-roles-container .artist-role-item,
.track-item .artist-roles-container .artist-role-item,
.contributor-item,
.performer-item {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.release-artist-roles-container .artist-role-selectors,
.track-item .artist-roles-container .artist-role-selectors,
.contributor-selectors,
.performer-selectors {
    display: grid !important;
    grid-template-columns: minmax(240px, 1.6fr) minmax(200px, 1fr) 36px !important;
    gap: 10px !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
}

.release-artist-roles-container .artist-select,
.release-artist-roles-container .role-select,
.track-item .artist-roles-container .artist-select,
.track-item .artist-roles-container .role-select,
.contributor-selectors input,
.contributor-selectors select,
.performer-selectors input,
.performer-selectors select {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    box-sizing: border-box !important;
}

/* Match every X remove button exactly */
.release-artist-roles-container .btn-remove-artist,
.track-item .artist-roles-container .btn-remove-artist,
.btn-remove-contributor,
.btn-remove-performer {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 4px !important;
    background: #dc3545 !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.release-artist-roles-container .btn-remove-artist:hover,
.track-item .artist-roles-container .btn-remove-artist:hover,
.btn-remove-contributor:hover,
.btn-remove-performer:hover {
    background: #c82333 !important;
}

/* Match Add buttons spacing */
.btn-add-release-artist,
.track-item .btn-add-artist,
.btn-add-contributor,
.btn-add-performer {
    margin-top: 8px !important;
    width: fit-content !important;
    align-self: flex-start !important;
}

/* If dynamic Track Artists places + Add Artist inside the container, keep it aligned */
.track-item .artist-roles-container > .btn-add-artist {
    margin-top: 0 !important;
}

/* Keep tags from adding weird spacing under artist rows */
.release-artist-roles-container .artist-role-tags,
.track-item .artist-roles-container .artist-role-tags {
    margin-top: 6px !important;
    min-height: 0 !important;
}

/* Mobile stack */
@media (max-width: 768px) {
    .release-artist-roles-container .artist-role-selectors,
    .track-item .artist-roles-container .artist-role-selectors,
    .contributor-selectors,
    .performer-selectors {
        grid-template-columns: 1fr !important;
    }

    .release-artist-roles-container .btn-remove-artist,
    .track-item .artist-roles-container .btn-remove-artist,
    .btn-remove-contributor,
    .btn-remove-performer {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 8px !important;
    }
}

/* === Fix clipped dropdown text in unified credit/artist rows === */

.release-artist-roles-container select,
.track-item .artist-roles-container select,
.contributor-selectors select,
.performer-selectors select {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    line-height: normal !important;
    display: block !important;
    vertical-align: middle !important;
    overflow: visible !important;
}

.contributor-selectors input,
.performer-selectors input {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    line-height: 44px !important;
}

/* Keep all unified rows vertically centered */
.release-artist-roles-container .artist-role-selectors,
.track-item .artist-roles-container .artist-role-selectors,
.contributor-selectors,
.performer-selectors {
    align-items: center !important;
}

/* Keep X buttons centered with the fixed field height */
.release-artist-roles-container .btn-remove-artist,
.track-item .artist-roles-container .btn-remove-artist,
.btn-remove-contributor,
.btn-remove-performer {
    align-self: center !important;
}

/* Final-submit required document modal */
.workflow-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.workflow-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.workflow-modal-content {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #1f1f1f;
    color: #f3f0e8;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.workflow-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.workflow-modal-header h3 {
    margin: 0;
    color: #f3f0e8;
}

.workflow-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: #dc3545;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.workflow-modal-message {
    margin: 0 0 18px;
    color: rgba(243, 240, 232, 0.82);
    line-height: 1.5;
}

.workflow-modal-status {
    min-height: 22px;
    margin-top: 8px;
    font-weight: 800;
}

.workflow-modal-status[data-type="saving"] {
    color: #f59e0b;
}

.workflow-modal-status[data-type="success"] {
    color: #10b981;
}

.workflow-modal-status[data-type="error"] {
    color: #ef4444;
}

.workflow-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .workflow-modal-actions {
        flex-direction: column;
    }

    .workflow-modal-actions .btn {
        width: 100%;
    }
}

/* Step 2 track flags should sit left-to-right */
.track-flags-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 16px 28px !important;
    margin-top: 18px !important;
    margin-bottom: 30px !important;
}

.track-flags-row .form-group {
    margin: 0 !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.track-flags-row .checkbox-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

/* More breathing room before + Add Performer */
.performers-container {
    margin-bottom: 24px !important;
}

.performers-group .btn-add-performer,
.btn-add-performer {
    display: inline-flex !important;
    margin-top: 24px !important;
}
