/**
 * Pipeline Page Styles
 * Version: 20251229a - Fixed modals and bulk actions
 */

/* ==================
   Page Container
   ================== */

.pipeline-page {
    padding: 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* ==================
   Page Header
   ================== */

.pipeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.pipeline-header-text {
    flex: 1;
}

.pipeline-title {
    font-size: 28px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.pipeline-subtitle {
    font-size: 15px;
    font-weight: 400;
    color: #6A7282;
    margin: 0;
    line-height: 1.5;
}

.pipeline-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #101828;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-add-btn:hover {
    background: #1f2937;
}

.pipeline-add-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================
   Summary Cards
   ================== */

.pipeline-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .pipeline-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pipeline-summary-grid {
        grid-template-columns: 1fr;
    }
}

.pipeline-summary-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid #E5E7EB;
}

.pipeline-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.pipeline-summary-icon svg {
    width: 20px;
    height: 20px;
}

.pipeline-summary-icon--blue {
    background: #DBEAFE;
}

.pipeline-summary-icon--blue svg {
    stroke: #2563EB;
}

.pipeline-summary-icon--yellow {
    background: #FEF3C7;
}

.pipeline-summary-icon--yellow svg {
    stroke: #D97706;
}

.pipeline-summary-icon--green {
    background: #DCFCE7;
}

.pipeline-summary-icon--green svg {
    stroke: #16A34A;
}

.pipeline-summary-icon--green-alt {
    background: #D1FAE5;
}

.pipeline-summary-icon--green-alt svg {
    stroke: #059669;
}

.pipeline-summary-value {
    font-size: 28px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.pipeline-summary-label {
    font-size: 14px;
    font-weight: 500;
    color: #6A7282;
    margin: 0;
}

/* ==================
   Status Filters
   ================== */

.pipeline-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pipeline-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-filter-btn:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.pipeline-filter-btn.active {
    background: #101828;
    color: #FFFFFF;
    border-color: #101828;
}

.pipeline-filter-label {
    font-weight: 500;
}

.pipeline-filter-count {
    font-size: 13px;
    font-weight: 500;
    color: #6A7282;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
}

.pipeline-filter-btn.active .pipeline-filter-count {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.2);
}

/* ==================
   Search Section
   ================== */

.pipeline-search-section {
    margin-bottom: 16px;
}

.pipeline-search-bar {
    position: relative;
    max-width: 400px;
}

.pipeline-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
}

.pipeline-search-input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    font-size: 14px;
    font-weight: 400;
    color: #101828;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-search-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pipeline-search-input::placeholder {
    color: #9CA3AF;
}

/* ==================
   Bulk Actions Bar
   ================== */

.pipeline-bulk-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #F3F4F6;
    border-radius: 8px;
    margin-bottom: 16px;
}

.pipeline-bulk-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pipeline-bulk-count {
    font-size: 14px;
    font-weight: 500;
    color: #364153;
}

.pipeline-bulk-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6A7282;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-bulk-clear:hover {
    background: #E5E7EB;
    color: #101828;
}

.pipeline-bulk-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pipeline-bulk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-bulk-btn:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.pipeline-bulk-btn--danger {
    color: #DC2626;
    border-color: #FCA5A5;
}

.pipeline-bulk-btn--danger:hover {
    background: #FEF2F2;
    border-color: #F87171;
}

/* ==================
   Table Styles
   ================== */

