/* Professional Enterprise Transcoding Platform Styles */

/* Global Layout & Typography */
body {
    background-color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #334155;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
}

/* Navigation Bar */
.navbar-custom {
    background: linear-gradient(135deg, #FF0099 0%, #E6008A 100%) !important;
    box-shadow: 0 2px 8px rgba(255,0,153,0.2);
}

.navbar-custom .navbar-brand {
    color: white !important;
    font-weight: 600;
}

.navbar-custom .navbar-brand:hover {
    color: #FFD700 !important;
}

.navbar-custom .nav-link {
    color: white !important;
}

.navbar-custom .nav-link:hover {
    color: #FFD700 !important;
}

.navbar-custom .dropdown-menu {
    background: white;
    border: 1px solid #E6008A;
}

.navbar-custom .dropdown-item {
    color: #FF0099;
}

.navbar-custom .dropdown-item:hover {
    background: #FF0099;
    color: white;
}

/* Header & Hero Section */
.hero-section {
    background: linear-gradient(135deg, #FF0099 0%, #E6008A 100%);
    color: white;
    padding: 60px 0;
    margin: -2rem -15px 2rem -15px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 32px rgba(255,0,153,0.3);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 300;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Professional Cards */
.enterprise-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.enterprise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.card-header-custom {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 32px;
    border-radius: 16px 16px 0 0;
}

.card-title-custom {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title-custom i {
    color: #FF0099;
    font-size: 1.4rem;
}

.card-body-custom {
    padding: 32px;
}

/* Form Controls */
.form-control-custom {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 14px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.form-control-custom:focus {
    border-color: #FF0099;
    box-shadow: 0 0 0 3px rgba(255, 0, 153, 0.1);
    background-color: #ffffff;
}

.form-select-custom {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 14px 16px;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.form-select-custom:focus {
    border-color: #FF0099;
    box-shadow: 0 0 0 3px rgba(255, 0, 153, 0.1);
}

/* Professional Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #FF0099 0%, #E6008A 100%);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 0, 153, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 0, 153, 0.4);
    background: linear-gradient(135deg, #CC007A 0%, #B3006B 100%);
}

.btn-outline-custom {
    border: 2px solid #FF0099;
    border-radius: 12px;
    padding: 12px 24px;
    color: #FF0099;
    background: transparent;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: #FF0099;
    color: white;
    transform: translateY(-1px);
}


/* Jobs Table */
.jobs-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.jobs-table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: none;
    font-weight: 600;
    color: #1e293b;
    padding: 16px 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.jobs-table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
}

.jobs-table .job-row:hover {
    background-color: #f8fafc;
}

.jobs-table .expand-col {
    width: 40px;
    text-align: center;
}

.jobs-table .job-toggle {
    color: #64748b;
    transition: all 0.2s ease;
    padding: 4px;
}

.jobs-table .job-toggle:hover {
    color: #FF0099;
}

.jobs-table .job-name-col {
    min-width: 200px;
}

.jobs-table .job-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.jobs-table .status-col {
    min-width: 120px;
}

.jobs-table .details-col {
    min-width: 150px;
}

.jobs-table .actions-col {
    min-width: 180px;
}

.jobs-table .btn-group .btn {
    margin-right: 4px;
}

.jobs-table .btn-group .btn:last-child {
    margin-right: 0;
}

.job-details-row {
    background-color: #fafbfc;
}

.job-details-content {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.job-sources, .job-outputs {
    margin-bottom: 1rem;
}

.job-sources div, .job-outputs .output-link {
    margin-bottom: 0.25rem;
    padding: 4px 8px;
    background: #f8fafc;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
}

.source-link {
    color: #0066cc;
    text-decoration: none;
    transition: all 0.2s ease;
}

.source-link:hover {
    color: #004499;
    text-decoration: underline;
}

.output-link {
    color: #FF0099;
    text-decoration: none;
    transition: all 0.2s ease;
}

.output-link:hover {
    color: #E6008A;
    background: #fef1f7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .jobs-table .job-name-col {
        min-width: 150px;
    }

    .jobs-table .details-col,
    .jobs-table .actions-col {
        min-width: 120px;
    }

    .jobs-table .btn-group .btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

/* Input Method Toggle */
.input-method-toggle {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 8px;
    display: inline-flex;
    gap: 4px;
}

.input-method-toggle .btn {
    border-radius: 12px;
    border: none;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.input-method-toggle .btn-check:checked + .btn {
    background: linear-gradient(135deg, #FFFF00 0%, #FFF700 100%);
    color: #4C002E;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-weight: 600;
}

/* Enterprise Upload Area */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 153, 0.1), transparent);
    transition: left 0.5s;
}

.upload-area:hover {
    border-color: #FF0099;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 0, 153, 0.15);
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area.dragover {
    border-color: #FF0099;
    background: linear-gradient(145deg, #ffffff 0%, #fff0f7 100%);
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 0, 153, 0.2);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-area .upload-icon {
    font-size: 3.5rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #FF0099;
    transform: scale(1.1);
}

.upload-area h5 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: #64748b;
    font-size: 1rem;
}

.upload-area .text-primary {
    color: #FF0099 !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.upload-content {
    pointer-events: none;
}

/* Override pointer-events for browse button */
#browseFiles {
    pointer-events: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: white;
}

.file-item .file-info {
    flex: 1;
    margin-left: 10px;
}

.file-item .file-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.file-item .file-size {
    color: #6c757d;
    font-size: 0.875rem;
}

.file-item .file-progress {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.file-item .progress-fill {
    height: 100%;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

/* Professional Job Items */
.job-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.job-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FF0099 0%, #E6008A 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.job-item:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #cbd5e1;
    background: white;
}

.job-item:hover::before {
    opacity: 1;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    padding: 8px 0;
}

.job-toggle {
    transition: transform 0.3s ease;
    color: #94a3b8;
    margin-right: 8px;
}

.job-item h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
}

/* Enhanced Status Badges */
.job-status {
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.status-pending {
    background: linear-gradient(135deg, #FFFF00 0%, #FFF700 100%);
    color: #4C002E;
    border-color: #F4EA15;
}

.status-processing {
    background: linear-gradient(135deg, #FF66C2 0%, #FF4DB8 100%);
    color: white;
    border-color: #FF33AD;
    position: relative;
    overflow: hidden;
}

.status-processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: processing-shimmer 2s infinite;
}

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

.status-completed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #34d399;
}

.status-failed {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border-color: #f87171;
}

.status-cancelled {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border-color: #94a3b8;
}

.job-sources {
    margin-bottom: 10px;
}

.job-outputs {
    margin-top: 15px;
}

.output-link {
    display: inline-block;
    margin: 5px 10px 5px 0;
    padding: 8px 16px;
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
}

.output-link:hover {
    background-color: #0b5ed7;
    color: white;
    text-decoration: none;
}

.job-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 10px;
}

.no-jobs {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
}

/* Loading animations */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Enhanced Output Links */
.output-link {
    display: inline-flex;
    align-items: center;
    margin: 6px 12px 6px 0;
    padding: 10px 18px;
    background: linear-gradient(135deg, #FF0099 0%, #E6008A 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 0, 153, 0.3);
}

.output-link:hover {
    background: linear-gradient(135deg, #CC007A 0%, #B3006B 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 0, 153, 0.4);
}

.output-link i {
    margin-right: 6px;
}

/* Job Details Styling */
.job-details {
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    margin-top: 16px;
}

.job-sources, .job-outputs {
    margin-bottom: 16px;
}

.job-sources strong, .job-outputs strong {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
}

.job-sources div, .job-outputs div {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.9rem;
}

.job-sources i, .job-outputs i {
    color: #94a3b8;
    margin-right: 6px;
}

.job-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.job-meta .row {
    margin: 0;
}

.job-meta .col-sm-6 {
    padding: 2px 0;
}

/* Enhanced Job Actions */
.job-actions .btn {
    margin-left: 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 6px 12px;
    font-weight: 500;
}

.job-actions .btn-outline-secondary {
    border-color: #94a3b8;
    color: #64748b;
}

.job-actions .btn-outline-secondary:hover {
    background-color: #94a3b8;
    border-color: #94a3b8;
    color: white;
}

.job-actions .btn-outline-danger {
    border-color: #ef4444;
    color: #dc2626;
}

.job-actions .btn-outline-danger:hover {
    background-color: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* No Jobs State */
.no-jobs {
    text-align: center;
    color: #94a3b8;
    padding: 60px 20px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
}

.no-jobs i {
    color: #cbd5e1;
    margin-bottom: 16px;
}

.no-jobs h5 {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Enhanced Pagination */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border: none;
    color: #64748b;
    background: white;
    border-radius: 8px !important;
    margin: 0 2px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: #FF0099;
    background: #fff0f7;
    border-color: transparent;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #FF0099 0%, #E6008A 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 0, 153, 0.3);
}

.page-item.disabled .page-link {
    color: #cbd5e1;
    background: #f8fafc;
}

/* Loading States */
.spinner-border {
    color: #FF0099;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .stats-row {
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .card-body-custom {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        margin: -1rem -15px 2rem -15px;
        padding: 30px 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-row {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .job-actions {
        align-self: stretch;
        display: flex;
        gap: 8px;
    }

    .job-actions .btn {
        flex: 1;
        margin-left: 0;
    }

    .upload-area {
        padding: 32px 20px;
    }

    .upload-area .upload-icon {
        font-size: 3rem;
    }

    .card-body-custom {
        padding: 20px;
    }

    .card-header-custom {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .input-method-toggle {
        width: 100%;
    }

    .input-method-toggle .btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .btn-primary-custom {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
}