/* Tasks Page Styles */

/* Override container for wider layout - responsive padding */
.container {
    max-width: 98% !important;
    padding: 2rem 2vw !important;
}

@media (min-width: 1400px) {
    .container {
        padding: 2rem 3vw !important;
    }
}

@media (min-width: 1800px) {
    .container {
        padding: 2rem 2vw !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem !important;
    }
}

.tasks-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.5rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Search */
.search-wrapper {
    margin-left: 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
}

.btn-search {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-search:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.search-input {
    width: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    height: 40px;
    box-sizing: border-box;
    outline: none;
    transition: all 0.25s ease;
    opacity: 0;
    background: white;
}

.search-wrapper.open .btn-search {
    border-color: #3b82f6;
    color: #3b82f6;
}

.search-wrapper.open .search-input {
    width: 200px;
    padding: 8px 28px 8px 10px;
    border-color: #e5e7eb;
    opacity: 1;
    margin-left: 0.4rem;
}

.search-wrapper.open .search-input:focus {
    border-color: #3b82f6;
}

.search-clear {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    display: flex;
    align-items: center;
}

.search-clear:hover {
    color: #374151;
}

/* Refresh Button - Icon Only */
.btn-refresh {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-refresh:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: rotate(90deg);
}

.btn-refresh:active {
    transform: rotate(90deg) scale(0.95);
}

.btn-refresh i {
    font-size: 1rem;
}

.btn-refresh .spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Notification Button - Icon Only */
.btn-notification {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-left: 0.5rem;
}

.btn-notification:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

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

.btn-notification.muted {
    color: #d1d5db;
    background: #f9fafb;
}

.btn-notification.muted:hover {
    color: #9ca3af;
}

.btn-notification i {
    font-size: 1rem;
}

/* Quick Link Buttons - Same style as notification/bell */
.btn-quick-link {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-left: 0.5rem;
}

.btn-quick-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.btn-quick-link:active {
    transform: scale(0.95);
}

.btn-quick-link i {
    font-size: 1rem;
}

/* Tasks Table Container */
.tasks-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow-x: hidden; /* No horizontal scroll */
    overflow-y: visible;
    max-width: 100%;
    margin: 0 auto;
}

/* Tasks Table - Premium Monday.com Style */
.tasks-table {
    width: 100%; /* Full width to fill container */
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed; /* Fixed layout to respect column widths */
}

.tasks-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Column Resize Handle */
.tasks-table th {
    position: relative;
}

/* Resize handle styles removed */

.tasks-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #e5e7eb;
    border-right: 1px solid #e5e7eb; /* Excel-like vertical grid lines */
    background: #f8f9fa;
}

.tasks-table th:last-child {
    border-right: none; /* Remove border from last column */
}

.tasks-table tbody tr {
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.15s ease;
}

.tasks-table td {
    border-right: 1px solid #e5e7eb; /* Excel-like vertical grid lines */
}

.tasks-table td:last-child {
    border-right: none; /* Remove border from last column */
}

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