.pipeline-table-container {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.pipeline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pipeline-table thead {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.pipeline-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6A7282;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.pipeline-th-checkbox {
    width: 48px;
    text-align: center !important;
}

.pipeline-table tbody tr {
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.15s ease;
}

.pipeline-table tbody tr:last-child {
    border-bottom: none;
}

.pipeline-table tbody tr:hover {
    background: #F9FAFB;
}

.pipeline-table td {
    padding: 14px 16px;
    color: #101828;
    vertical-align: middle;
}

.pipeline-table td:first-child {
    text-align: center;
}

/* Checkbox */
.pipeline-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid #D1D5DC;
    cursor: pointer;
    accent-color: #2563EB;
}

/* Lead Cell */
.pipeline-lead-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pipeline-lead-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pipeline-lead-initials {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    text-transform: uppercase;
}

.pipeline-lead-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pipeline-lead-name {
    font-size: 14px;
    font-weight: 600;
    color: #101828;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-lead-company {
    font-size: 13px;
    color: #6A7282;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Badge */
.pipeline-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: capitalize;
}

.pipeline-status-badge--new {
    background: #FEF3C7;
    color: #92400E;
}

.pipeline-status-badge--contacted {
    background: #DBEAFE;
    color: #1E40AF;
}

.pipeline-status-badge--qualified {
    background: #E9D5FF;
    color: #6B21A8;
}

.pipeline-status-badge--proposal {
    background: #FFEDD5;
    color: #9A3412;
}

.pipeline-status-badge--won,
.pipeline-status-badge--closed {
    background: #DCFCE7;
    color: #166534;
}

.pipeline-status-badge--lost {
    background: #FEE2E2;
    color: #991B1B;
}

/* Value Cell */
.pipeline-value {
    font-weight: 600;
    color: #101828;
}

/* Source Badge */
.pipeline-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #4B5563;
    background: #F3F4F6;
    border-radius: 4px;
}

.pipeline-source-badge svg {
    width: 14px;
    height: 14px;
}

/* Source Cell with Attribution */
.pipeline-source-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Attribution Badge - v20251228 */
.pipeline-attribution-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 500;
    color: #2563EB;
    background: #EFF6FF;
    border-radius: 4px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.pipeline-attribution-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Date/Time Cells */
.pipeline-date {
    font-size: 13px;
    color: #6A7282;
    white-space: nowrap;
}

