:root {
    --status-new:#17a2b8;
    --status-pending:#6c757d;
    --status-approved:#28a745;
    --status-rejected:#dc3545;
    --status-revision:#f0ad4e;
    --status-published: #17a2b8;
}

.submissions-section {
    padding: 3rem 0;
}

.page-title {
    color: var(--kfupm-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.page-subtitle {
    color: #555;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.action-required-section {
    margin-bottom: 2.5rem;
}

.action-required-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.action-required-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--kfupm-dark);
    margin: 0;
}

.action-required-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background-color: #f0ad4e;
    color: white;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 600;
}

.action-required-section.empty {
    display: none;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-divider-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--kfupm-dark);
    margin: 0;
    white-space: nowrap;
}

.section-divider-line {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1.25rem;
    border: 1px solid #e0e0e0;
    background: white;
    color: #555;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--kfupm-teal);
    color: var(--kfupm-teal);
}

.filter-tab.active {
    background-color: var(--kfupm-teal);
    border-color: var(--kfupm-teal);
    color: white;
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
}

.submissions-table thead th {
    text-align: left;
    padding: 1rem 0.75rem;
    font-weight: 600;
    color: var(--kfupm-dark);
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.submissions-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submissions-table tbody tr:hover {
    background-color: #f9f9f9;
}

.submissions-table tbody td {
    padding: 1.25rem 0.75rem;
    vertical-align: top;
    font-size: 0.9rem;
    color: #555;
}

.submission-id {
    font-weight: 500;
    color: var(--kfupm-dark);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-new .status-dot {
    background-color: var(--status-new);
}

.status-pending .status-dot {
    background-color: var(--status-pending);
}

.status-approved .status-dot {
    background-color: var(--status-approved);
}

.status-rejected .status-dot {
    background-color: var(--status-rejected);
}

.status-revision .status-dot {
    background-color: var(--status-revision);
}

.status-published .status-dot {
    background-color: var(--status-published);
}

.see-details-link {
    color: var(--kfupm-teal);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.see-details-link:hover {
    color: #0d4a50;
    text-decoration: underline;
}

.see-details-link svg {
    width: 16px;
    height: 16px;
}

.take-action-link {
    color: #f0ad4e;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    font-weight: 500;
}

.take-action-link:hover {
    color: #ec971f;
    text-decoration: underline;
}

.col-id {
    width: 12%;
}

.col-title {
    width: 18%;
}

.col-description {
    width: 25%;
}

.col-date {
    width: 18%;
}

.col-status {
    width: 15%;
}

.col-action {
    width: 12%;
    text-align: right;
}

@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto;
    }

    .submissions-table {
        min-width: 800px;
    }
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    background: linear-gradient(135deg, var(--kfupm-teal) 0%, var(--kfupm-teal) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.25rem 2rem;
    background: #f8f9fa;
}

.modal-status-header {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.modal-submission-id {
    font-size: 0.875rem;
    color: #6c757d;
}

.modal-submission-id strong {
    color: var(--kfupm-dark);
}

.modal-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-status-badge.status-new {
    background: rgba(23, 162, 184, 0.1);
    color: var(--status-new);
}

.modal-status-badge.status-pending {
    background: rgba(108, 117, 125, 0.1);
    color: var(--status-pending);
}

.modal-status-badge.status-approved {
    background: rgba(40, 167, 69, 0.1);
    color: var(--status-approved);
}

.modal-status-badge.status-rejected {
    background: rgba(220, 53, 69, 0.1);
    color: var(--status-rejected);
}

.modal-status-badge.status-revision {
    background: rgba(240, 173, 78, 0.1);
    color: #c88a00;
}

.modal-status-badge.status-published {
    background: rgba(23, 162, 184, 0.1);
    color: var(--status-published);
}

.detail-section {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--kfupm-dark);
    font-weight: 500;
}

.detail-value.empty {
    color: #adb5bd;
    font-style: italic;
    font-weight: 400;
}

.thumbnail-preview {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 16/9;
    background: #f1f3f4;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-preview .no-image {
    color: #adb5bd;
    font-size: 0.875rem;
}

.attachment-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    max-width: 300px;
}

.attachment-icon {
    width: 40px;
    height: 40px;
    background: var(--kfupm-teal);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--kfupm-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-size {
    font-size: 0.75rem;
    color: #6c757d;
}

.attachment-download {
    color: var(--kfupm-teal);
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.attachment-download:hover {
    background: rgba(13, 110, 110, 0.1);
}

/* Revision Section */
.revision-section {
    background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
    border-left: 4px solid var(--status-revision);
}

.revision-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.revision-icon {
    width: 36px;
    height: 36px;
    background: var(--status-revision);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.revision-title {
    font-size: 1rem;
    font-weight: 600;
    color: #856404;
    margin: 0;
}

.revision-subtitle {
    font-size: 0.8rem;
    color: #997a00;
    margin: 0;
}

.revision-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.revision-comment {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(240, 173, 78, 0.2);
}

.revision-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.revision-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.revision-author-avatar {
    width: 28px;
    height: 28px;
    background: var(--kfupm-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.revision-author-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kfupm-dark);
}

.revision-date {
    font-size: 0.75rem;
    color: #6c757d;
}

.revision-comment-body {
    font-size: 16px;
    color: #495057;
    line-height: 1.6;
}

.revision-field-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(13, 110, 110, 0.1);
    color: var(--kfupm-teal);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Rejection Section */
.rejection-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-left: 4px solid var(--status-rejected);
}

.rejection-icon {
    width: 36px;
    height: 36px;
    background: var(--status-rejected);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.rejection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #721c24;
    margin: 0;
}

.rejection-reason {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(220, 53, 69, 0.2);
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
}

/* Buttons */
.btn-modal-primary {
    background: var(--kfupm-teal);
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-modal-primary:hover {
    background: #0a5858;
    color: white;
}

.btn-modal-secondary {
    background: white;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-modal-secondary:hover {
    background: #f8f9fa;
    color: var(--kfupm-dark);
}

.btn-modal-success {
    background: var(--status-approved);
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-modal-success:hover {
    background: #218838;
    color: white;
}

.modal-scroll-content {
    max-height: 70vh;
    overflow-y: auto;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(13, 110, 110, 0.1);
    color: var(--kfupm-teal);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Editable Fields */
.editable-field .form-control,
.editable-field .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.editable-field .form-control:focus,
.editable-field .form-select:focus {
    border-color: var(--kfupm-teal);
    box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.1);
}

.editable-field textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

.needs-revision-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: rgba(240, 173, 78, 0.15);
    color: #c88a00;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-needs-revision .form-control,
.field-needs-revision .form-select {
    border-color: var(--status-revision) !important;
    background-color: rgba(240, 173, 78, 0.05);
}

.thumbnail-upload-edit {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.thumbnail-dropzone-edit {
    aspect-ratio: 16/9;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8f9fa;
    overflow: hidden;
    position: relative;
}

.thumbnail-dropzone-edit:hover {
    border-color: var(--kfupm-teal);
    background: rgba(13, 110, 110, 0.05);
}

.thumbnail-dropzone-edit.has-image {
    border-style: solid;
    border-color: var(--kfupm-teal);
}

.thumbnail-dropzone-edit.field-needs-revision {
    border-color: var(--status-revision);
    background: rgba(240, 173, 78, 0.05);
}

.thumbnail-dropzone-edit .dropzone-content {
    text-align: center;
    padding: 1rem;
}

.thumbnail-dropzone-edit .dropzone-icon {
    font-size: 2rem;
    color: #adb5bd;
    margin-bottom: 0.5rem;
}

.thumbnail-dropzone-edit .dropzone-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

.thumbnail-dropzone-edit .preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-dropzone-edit .remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.thumbnail-dropzone-edit:hover .remove-image {
    opacity: 1;
}

.char-count {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
}

.char-count.warning {
    color: var(--status-revision);
}

.char-count.error {
    color: var(--status-rejected);
}

.edit-mode-banner {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid var(--status-approved);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.edit-mode-icon {
    width: 36px;
    height: 36px;
    background: var(--status-approved);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.edit-mode-text h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1b5e20;
}

.edit-mode-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #2e7d32;
}

.input-group-edit {
    position: relative;
}

.input-group-edit .form-control {
    padding-right: 2.5rem;
}

.input-group-edit .input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

@media (max-width: 768px) {

    .modal-header,
    .detail-section {
        padding: 1.25rem 1.5rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }
}