.tasks-table tbody tr:hover {
    background-color: #fafbfc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tasks-table td {
    padding: 10px 12px;
    color: #1f2937;
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Column Widths - Using percentages for fixed layout */
.tasks-table th.date-column,
.tasks-table td.date-cell {
    width: 7%;
}

.tasks-table th.duration-column,
.tasks-table td.duration-cell {
    width: 6%;
}

.tasks-table th.video-column,
.tasks-table td.video-name-cell {
    width: 18%;
}

.tasks-table th.transcribe-column,
.tasks-table td.transcribe-cell {
    width: 5%;
    text-align: center;
}

.tasks-table th.lang-column,
.tasks-table td.lang-cell {
    width: 9%;
    text-align: center;
}

.tasks-table th.status-column,
.tasks-table td.status-cell {
    width: 5%;
    text-align: center;
}

/* Translation in-progress display */
.translation-in-progress {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.translation-langs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.translation-arrow {
    font-size: 10px;
    color: #9ca3af;
}

.translation-progress-track {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.translation-progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.translation-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.translation-progress-percent {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
}

/* Completed translation display */
.translation-completed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Flashing target language badge */
.lang-badge.flashing {
    animation: flash-badge 1s ease-in-out infinite;
}

@keyframes flash-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Disabled + button */
.btn-add-take.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Takes column - takes remaining space */
.tasks-table th.takes-column,
.tasks-table td.takes-cell {
    width: 38%;
    text-align: center;
    padding: 8px 12px;
    position: relative;
}

/* Send column */
.tasks-table th.send-column,
.tasks-table td.send-cell {
    width: 6%;
    text-align: center;
}

/* Progress as row background */
.video-row.has-progress {
    position: relative;
    background: linear-gradient(
        to right,
        rgba(59, 130, 246, 0.08) 0%,
        rgba(59, 130, 246, 0.08) var(--progress-width, 0%),
        transparent var(--progress-width, 0%)
    );
}


/* Hide the inline progress overlay since we're using ::after */
.progress-overlay {
    display: none;
}

.video-row.read .btn-read {
    color: #9ca3af;
}

/* Cell Specific Styling */
/* Read column styles removed - envelope icons disabled */
/*
.read-cell {
    text-align: center;
}

.btn-read {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.btn-read:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-read i {
    font-size: 1rem;
}
*/

/* Unread row highlighting - disabled */
/*
.video-row.unread {
    background-color: #eff6ff;
}

.video-row.unread:hover {
    background-color: #dbeafe;
}

.video-row.unread .btn-read {
    color: #3b82f6;
}

.video-row.unread .btn-read:hover {
    color: #2563eb;
    background: #dbeafe;
}
*/

.date-cell {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.duration-cell {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.duration-loading {
    display: inline-block;
    color: #9ca3af;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

.duration-text {
    color: #374151;
    font-weight: 600;
}


.video-name {
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
    color: #1f2937;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-name:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* Transcribe Status Container - holds button and status side by side */
.transcribe-status-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.transcribe-status-content {
    flex: 1;
    min-width: 0;
}

/* AI Button - Minimal design */
/* AI Progress Indicator */
.ai-progress-indicator {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ai-progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: flash-text 1s ease-in-out infinite;
}

@keyframes flash-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.ai-process-type {
    display: block;
    font-size: 9px;
    color: #666;
    text-align: center;
    margin-top: 1px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.btn-ai {
    background: linear-gradient(135deg, #667eea 0%, #4a148c 50%, #000000 100%);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    min-width: 38px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.btn-ai:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #7c8ff0 0%, #6a1b9a 50%, #1a1a1a 100%);
}

.btn-ai:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* AI Button - Completed state with green checkmark */
.btn-ai.processing {
    background: linear-gradient(135deg, #667eea 0%, #4a148c 50%, #000000 100%);
    animation: pulse 2s ease-in-out infinite;
}

.btn-ai.processing:hover {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.btn-ai.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-ai.completed:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.btn-ai.failed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-ai.failed:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.btn-ai-failed-label {
    display: block;
    font-size: 10px;
    color: #ef4444;
    text-align: center;
    margin-top: 2px;
    font-weight: 600;
}

.btn-ai.stopped {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-ai.stopped:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.btn-ai-stopped-label {
    display: block;
    font-size: 10px;
    color: #d97706;
    text-align: center;
    margin-top: 2px;
    font-weight: 600;
}

/* Gelem Job Indicator - Circle with G inside */
.gelem-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: transparent;
    border: 2px solid #8b5a2b;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
    color: #8b5a2b;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: default;
    transition: all 0.2s ease;
}

.gelem-indicator:hover {
    background: #8b5a2b;
    color: white;
    transform: scale(1.1);
}

/* Language Badge - Square, same size as AI button */
.lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.lang-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Takes Column - Container for all take buttons in one cell */
.takes-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    column-gap: 24px;
    flex-wrap: wrap;
    padding: 0;
    row-gap: 16px;
}

/* Wrapper for take button + type label */
.take-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* Type label under take button */
.take-type-label {
    font-size: 9px;
    color: #9ca3af;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.take-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Removed: .take-item-open and .take-username - username now inside button */

.job1-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.job1-username {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Take number buttons */
.btn-take-num {
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    min-width: 70px;
}

.btn-take-num:hover {
    background: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Active (taken) take */
.btn-take-num-active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.btn-take-num-active:hover {
    background: #2563eb;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

/* Completed take */
.btn-take-num-completed {
    background: #10b981;
    color: white;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-take-num-completed:hover {
    background: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.btn-take-num-completed i {
    margin-right: 0.2rem;
}

/* Take editor buttons - shown when take is taken/completed */
.btn-take-editor {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    min-width: 90px;
}

.btn-take-editor:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.btn-take-editor:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

/* Active take editor button */
.btn-take-editor-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Completed take editor button */
.btn-take-editor-completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-take-editor-completed:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.btn-take-editor-completed:active {
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

/* Take buttons - CLOSED state (gray - available) */
.btn-take-closed {
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.7rem;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    min-width: 60px;
    margin: 0.15rem;
}

.btn-take-closed:hover {
    background: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-take-closed:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Take buttons - COMPLETED state (green with checkmark) */
.btn-take-completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.7rem;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
    min-width: 60px;
    margin: 0.15rem;
    transition: all 0.2s ease;
}

.btn-take-completed:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-take-completed:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

/* Take buttons - OPEN state (gray button with subtle border and colorful edit icon) */
.btn-take-open {
    background: #f9fafb;
    color: #374151;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    white-space: nowrap;
    min-width: 80px;
    margin: 0.15rem;
}

.btn-take-content {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-take-open:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-take-open:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Wrapper for take button + username label */
.take-item-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

/* Username label below button in brackets */
.take-username-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.01em;
}

/* Take label */
.btn-take-open .btn-take-label {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Edit icon - colorful gradient */
.btn-take-open .btn-take-content i {
    font-size: 0.6rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Revert button (X) */
.btn-revert-take {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: 1px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 0.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.btn-revert-take:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.5);
}

.btn-revert-take i {
    font-size: 0.5rem;
}

/* Delete button (X) for CLOSED takes */
.btn-delete-take {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6b7280;
    color: white;
    border: 1px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 0.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.btn-delete-take:hover {
    background: #4b5563;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.5);
}

.btn-delete-take i {
    font-size: 0.5rem;
}

/* Make sure CLOSED buttons with delete button have relative positioning */
.btn-take-closed {
    position: relative;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.toast {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Small editor button */
.btn-editor-small {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
    font-size: 0.7rem;
}

.btn-editor-small:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

/* Close take button */
.btn-close-take {
    background: #f87171;
    color: white;
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(248, 113, 113, 0.25);
    opacity: 0.85;
    font-size: 0.65rem;
}

.btn-close-take:hover {
    background: #ef4444;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Add take button (+) */
.btn-add-take {
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 0.75rem;
    margin: 0.15rem;
}

.btn-add-take:hover {
    background: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-add-take:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Take button wrapper - contains Take button + chevron as unified button */
.take-button-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin: 0.15rem;
    background: #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.take-button-wrapper:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* New take button (with chevron) - base styles */
.btn-take-new {
    background: transparent;
    color: #374151;
    border: none;
    border-radius: 4px 0 0 4px;
    padding: 0.4rem 0.7rem;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: none;
    white-space: nowrap;
    margin: 0;
}

.btn-take-new:hover {
    background: #d1d5db;
}

/* Chevron as part of the Take button */
.btn-take-chevron {
    background: transparent;
    color: #6b7280;
    border: none;
    border-left: 1px solid #d1d5db;
    border-radius: 0 4px 4px 0;
    width: 18px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.55rem;
}

.btn-take-chevron:hover {
    background: #d1d5db;
    color: #374151;
}

/* Take options dropdown menu */
.take-options-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 140px;
    margin-top: 4px;
    overflow: visible;
}

.take-options-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
}

.take-options-item:hover {
    background: #f3f4f6;
}

.take-options-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.take-options-item i {
    width: 16px;
    text-align: center;
    color: #6b7280;
}

/* Submenu for Customer option */
.take-options-item.has-submenu {
    position: relative;
    justify-content: space-between;
}

.take-options-item.has-submenu .submenu-arrow {
    margin-left: auto;
    font-size: 0.6rem;
    color: #9ca3af;
}

.take-options-submenu {
    display: none;
    position: absolute;
    right: calc(100% - 5px);
    top: -1px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
}

.take-options-item.has-submenu:hover .take-options-submenu {
    display: block;
}

.take-options-subitem {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.take-options-subitem:last-child {
    border-bottom: none;
}

.take-options-subitem:hover {
    background: #f3f4f6;
}

.take-options-subitem.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.take-options-subitem .customer-name {
    font-weight: 500;
    color: #1f2937;
}

.take-options-subitem .customer-username {
    font-size: 0.7rem;
    color: #6b7280;
}

.btn-take {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.btn-take:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.btn-take:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

/* Completed job button - green with checkmark */
.btn-take-completed {
    background: #10b981;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-take-completed:hover {
    background: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.btn-take-completed:active {
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-take-completed i {
    margin-right: 0.3rem;
}

.btn-editor {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

.btn-editor:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.btn-editor:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

.btn-editor i {
    font-size: 0.8rem;
}

/* Editor button when task is done - green checkmark */
.btn-editor-done {
    background: #10b981;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-editor-done:hover {
    background: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.btn-editor-done:active {
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-close-job {
    background: #f87171;
    color: white;
    border: none;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(248, 113, 113, 0.25);
    opacity: 0.85;
}

.btn-close-job:hover {
    background: #ef4444;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-close-job:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(248, 113, 113, 0.25);
}

.btn-close-job i {
    font-size: 0.7rem;
}

/* Status Chips */
.status-chip {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.4rem;
}

.status-completed {
    background-color: #dcfce7;
    color: #166534;
}

.status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-unknown {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-none {
    color: #9ca3af;
    font-size: 0.875rem;
}

.status-done {
    color: #10b981;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Task Status with Progress Bar */
.task-status-container {
    width: 100%;
}

.task-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.task-status-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #374151;
}

.task-status-text {
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.2px;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Status chip states with animation */
.task-status-text.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
    position: relative;
    overflow: hidden;
}

.task-status-text.status-in-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: task-shimmer 2.5s ease-in-out infinite;
}

.task-status-text.status-complete {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.task-status-text.status-pending {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.task-status-text.status-failed {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

@keyframes task-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.task-progress-bar {
    height: 4px;
    background-color: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.task-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.task-progress-transcription {
    background: #10b981;
}

.task-progress-refinement {
    background: #764ba2;
}

.task-progress-text {
    font-size: 0.6rem;
    color: #9ca3af;
    text-align: right;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-state p {
    margin-top: 1rem;
    color: #6b7280;
}

/* Google Loader */
.google-loader {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.google-loader .dot {
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    animation: google-bounce 1.4s infinite ease-in-out both;
}

.google-loader .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.google-loader .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes google-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
}

.error-state .error-icon {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-state h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.error-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state .empty-icon {
    font-size: 4rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Modal Styles (reusing from main.css but ensuring compatibility) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #374151;
}

.modal-subtitle {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.job-options {
    display: flex;
    gap: 1rem;
}

.job-option-btn {
    flex: 1;
    padding: 2rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.job-option-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.job-option-btn i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.job-option-btn h3 {
    margin: 0.5rem 0;
    color: #1f2937;
    font-size: 1.125rem;
}

.job-option-btn p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.job-option-btn.single-option {
    flex: none;
    width: 100%;
}

/* Video Player Modal */
.video-modal {
    max-width: 1200px;
    width: 95%;
}

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

.video-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
    flex: 1;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.btn-close:hover {
    color: #374151;
}

.video-player-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player-container video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
}

/* Advanced Options Accordion for Transcription Modal */
#advancedOptionsAccordion {
    margin-top: 1rem;
}

#advancedOptionsAccordion .card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #fff;
}

#advancedOptionsAccordion .card-header {
    background-color: #fff;
    border-bottom: none;
    padding: 0;
}

#advancedOptionsAccordion .card-header .btn-link {
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: #374151;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#advancedOptionsAccordion .card-header .btn-link:hover {
    color: #4f46e5;
    text-decoration: none;
}

#advancedOptionsAccordion .card-header .btn-link:focus {
    box-shadow: none;
    outline: none;
}

#advancedOptionsAccordion .card-header .btn-link i {
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

/* Advanced Options Wrapper - Light gray background inside accordion */
.advanced-options-wrapper {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0 0 8px 8px;
}

.advanced-options-wrapper .form-group:last-child {
    margin-bottom: 0;
}

/* Take Type Dropdown - Simple custom dropdown */
.take-type-dropdown-menu {
    position: absolute;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 90px;
    overflow: hidden;
}

.take-type-item {
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease;
}

.take-type-item:hover {
    background: #f3f4f6;
}

.take-type-item:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.take-type-item.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    background: #f9fafb;
}

.take-type-item.disabled:hover {
    background: #f9fafb;
}

/* Disabled take buttons when translation in progress */
.btn-take-completed.disabled,
.btn-take-open.disabled,
.btn-take-closed.disabled,
.btn-take-share.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Customer Take Styles */
.take-customer-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.25rem;
    position: relative;
}

/* Translate button next to Take 2+ */
.btn-take-translate {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.btn-take-translate:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

.btn-take-translate:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
}

.btn-take-share {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.btn-take-share:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.4);
}

.btn-take-share:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
}

/* Share Menu Dropdown */
.take-share-menu {
    position: absolute;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 120px;
    overflow: hidden;
}

.share-menu-item {
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-menu-item:hover {
    background: #f3f4f6;
}

.share-menu-item:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.share-menu-item i {
    font-size: 0.7rem;
    color: #6b7280;
    width: 14px;
}

/* ============================================
   Send to Client Feature
   ============================================ */

/* Send to Client Modal */
.send-to-client-modal {
    max-width: 500px;
    width: 90%;
}

.send-to-client-modal .modal-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.send-to-client-modal .form-group {
    margin-bottom: 1.25rem;
}

.send-to-client-modal .form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.send-to-client-modal .form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1f2937;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.send-to-client-modal .form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-to-client-modal .form-input::placeholder {
    color: #9ca3af;
}

.send-to-client-modal .form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.send-to-client-modal .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.send-to-client-modal .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.send-to-client-modal .btn-secondary:hover {
    background: #e5e7eb;
}

.send-to-client-modal .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.send-to-client-modal .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

.send-to-client-modal .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-to-client-modal .btn-primary i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Customer Picker Dropdown
   ============================================ */

.customer-picker {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.customer-picker-content {
    display: flex;
    flex-direction: column;
}

.customer-picker-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.customer-picker-current:hover {
    background-color: #eff6ff;
}

.customer-picker-current .customer-picker-name {
    font-weight: 500;
    color: #111827;
    font-size: 14px;
}

.customer-picker-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.customer-picker-badge.current {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.customer-picker-separator {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0;
}

.customer-picker-search {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.customer-picker-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.customer-picker-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.customer-picker-input::placeholder {
    color: #9ca3af;
}

.customer-picker-list {
    max-height: 240px;
    overflow-y: auto;
}

.customer-picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

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

.customer-picker-item:hover {
    background-color: #f3f4f6;
}

.customer-picker-item.hidden {
    display: none;
}

.customer-picker-item .customer-picker-name {
    font-weight: 500;
    color: #111827;
    font-size: 14px;
}

.customer-picker-item .customer-picker-username {
    font-size: 12px;
    color: #6b7280;
}

.customer-picker-empty,
.customer-picker-loading {
    padding: 20px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Scrollbar styling for customer list */
.customer-picker-list::-webkit-scrollbar {
    width: 6px;
}

.customer-picker-list::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.customer-picker-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.customer-picker-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================
   Send PAC Column & Translate Button
   ============================================ */

/* Translate button - default state (disabled) */
.btn-translate {
    background: #e5e7eb;
    color: #9ca3af;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    min-width: 32px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    font-size: 14px;
    margin-right: 6px;
}

/* Translate button - enabled state (blue) */
.btn-translate.enabled {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.btn-translate.enabled:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-translate.enabled:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

/* Translate button - loading state */
.btn-translate.loading {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    cursor: wait;
}

.btn-translate.loading i {
    animation: spin 1s linear infinite;
}

/* Send button - default state (disabled) */
.btn-send {
    background: #e5e7eb;
    color: #9ca3af;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    min-width: 38px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
}

/* Send button - enabled state */
.btn-send.enabled {
    background: #000000;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.btn-send.enabled:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-send.enabled:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

/* Send button - loading state */
.btn-send.loading {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    cursor: wait;
}

.btn-send.loading i {
    animation: spin 1s linear infinite;
}


/* ============================================
   Translation Popup
   ============================================ */

.translate-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.translate-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 380px;
    max-width: 90vw;
    overflow: hidden;
}

.translate-popup-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.translate-popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.translate-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.translate-popup-close:hover {
    opacity: 1;
}

.translate-popup-body {
    padding: 20px;
}

.translate-popup-label {
    font-size: 14px;
    color: #374151;
    margin-bottom: 10px;
    font-weight: 500;
}

.translate-popup-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.translate-popup-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.translate-popup-footer {
    padding: 16px 20px;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.translate-popup-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.translate-popup-btn-cancel {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.translate-popup-btn-cancel:hover {
    background: #f3f4f6;
}

.translate-popup-btn-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
}

.translate-popup-btn-submit:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.translate-popup-btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ============================================
   Translation Tree View - Expandable Rows
   ============================================ */

/* Translations indicator (count + chevron) */
.translations-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 2px 6px;
    background: #eff6ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.translations-indicator:hover {
    background: #dbeafe;
}

.translations-count {
    color: #3b82f6;
    font-size: 11px;
    font-weight: 500;
}

.expand-icon {
    font-size: 9px;
    color: #3b82f6;
    transition: transform 0.2s ease;
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

/* Detail row - hidden by default */
.translations-detail-row {
    display: none;
}

.translations-detail-row.expanded {
    display: table-row;
}

.translations-detail-row > td {
    padding: 0 !important;
    background: #f8fafc;
    border-top: none;
}

/* Container for the sub-table */
.translations-container {
    padding: 8px 16px 12px 40px;
    border-left: 3px solid #3b82f6;
    margin-left: 8px;
    animation: slideDown 0.2s ease-out;
}

/* Sub-table styling */
.translations-sub-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.translations-sub-table tr.translation-item {
    border-bottom: 1px solid #f1f5f9;
}

.translations-sub-table tr.translation-item:last-child {
    border-bottom: none;
}

.translations-sub-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

/* Language cell */
.trans-lang-cell {
    width: 100px;
}

/* Progress cell */
.trans-progress-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.trans-progress-bar {
    flex: 1;
    max-width: 150px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.trans-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.trans-progress-bar.completed .trans-progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.trans-progress-bar.failed .trans-progress-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.trans-progress-text {
    font-size: 11px;
    color: #6b7280;
    min-width: 50px;
}

.trans-progress-text.completed {
    color: #10b981;
    font-weight: 500;
}

.trans-progress-text.failed {
    color: #ef4444;
}

.trans-lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
}

/* Actions cell */
.trans-actions-cell {
    text-align: right;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-trans-edit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-trans-edit:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.btn-trans-download {
    background: white;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-trans-download:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Row Status Toggle (Open/Close) */
.status-cell {
    width: 50px;
    text-align: center;
}

.btn-row-status {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.btn-row-status.open {
    color: #10b981;
    border-color: #10b981;
}

.btn-row-status.open:hover {
    background: #ecfdf5;
}

.btn-row-status.closed {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
}

.btn-row-status.closed:hover {
    background: #fee2e2;
}

.delete-column,
.delete-cell {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    padding: 2px !important;
    text-align: center;
}

.btn-row-delete {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d1d5db;
    font-size: 12px;
}

.btn-row-delete:hover {
    color: #ef4444;
}

/* Sortable column headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px !important;
}

th.sortable:hover {
    background: #f3f4f6;
}

th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 4px;
    opacity: 0.3;
    font-size: 11px;
}

th.sortable.sort-asc::after {
    content: '▲';
    opacity: 0.8;
}

th.sortable.sort-desc::after {
    content: '▼';
    opacity: 0.8;
}

/* Closed Row Styling */
.video-row.row-closed {
    background: #f3f4f6 !important;
}

/* Fade all content except the status cell */
.video-row.row-closed td:not(.status-cell) {
    opacity: 0.15;
    filter: grayscale(100%);
    pointer-events: none;
}

.video-row.row-closed .btn-take-open,
.video-row.row-closed .btn-take-completed,
.video-row.row-closed .btn-take-new,
.video-row.row-closed .btn-ai,
.video-row.row-closed .btn-send,
.video-row.row-closed .video-name {
    pointer-events: none;
    cursor: not-allowed;
}

/* AI progress wrapper with chevron */
.ai-progress-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.btn-ai-chevron {
    background: transparent;
    color: #6b7280;
    border: none;
    border-left: 1px solid #d1d5db;
    border-radius: 0 4px 4px 0;
    width: 18px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.55rem;
    padding: 0;
}

.btn-ai-chevron:hover {
    background: #d1d5db;
    color: #374151;
}

/* AI options dropdown menu */
.ai-options-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 120px;
    margin-top: 4px;
}

.ai-options-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.ai-options-item:first-child {
    border-radius: 6px 6px 0 0;
}

.ai-options-item:last-child {
    border-radius: 0 0 6px 6px;
}

.ai-options-item:hover {
    background: #f3f4f6;
}

.ai-options-item i {
    width: 16px;
    text-align: center;
    color: #6b7280;
}

.ai-options-item.ai-stop {
    color: #dc2626;
}

.ai-options-item.ai-stop i {
    color: #dc2626;
}