/* Next Action */
.pipeline-next-action {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pipeline-next-action-text {
    font-size: 13px;
    color: #101828;
}

.pipeline-next-action-date {
    font-size: 12px;
    color: #9CA3AF;
}

/* AI Staff */
.pipeline-ai-staff {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pipeline-ai-staff-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pipeline-ai-staff-avatar svg {
    width: 14px;
    height: 14px;
    stroke: #FFFFFF;
}

.pipeline-ai-staff-name {
    font-size: 13px;
    font-weight: 500;
    color: #101828;
}

.pipeline-unassigned {
    font-size: 13px;
    color: #9CA3AF;
    font-style: italic;
}

/* ==================
   Loading State
   ================== */

.pipeline-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    color: #6A7282;
}

.pipeline-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E5E7EB;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: pipeline-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes pipeline-spin {
    to {
        transform: rotate(360deg);
    }
}

.pipeline-loading p {
    font-size: 14px;
    margin: 0;
    color: #6A7282;
}

/* ==================
   Empty State
   ================== */

.pipeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.pipeline-empty svg {
    color: #D1D5DC;
    margin-bottom: 16px;
}

.pipeline-empty h3 {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px 0;
}

.pipeline-empty p {
    font-size: 14px;
    color: #6A7282;
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

/* ==================
   Pagination
   ================== */

.pipeline-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.pipeline-pagination-info {
    font-size: 14px;
    color: #6A7282;
}

.pipeline-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pipeline-pagination-btn {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-pagination-btn:hover:not(:disabled) {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.pipeline-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pipeline-pagination-pages {
    display: flex;
    gap: 4px;
}

.pipeline-pagination-page {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-pagination-page:hover:not(.active) {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.pipeline-pagination-page.active {
    background: #101828;
    color: #FFFFFF;
    border-color: #101828;
}

/* ==================
   Modal (Add/Edit Lead)
   ================== */

.pipeline-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.pipeline-modal.active {
    display: flex;
}

.pipeline-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.pipeline-modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pipeline-modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Modal Form Fields */
.pipeline-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.pipeline-modal .form-group {
    display: flex;
    flex-direction: column;
}

.pipeline-modal .form-group:not(.form-row .form-group) {
    margin-bottom: 16px;
}

.pipeline-modal .form-group:last-child {
    margin-bottom: 0;
}

.pipeline-modal .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    margin-bottom: 6px;
}

.pipeline-modal .form-group input,
.pipeline-modal .form-group select,
.pipeline-modal .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #101828;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-modal .form-group input:focus,
.pipeline-modal .form-group select:focus,
.pipeline-modal .form-group textarea:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pipeline-modal .form-group textarea {
    min-height: 80px;
    resize: vertical;
}

@media (max-width: 520px) {
    .pipeline-modal .form-row {
        grid-template-columns: 1fr;
    }
}

.pipeline-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.pipeline-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0;
}

.pipeline-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6A7282;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-modal-close:hover {
    background: #F3F4F6;
    color: #101828;
}

.pipeline-modal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.pipeline-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #E5E7EB;
}

.pipeline-modal-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-modal-btn--primary {
    background: #101828;
    color: #FFFFFF;
}

.pipeline-modal-btn--primary:hover {
    background: #1f2937;
}

.pipeline-modal-btn--secondary {
    background: #F3F4F6;
    color: #364153;
}

.pipeline-modal-btn--secondary:hover {
    background: #E5E7EB;
}

/* Modal action buttons (generic classes) */
.pipeline-modal .modal-cancel,
.pipeline-modal .modal-submit {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-modal .modal-cancel {
    background: #F3F4F6;
    color: #364153;
}

.pipeline-modal .modal-cancel:hover {
    background: #E5E7EB;
}

.pipeline-modal .modal-submit {
    background: #2D9C6E;
    color: #FFFFFF;
}

.pipeline-modal .modal-submit:hover {
    background: #248c5f;
}

/* Form Fields */
.pipeline-form-group {
    margin-bottom: 20px;
}

.pipeline-form-group:last-child {
    margin-bottom: 0;
}

.pipeline-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    margin-bottom: 6px;
}

.pipeline-form-input,
.pipeline-form-select,
.pipeline-form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #101828;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-form-input:focus,
.pipeline-form-select:focus,
.pipeline-form-textarea:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pipeline-form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==================
   Inline Status Select
   ================== */

.pipeline-status-select {
    padding: 6px 28px 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #101828;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all 0.15s ease;
}

.pipeline-status-select:hover {
    border-color: #D1D5DC;
    background-color: #FFFFFF;
}

.pipeline-status-select:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================
   Action Buttons
   ================== */

.pipeline-th-actions {
    width: 100px;
    text-align: center !important;
}

.pipeline-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pipeline-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #6A7282;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-action-btn:hover {
    background: #F3F4F6;
    border-color: #E5E7EB;
    color: #101828;
}

.pipeline-action-btn--edit:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #2563EB;
}

.pipeline-action-btn--delete:hover {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
}

.pipeline-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================
   Toast Notifications
   ================== */

.pipeline-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #101828;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: pipeline-toast-in 0.3s ease;
}

.pipeline-toast.hiding {
    animation: pipeline-toast-out 0.3s ease forwards;
}

.pipeline-toast--success {
    background: #059669;
}

.pipeline-toast--error {
    background: #DC2626;
}

.pipeline-toast svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@keyframes pipeline-toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pipeline-toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ==================
   Error State
   ================== */

.pipeline-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    background: #FEF2F2;
    border-radius: 12px;
    border: 1px solid #FECACA;
}

.pipeline-error svg {
    color: #DC2626;
    margin-bottom: 16px;
}

.pipeline-error h3 {
    font-size: 16px;
    font-weight: 600;
    color: #991B1B;
    margin: 0 0 8px 0;
}

.pipeline-error p {
    font-size: 14px;
    color: #DC2626;
    margin: 0 0 16px 0;
    max-width: 320px;
    line-height: 1.5;
}

.pipeline-error-retry {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #DC2626;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-error-retry:hover {
    background: #B91C1C;
}

/* ==================
   Utility Classes
   ================== */

.hidden {
    display: none !important;
}

/* ==================
   Form Row Layout
   ================== */

.pipeline-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .pipeline-form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================
   Mobile Responsive
   ================== */

