/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f9fafb;
    color: #1f2937;
    line-height: 1.5;
}

/* Header */
.header {
    background-color: #6d28d9;
    color: white;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.container {
    width: 90%;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.app-title {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.beta-badge {
    background-color: #f39c12;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: v0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.875rem;
    text-decoration: none;
}

.btn-white {
    background-color: white;
    color: #6d28d9;
}

.btn-white:hover {
    background-color: #f9fafb;
}

.btn-primary {
    background-color: #6d28d9;
    color: white;
}

.btn-primary:hover {
    background-color: #5b21b6;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background-color: #f3f4f6;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Main content */
.main {
    width: 90%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Loading state */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    text-align: center;
}

.loading-spinner {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #6d28d9;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Card editor */
.editor {
    display: none;
}

.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 1rem;
    gap: 0.5rem;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
     margin-bottom: 0 !important;
}

.card.table-section {
    margin-top: 0 !important;
}

.toolbar-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    width: 100%;
    min-width: 240px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* Table */
.table-container {
    overflow-x: auto;
    width: 100%; 
}

table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

tr:nth-child(even) {
    background-color: #f9fafb;
}

.cell-checkbox {
    width: 48px;
}

.card-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 0.25rem;
}

.editable-cell {
    position: relative;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    min-height: 24px;
}

.editable-cell:hover {
    background-color: #eff6ff;
    border-color: #dbeafe;
}

.editable-cell.editing {
    padding: 0;
    border: 2px solid #6d28d9;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.editable-cell input,
.editable-cell textarea {
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    resize: none;
}

.editable-cell input:focus,
.editable-cell textarea:focus {
    outline: none;
}

.card-image {
  max-width: 150px;
  max-height: auto;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 0 auto;
}


.card-image-url {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 5px;
    word-break: break-all;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-placeholder {
    width: 120px;
    height: 80px;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

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

.empty-icon {
    color: #d1d5db;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    gap: 0.25rem;
}

.pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #4b5563;
    cursor: pointer;
}

.pagination-button:hover {
    background-color: #f3f4f6;
}

.pagination-button.active {
    background-color: #ede9fe;
    color: #6d28d9;
    border-color: #6d28d9;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    max-width: 24rem;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid;
}

.toast-success {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.toast-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.toast-warning {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.toast-info {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.toast-icon {
    margin-right: 0.75rem;
}

.toast-message {
    flex: 1;
}

.toast-close {
    color: #9ca3af;
    cursor: pointer;
}

.toast-close:hover {
    color: #6b7280;
}

@keyframes slideIn {
    from {
        transform: translateY(1rem);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
    }

    20%,
    80% {
        opacity: 1;
    }
}

/* Auto-save indicator */
.auto-save-indicator {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.fade-in-out {
    animation: fadeInOut 2s ease-in-out;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
        margin-top: 0.5rem;
    }

    .search-input {
        width: 100%;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .header-actions {
        margin-top: 0.5rem;
    }
}

/* Sortable table styles */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
}

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

th.sortable::after {
    content: '↕';
    position: absolute;
    right: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

th.sortable.sort-asc::after {
    content: '↑';
    color: #6d28d9;
}

th.sortable.sort-desc::after {
    content: '↓';
    color: #6d28d9;
}

/* Link styling in the editor */
.link-container {
    display: flex;
    align-items: center;
}

.link-container a {
    color: #6d28d9;
    text-decoration: underline;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

.link-container a:hover {
    color: #4c1d95;
}

/* Add a subtle URL icon */
/* .link-container::before {
    /* content: "\f0c1"; Link icon 
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.25rem;
    font-size: 0.8rem;
    color: #9ca3af;
} */

/* Add rotation controls styles if not already present */
.image-controls {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.rotate-btn {
    background: none;
    border: none;
    color: #4F46E5;
    cursor: pointer;
    margin: 0 5px;
    padding: 5px;
    transition: color 0.3s ease;
}

.rotate-btn:hover {
    color: #3730A3;
}

.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-radius: 50%;
    border-top-color: #4F46E5;
    animation: spin 1s linear infinite;
    margin: 0 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notification styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 350px;
}

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

.toast-hide {
    opacity: 0;
    transform: translateY(10px);
}

.toast-success {
    border-left: 4px solid #10B981;
}

.toast-error {
    border-left: 4px solid #EF4444;
}

.toast-info {
    border-left: 4px solid #3B82F6;
}

.toast-close {
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    float: right;
    font-size: 16px;
    margin-left: 10px;
    padding: 0;
}

/* Editor layout */
.editor-layout {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.table-section {
    flex: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Card image preview panel */
.card-preview-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 450px;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: none;
    flex-shrink: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.card-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.card-preview-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0;
}

.preview-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.preview-close-btn:hover {
    background-color: #f3f4f6;
    color: #4b5563;
}

.card-preview-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    max-height: 500px;
}

.preview-image {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.preview-controls {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
    gap: 0.5rem;
}

.preview-url {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.5rem;
    word-break: break-all;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Kanban-style Card View */
.card-kanban-view {
    padding: 1rem;
    background-color: white;
}

.kanban-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-box {
    width: 250px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: #fafafa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kanban-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.kanban-info {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.4;
}

.card.table-section {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Scroll only this container */
.table-container {
  overflow-y: auto;
  max-height: calc(100vh - 260px); /* adjust to fit under toolbar/header */
}

/* Sticky header fix */
.table-container thead th {
  position: sticky;
  top: 0; /* now scrolls within the container, so 0 works */
  background-color: #f9fafb;
  z-index: 10;
  border-bottom: 1px solid #e5e7eb;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 5vh auto;
  padding: 0;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  width: 85%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #111827;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h2 i {
  color: #3b82f6;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: #f9fafb;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s ease;
}

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

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background-color: #f0f9ff;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #bae6fd;
}

.info-banner i {
  color: #0ea5e9;
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.info-banner p {
  margin: 0;
  color: #0c4a6e;
  font-size: 0.95rem;
  line-height: 1.5;
}

.field-mappings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.mapping-item {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.mapping-item:hover {
  background-color: #f9fafb;
}

.mapped-field {
  border-left: 3px solid #10b981;
  background-color: #f0fdf4;
}

.mapping-item label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
  display: flex;
  justify-content: space-between;
}

.mapping-field-status {
  font-size: 0.75rem;
  font-weight: normal;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.mapped-status {
  background-color: #d1fae5;
  color: #065f46;
}

.required-field {
  color: #ef4444;
  margin-left: 0.25rem;
}

.form-select {
  padding: 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  width: 100%;
  background-color: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-select.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.results-summary {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border-radius: 0.5rem;
  line-height: 1.5;
}

.results-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.results-partial {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.results-error {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.results-list {
  max-height: 350px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-item {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

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

.result-item.success {
  background-color: #f0fdf4;
}

.result-item.error {
  background-color: #fef2f2;
}

.loading-spinner-small {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}



.sf-connected-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-right: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sf-connected-indicator i {
  color: #10b981;
}

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

@keyframes highlight-pulse {
  0%, 100% { background-color: transparent; }
  50% { background-color: #d1fae5; }
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 2vh auto;
  }
  
  .field-mappings {
    grid-template-columns: 1fr;
  }
}
/* Crop Modal Styles */
.crop-modal-content {
  max-width: 800px;
  width: 90%;
}

.crop-container {
  text-align: center;
  margin: 20px 0;
}

.crop-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* Preview Modal Styles */
.preview-modal-content {
  max-width: 900px;
  width: 95%;
}

.full-preview-container {
  text-align: center;
  margin: 20px 0;
}

.full-preview-image {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.preview-controls-modal {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* Enhanced Details Panel Styles */
.details-panel {
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
  background: linear-gradient(to right, #f9fafb, #f3f4f6);
}

.details-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #111827;
}

.details-title i {
  font-size: 1.25rem;
  color: #6d28d9;
}

.details-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.processing-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: #fff;
  border-radius: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: 500;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #fbbf24; /* Yellow for processing */
  position: relative;
}

.status-indicator.pulse::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(251, 191, 36, 0.4);
  animation: pulse 1.5s infinite;
  z-index: -1;
}

.status-indicator.completed {
  background-color: #10b981; /* Green for completed */
}

.status-indicator.completed.pulse::after {
  background-color: rgba(16, 185, 129, 0.4);
}

.status-indicator.failed {
  background-color: #ef4444; /* Red for failed */
}

.status-indicator.failed.pulse::after {
  background-color: rgba(239, 68, 68, 0.4);
}

.details-content {
  padding: 0;
  display: flex;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background-color: #fff;
  justify-content: center;
}

.details-section {
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
  width: 100%;
}

.details-section:hover {
  background-color: #fafafa;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.section-header i {
  color: #6d28d9;
  font-size: 1rem;
}

.section-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #4b5563;
}

.detail-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  line-height: 1.4;
}

.detail-label {
  font-weight: 500;
  color: #6b7280;
  width: 120px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-label i {
  color: #6d28d9;
  font-size: 0.875rem;
  width: 14px;
  text-align: center;
}

.detail-value {
  color: #1f2937;
  word-break: break-word;
}

.highlight-value {
  font-weight: 500;
  color: #059669;
}

.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #6d28d9;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.pdf-link:hover {
  background-color: #f5f3ff;
  color: #5b21b6;
  text-decoration: none;
}

.pdf-link i {
  color: #6d28d9;
}

/* Progress bar styles */
.progress-item {
  flex-direction: column;
  gap: 0.5rem;
}

.progress-status {
  width: 100%;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.progress-label {
  font-weight: 500;
  color: #4b5563;
}

.progress-count {
  color: #6b7280;
  font-weight: 500;
}

.progress-bar-container {
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, #8b5cf6, #6d28d9);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 4px;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shine 1.5s infinite;
}

.processing-message {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.5rem;
  height: 1.25rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.completion-details {
  grid-column: span 2;
  background-color: #f0fdf4;
  border-radius: 0.5rem;
  border: 1px solid #d1fae5;
}

.completion-message {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background-color: white;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.completion-icon {
  font-size: 1.5rem;
  color: #10b981;
  margin-top: 0.25rem;
}

.completion-message p {
  margin: 0.25rem 0;
  color: #374151;
}

.completion-message p:first-child {
  font-weight: 500;
  color: #065f46;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes shine {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 768px) {
  .details-content {
    grid-template-columns: 1fr;
  }
  
  .completion-details {
    grid-column: span 1;
  }
}

/* Add this to your CSS */
.image-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 6px;
}

.loading-spinner-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(109, 40, 217, 0.2);
  border-radius: 50%;
  border-top-color: #6d28d9;
  animation: spin 1s linear infinite;
}

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