@media (max-width: 1024px) {
    .pipeline-table-container {
        overflow-x: auto;
    }

    .pipeline-table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .pipeline-page {
        padding: 20px 16px;
    }

    .pipeline-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .pipeline-add-btn {
        width: 100%;
        justify-content: center;
    }

    .pipeline-title {
        font-size: 24px;
    }

    .pipeline-bulk-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .pipeline-bulk-right {
        flex-wrap: wrap;
    }

    .pipeline-pagination {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

/* ==================
   Confirm Dialog
   ================== */

.pipeline-confirm-modal {
    max-width: 400px;
}

.pipeline-confirm-message {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
}

.pipeline-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-btn-primary {
    background: #101828;
    color: #FFFFFF;
}

.pipeline-btn-primary:hover {
    background: #1f2937;
}

.pipeline-btn-secondary {
    background: #F3F4F6;
    color: #364153;
}

.pipeline-btn-secondary:hover {
    background: #E5E7EB;
}

.pipeline-btn-danger {
    background: #DC2626;
    color: #FFFFFF;
}

.pipeline-btn-danger:hover {
    background: #B91C1C;
}

/* ==================
   Status Select Dialog
   ================== */

.pipeline-status-modal {
    max-width: 420px;
}

.pipeline-status-message {
    font-size: 14px;
    color: #4B5563;
    margin: 0 0 20px 0;
}

.pipeline-status-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.pipeline-status-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--status-color);
    background: color-mix(in srgb, var(--status-color) 10%, white);
    border: 2px solid color-mix(in srgb, var(--status-color) 30%, white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-status-option:hover {
    background: color-mix(in srgb, var(--status-color) 15%, white);
    border-color: var(--status-color);
    transform: translateY(-1px);
}

.pipeline-status-option:active {
    transform: translateY(0);
}

/* ==================
   Modal Overlay (for confirm/status dialogs)
   ================== */

.pipeline-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pipeline-modal-overlay.active {
    display: flex;
}

.pipeline-modal-overlay .pipeline-modal {
    display: block !important;
    position: relative;
    width: 100%;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: pipeline-modal-in 0.2s ease-out;
}

@keyframes pipeline-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pipeline-modal-overlay .pipeline-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.pipeline-modal-overlay .pipeline-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0;
}

.pipeline-modal-overlay .pipeline-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 24px;
    line-height: 1;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-modal-overlay .pipeline-modal-close:hover {
    background: #F3F4F6;
    color: #101828;
}

.pipeline-modal-overlay .pipeline-modal-body {
    padding: 24px;
}

.pipeline-modal-overlay .pipeline-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 0 0 16px 16px;
}

/* Confirm Dialog specific */
.pipeline-confirm-modal {
    max-width: 440px;
}

.pipeline-confirm-modal .pipeline-confirm-message {
    font-size: 15px;
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
}

/* Status Dialog specific */
.pipeline-status-modal {
    max-width: 480px;
}

.pipeline-status-modal .pipeline-status-message {
    font-size: 15px;
    color: #4B5563;
    margin: 0 0 20px 0;
}

.pipeline-status-modal .pipeline-status-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.pipeline-status-modal .pipeline-status-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--status-color, #374151);
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-status-modal .pipeline-status-option:hover {
    background: #FFFFFF;
    border-color: var(--status-color, #374151);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pipeline-status-modal .pipeline-status-option:active {
    transform: translateY(0);
}

/* Button styles in modal overlays */
.pipeline-modal-overlay .pipeline-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pipeline-modal-overlay .pipeline-btn-secondary {
    background: #FFFFFF;
    color: #374151;
    border: 1px solid #D1D5DC;
}

.pipeline-modal-overlay .pipeline-btn-secondary:hover {
    background: #F3F4F6;
}

.pipeline-modal-overlay .pipeline-btn-primary {
    background: #101828;
    color: #FFFFFF;
}

.pipeline-modal-overlay .pipeline-btn-primary:hover {
    background: #1F2937;
}

.pipeline-modal-overlay .pipeline-btn-danger {
    background: #DC2626;
    color: #FFFFFF;
}

.pipeline-modal-overlay .pipeline-btn-danger:hover {
    background: #B91C1C;
}

/* Toast info variant */
.pipeline-toast--info {
    background: #2563EB;
}
