.markup-two-panel-layout {
    display: flex;
    height: 100vh;
    position: relative;
}
.markup-left-panel {
    width: 280px;
    min-width: 200px;
    max-width: 340px;
    background: #f7f7f7;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}
.markup-actions-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 16px 12px 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}
.markup-actions-left {
    display: flex;
    align-items: center;
    gap: 5px;
}
.markup-actions-right {
    display: flex;
    align-items: center;
}
.markup-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.markup-item-panel {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    margin: 8px 12px;
    padding: 12px 12px 8px 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition:
        box-shadow 0.15s,
        background 0.15s;
    cursor: pointer;
}
.markup-item-panel:hover {
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(0, 80, 200, 0.08);
}
.markup-item-panel.selected {
    background: #e6f0fa;
    box-shadow: 0 2px 8px rgba(0, 80, 200, 0.12);
}
.markup-item-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.markup-item-title {
    font-weight: bold;
    flex: 1;
    margin-right: 8px;
}
.markup-item-status {
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 10px;
    background: #e6f4ea;
    color: #219150;
    margin-left: 6px;
    align-self: flex-start;
}
.markup-badge-success,
.markup-badge-done {
    background: #e6f4ea !important;
    color: #219150 !important;
}
.markup-badge-warning,
.markup-badge-finishing,
.markup-badge-in_progress {
    background: #fffbe6 !important;
    color: #bfa100 !important;
}
.markup-badge-error {
    background: #ffeaea !important;
    color: #d32f2f !important;
}
.markup-badge-draft {
    background: #eaf0fa !important;
    color: #1976d2 !important;
}
.markup-badge-starting {
    background: #eaf0fa !important;
    color: #1976d2 !important;
}
.markup-item-info {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
}
.markup-right-panel {
    flex: 1;
    background: #fff;
    overflow-y: auto;
}

.markup-details-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    color: #7a869a;
    text-align: center;
    padding: 32px 0;
}
.markup-details-empty-icon {
    margin-bottom: 16px;
}
.markup-details-empty-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #4a5670;
}
.markup-details-empty-desc {
    font-size: 15px;
    margin-bottom: 18px;
    color: #7a869a;
}
.markup-details-empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.markup-details-link {
    color: #2196f3;
    text-decoration: underline;
    cursor: pointer;
}
.markup-details-section {
    display: flex;
    flex-direction: column;
    padding-bottom: 5em;
}
.markup-details-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}
.markup-details-extra-row {
    display: block;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
}
.markup-details-info-main {
    flex: 1;
    min-width: 0;
}
.markup-details-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}
.markup-details-title {
    font-size: 22px;
    font-weight: 600;
    color: #2a3548;
}
.markup-details-status {
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 8px;
    background: #e6f4ea;
    color: #219150;
}
.markup-details-system {
    font-size: 15px;
    color: #6a7a8c;
    margin-bottom: 8px;
}
.markup-details-system-item {
    margin-right: 18px;
}
.markup-details-description {
    font-size: 15px;
    color: #4a5670;
    margin-bottom: 10px;
}
.markup-details-dates {
    font-size: 13px;
    color: #8a98a8;
    margin-top: 6px;
    display: flex;
    gap: 18px;
}
.markup-details-download-btn {
    border-radius: 16px;
}

/* Markup Stats Styles */
.markup-stats-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.markup-stats-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.markup-stats-value {
    font-size: 24px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.markup-stats-value.markup-stats-broken {
    color: #dc3545;
}

.markup-stats-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.markup-stats-labels {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.markup-stats-labels-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.markup-stats-labels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.markup-stats-label-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.markup-stats-label-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.markup-stats-label-header {
    padding: 8px 12px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.markup-stats-label-content {
    padding: 12px;
}

.markup-stats-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f8f9fa;
}

.markup-stats-label-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.markup-stats-label-text {
    font-size: 12px;
    color: #6c757d;
    flex: 1;
}

.markup-stats-label-value {
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    text-align: right;
    min-width: 30px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .markup-stats-labels-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .markup-stats-label-card {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .markup-stats-labels-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }
}

.markup-creator-top-info-section,
.markup-creator-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 24px 24px 18px 24px;
    margin-top: 16px;
}
.markup-creator-form-row {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.markup-creator-form-group {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    margin-bottom: 0;
}
.markup-creator-label {
    font-size: 15px;
    font-weight: 700;
    color: #4a5670;
    margin-bottom: 7px;
}
.markup-creator-input {
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #d0d7e2;
    padding: 8px 12px;
    background: #f9fafb;
    transition: border 0.15s;
}
.markup-creator-input:focus {
    border: 1.5px solid #2196f3;
    background: #fff;
    outline: none;
}

.markup-creator-section-block {
    margin-top: 2em;
    padding: 18px 16px;
    border-radius: 8px;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.markup-creator-section-block .ibox {
    margin-bottom: 0;
}
.markup-creator-section-block .ibox-title {
    font-size: 1.1em;
    margin-bottom: 10px;
}
.markup-creator-section-block .form-group {
    margin-bottom: 12px;
}

.markup-task-view-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
    margin-top: 12px;
}

.markup-task-view-image-thumb-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 300px;
    max-height: 350px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background: #fff;
    overflow: hidden;
    transition: all 0.2s ease;
}

.markup-task-view-image-thumb-wrapper:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.markup-task-view-image-thumb-wrapper.loading {
    opacity: 0.7;
}

.markup-task-view-image-thumb-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.markup-task-view-image-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.markup-creator-image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 12px;
}

.markup-creator-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.markup-creator-image-info {
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.markup-creator-image-name {
    font-size: 11px;
    color: #333;
    font-weight: 500;
    margin-bottom: 3px;
    word-break: break-all;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.markup-creator-image-details {
    font-size: 10px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.markup-creator-image-size {
    color: #888;
}

.markup-creator-image-status {
    padding: 2px 3px;
    border-radius: 10px;
    max-width: 65%;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
}

.markup-creator-image-status.loading {
    background: #fff3cd;
    color: #856404;
}

.markup-creator-image-status.waiting {
    background: #fff3cd;
    color: #856404;
}

.markup-creator-image-status.uploading {
    background: #cce5ff;
    color: #004085;
}

.markup-creator-image-status.success {
    background: #d4edda;
    color: #155724;
}

.markup-creator-image-status.loaded {
    background: #d4edda;
    color: #155724;
}

.markup-creator-image-status.error {
    background: #f8d7da;
    color: #721c24;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.markup-creator-image-status.error:hover {
    overflow: visible;
    position: fixed;
    right: 5px;
    padding: 5px;
    white-space: normal;
    word-wrap: break-word;
    z-index: 1000;
    max-width: 90%;
    max-height: 100%;
    color: white;
    background: rgba(160, 40, 40, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.markup-task-view-image-thumb-wrapper[data-image-id] {
    border: 3px solid gray;
    border-radius: 4px;
}

.markup-task-view-image-thumb-wrapper.success {
    border-color: #28a745;
}
.markup-task-view-image-thumb-wrapper.error {
    border-color: red;
}

.markup-task-view-image-thumb-wrapper[data-image-id]
    .markup-creator-image-status.success {
    background-color: #28a745;
    color: white;
    border-radius: 3px;
    padding: 2px 5px;
}

.markup-creator-image-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #dc3545;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.markup-creator-image-delete-btn:hover {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.markup-creator-actions-block {
    padding: 24px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.markup-creator-dropzone {
    border: 2px dashed #bbb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: alias;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.markup-creator-dropzone.dragover {
    border-color: #4caf50;
    background: #f0fff0;
}

.markup-creator-dropzone-text {
    color: #888;
    font-size: 1.1em;
    pointer-events: none;
}

.markup-creator-form-images {
    flex-direction: row;
}

#markup-creator-images {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.markup-image-annotation-container {
    position: relative;
    display: inline-block;
}

.markup-task-view-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100;
    width: 100%;
    height: auto;
}

.annotation-rectangle {
    position: absolute;
    border: 2px solid rgba(255, 0, 0, 0.7);
    background-color: rgba(255, 0, 0, 0.2);
}

.annotation-polygon {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.annotation-mask {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.markup-creator-dropzone-text-main {
    font-size: 1.2em;
    margin-bottom: 12px;
    color: #555;
}
.markup-creator-dropzone-actions {
    margin-bottom: 8px;
}
.markup-creator-dropzone-actions .btn-link {
    margin: 0 8px;
    font-size: 1em;
    color: #1976d2;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
}
.markup-creator-dropzone-actions .btn-link:hover {
  color: #0d47a1;
  text-decoration: underline;
}

.markup-creator-label-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    padding: 12px 12px 8px 12px;
    position:relative;
    margin-bottom:16px;
}
.markup-creator-label-item > p {
  display: flex;
  gap: 1em;
}
.markup-creator-label-item > p > span {
  min-width: 5em;
  border-radius: 1em;
}
.markup-creator-label-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
}

.markup-creator-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    justify-content: flex-start;
    align-items: stretch;
}
.markup-creator-steps div {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    background: #f3f6fa;
    transition:
        background 0.2s,
        color 0.2s;
    display: flex;
    align-items: center;
    min-width: 180px;
    flex: 1 1 6em;
    box-sizing: border-box;
    margin: 0;
}
.markup-creator-steps div.active {
    background: #1976d2;
    color: #fff;
}
.markup-creator-steps div.disabled {
    pointer-events: none;
    opacity: 0.5;
}
.markup-creator-steps div .step-num {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: #1976d2;
    font-weight: bold;
    text-align: center;
    line-height: 28px;
    margin-right: 8px;
    border: 2px solid #1976d2;
}
.markup-creator-steps div.active .step-num {
    background: #fff;
    color: #1976d2;
    border-color: #fff;
}

.markup-step-title {
    display: flex;
    align-items: center;
    font-size: 2ex;
}

.markup-step-title::before {
    content: attr(data-step_num);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    min-width: 34px;
    background: #f4f4fc;
    border: 1px solid #727272;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 500;
    line-height: 34px;
    color: #727272;
    cursor: default;
    margin-right: 10px;
}

.markup-creator-next-step-btn {
    font-size: 2.5ex;
    margin: 1em 0;
    display: block;
}

.markup-creator-dropzone-text-main {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.markup-creator-instruction-preview {
    margin-top: 10px;
    cursor: default;
}

.markup-creator-example-container {
    margin-top: 15px;
}

.markup-creator-example-drawer {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    max-width: 100%;
    min-height: 70vh;
    background: #f9f9f9;
}

.markup-creator-example-controls {
    display: flex;
    margin-top: 10px;
    text-align: center;
}

.markup-creator-example-controls .btn {
    margin: 0 5px;
}

.markup-creator-result-preview {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #d4edda;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.markup-result-summary h4 {
    margin-bottom: 15px;
    color: #28a745;
}

.markup-result-list {
    margin-bottom: 15px;
}

.markup-result-list li {
    margin-bottom: 5px;
    padding: 5px;
    background: #fff;
    border-radius: 3px;
    border-left: 3px solid #007bff;
}

.markup-result-stats {
    background: #e9ecef;
    padding: 10px;
    border-radius: 4px;
}

.markup-result-stats p {
    margin-bottom: 5px;
}

@media (max-width: 900px) {
    .markup-creator-steps div {
        min-width: 140px;
        flex: 1 1 140px;
        font-size: 0.95em;
        padding: 7px 10px;
    }
}
@media (max-width: 600px) {
    .markup-creator-steps div {
        min-width: 100px;
        flex: stretch;
        font-size: 0.9em;
        padding: 6px 6px;
    }
    .markup-creator-steps {
        gap: 6px;
    }
}

/* Step validation indicators */
.markup-creator-steps div.validated {
    background: linear-gradient(135deg, #1976d2 0%, #28a745 100%);
    color: #fff;
    position: relative;
}

.markup-creator-steps div.validated::after {
    content: "\f00c";
    font-family: "FontAwesome";
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #28a745;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.markup-creator-steps div.validated .step-num {
    background: rgba(255, 255, 255, 0.95);
    color: #1976d2;
    border-color: rgba(255, 255, 255, 0.95);
}

/* Full-size image preview modal */
#markup-task-view-one-image-preview,
.markup-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.markup-image-modal.active {
    opacity: 1;
    visibility: visible;
}

.markup-image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.markup-image-modal-title {
    font-size: 18px;
    font-weight: bold;
}

.markup-image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.markup-image-modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.markup-image-modal-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 6px;
    margin-top: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.markup-image-modal-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.markup-image-modal-details {
    font-size: 14px;
    color: #666;
}

.markup-image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.markup-image-modal-close:hover {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    transform: scale(1.1);
}

.markup-creator-image-container {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.markup-creator-image-container:hover::after {
    content: "\f002";
    font-family: "FontAwesome";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 50%;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    pointer-events: none;
    z-index: 5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Example result preview styles */
.markup-example-result-container {
    display: flex;
    gap: 20px;
    min-height: 400px;
}

.markup-example-result-container > div {
    margin: 0 auto;
    min-width: 0;
    flex-grow: 1;
}

.markup-example-json-section {
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    background: #f9f9f9;
}

.markup-example-json-title {
    background: #337ab7;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
}

.markup-example-json-container {
    max-height: 50em;
    overflow-y: auto;
    padding: 15px;
    background: #2d3748;
    padding: 4px;
    border: 1px solid #4a5568;
}

.markup-example-json-content {
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px;
    margin: 0;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
    word-wrap: break-word;
}

.markup-example-images-section {
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    background: #f9f9f9;
    height: fit-content;
}

.markup-example-images-title {
    background: #5cb85c;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
}

.markup-example-images-stack {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.markup-example-image-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.markup-example-image-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.markup-example-image-label {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    color: #495057;
}

.markup-example-image-preview {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: contain;
    background: #fff;
}

.markup-example-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.markup-example-image-preview:hover {
    transform: scale(1.02);
}

/* Responsive design for two-panel layout */
@media (max-width: 1500px) {
    .markup-example-result-container {
        flex-direction: column;
    }

    .markup-example-json-container {
        max-height: 300px;
    }
}


.markup-example-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    color: #6c757d;
}

.markup-example-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.markup-example-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

/* Tooltip Modal Styles */
.markup-tooltip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.markup-tooltip-modal.active {
    opacity: 1;
    visibility: visible;
}

.markup-tooltip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.markup-tooltip-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    max-height: 80vh;
    width: 90%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.markup-tooltip-modal.active .markup-tooltip-content {
    transform: scale(1);
}

.markup-tooltip-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9ecef;
}

.markup-tooltip-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.markup-tooltip-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding-top: 0;
}

.markup-tooltip-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.markup-tooltip-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.markup-tooltip-section {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.markup-tooltip-section:last-child {
    border-bottom: none;
}

.markup-tooltip-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.markup-tooltip-section h4 i {
    color: #007bff;
    font-size: 18px;
}

.markup-tooltip-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Feedback Section Styles */
.markup-details-feedback-section {
    margin-top: 20px;
    border: 1px solid #e3e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    padding: min(2em, 5%);
}

.markup-details-feedback-section h5 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.markup-feedback-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}

.markup-feedback-label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    min-width: 100px;
}

.markup-rating-stars {
    display: flex;
    gap: 4px;
    margin: 0 10px;
}

.markup-star {
    font-size: 28px;
    color: #e9ecef;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    transform-origin: center;
}

.markup-star:hover {
    color: #ffc107;
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.4));
}

.markup-star.hover {
    color: #ffc107;
    transform: scale(1.1);
    filter: drop-shadow(0 0 4px rgba(255, 193, 7, 0.3));
}

.markup-star.active {
    color: #ff9800;
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.5));
}

.markup-star:active {
    transform: scale(0.95);
}

.markup-rating-text {
    font-size: 15px;
    font-weight: 500;
    color: #6c757d;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 1px solid #e9ecef;
    text-align: center;
    transition: all 0.3s ease;
    display: none;
}

.markup-rating-text:not(:empty) {
    display: block;
    min-width: 140px;
    color: #495057;
}

.markup-feedback-text {
    margin-top: 20px;
}

.markup-feedback-text label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

#markup-feedback-comment {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

#markup-feedback-comment:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#markup-feedback-comment::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.markup-feedback-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.markup-submit-feedback-btn {
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.markup-submit-feedback-btn:hover::before {
    width: 200px;
    height: 200px;
}

.markup-submit-feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.markup-submit-feedback-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.markup-submit-feedback-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.markup-submit-feedback-btn:disabled::before {
    display: none;
}

.markup-feedback-status {
    display: none;
    font-size: 13px;
    font-style: italic;
    padding: 8px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.markup-feedback-status:not(:empty) {
    display: block;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Success state */
.markup-feedback-status[style*="color: #28a745"] {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724 !important;
}

/* Error state */
.markup-feedback-status[style*="color: #dc3545"] {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24 !important;
}

/* Rating animations */
@keyframes starPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.markup-star.active {
    animation: starPulse 0.6s ease-in-out;
}

/* Responsive design for feedback section */
@media (max-width: 768px) {
    .markup-details-feedback-section {
        padding: 20px 16px;
    }

    .markup-feedback-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .markup-rating-stars {
        margin: 0;
        justify-content: center;
        width: 100%;
    }

    .markup-star {
        font-size: 24px;
    }

    .markup-rating-text {
        min-width: auto;
        width: 100%;
        text-align: center;
    }

    .markup-feedback-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .markup-submit-feedback-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .markup-star {
        font-size: 20px;
        gap: 2px;
    }

    .markup-rating-stars {
        gap: 2px;
    }
}

.markup-tooltip-list li {
    padding: 8px 0;
    border-left: 3px solid #e9ecef;
    padding-left: 16px;
    margin-bottom: 8px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.markup-tooltip-list li:hover {
    border-left-color: #007bff;
    background: #f8f9fa;
    margin-left: -8px;
    padding-left: 24px;
    border-radius: 0 6px 6px 0;
}

.markup-tooltip-list li strong {
    color: #495057;
    font-weight: 600;
}

.markup-tooltip-list li:last-child {
    margin-bottom: 0;
}

/* Help Button Styles */
.markup-creator-help-btn {
    border-radius: 50%;
    border: none;
    background: #28a745;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 900;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.markup-creator-help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.6);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.markup-creator-help-btn:active {
    transform: scale(0.95);
}

/* Multi-select result formats styles */
.markup-creator-result-formats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.markup-creator-format-option {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #f8f9fa;
}

.markup-creator-format-option:hover {
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.markup-creator-format-option:has(input:checked) {
    border-color: #28a745;
    background: #f8fff9;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.markup-creator-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
    gap: 12px;
}

.markup-creator-format-checkbox {
    display: none;
}

.markup-creator-format-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
    padding-top: 5px;
}

/* Alert panel styles */
#markup-creator-alert-panel {
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

#markup-creator-alert-panel ul {
    padding-left: 20px;
    line-height: 1.6;
}

#markup-creator-alert-panel li {
    margin-bottom: 5px;
}

/* Custom styles for your alert block */
#markup-creator-top-up-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1em;
}

#markup-creator-top-up-section .alert-action {
    flex: 1;
}

#markup-creator-top-up-section .alert-info {
    flex: 1;
}

/* On medium+ screens, switch to row layout */
@media (min-width: 768px) {
    #markup-creator-top-up-section {
        flex-direction: row;
        align-items: flex-start;
    }
    #markup-creator-top-up-section .alert-action {
        max-width: 50%;
    }
    #markup-creator-top-up-section .alert-info {
        max-width: 50%;
    }
}

/* Prevent body scroll when tooltip is open */
body.markup-tooltip-open {
    overflow: hidden;
}

/* Image retry and info styles */
#markup-creator-images-retry-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border-color: #d35400;
    box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

#markup-creator-images-retry-btn:disabled {
    background: #bdc3c7;
    border-color: #95a5a6;
    color: #7f8c8d;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

#markup-creator-images-info {
    border-left: 4px solid;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    margin: 12px 0;
}

#markup-creator-images-info.alert-success {
    border-left-color: #27ae60;
    color: #1e8449 !important;
}

#markup-creator-images-info.alert-danger {
    border-left-color: #e74c3c;
    color: #b7950b !important;
}

#markup-creator-images-info.alert-warning {
    border-left-color: #f39c12;
    color: #b7950b !important;
}

#markup-creator-images-info.alert-info {
    border-left-color: #3498db;
    background-color: #d6eaf8;
    color: #2471a3 !important;
}


@media (max-width: 600px) {
    .markup-stats-grid {
        flex-direction: column;
        gap: 10px;
    }

    .markup-stats-item {
        min-width: auto;
    }

    .markup-stats-labels-list {
        justify-content: center;
    }
}

/* Mobile layout - hide list panel on narrow screens */
@media (max-width: 768px) {
    .markup-two-panel-layout {
        position: relative;
    }

    .markup-left-panel {
        position: fixed;
        top: 50px;
        left: 0;
        height: calc(100vh - 50px);
        z-index: 1000;
        transform: translateX(-100%);
        width: 90%;
        max-width: 320px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .markup-left-panel.mobile-open {
        transform: translateX(0);
    }

    .markup-right-panel {
        width: 100%;
        margin-left: 0;
        padding: 0;
        height: calc(100vh - 50px);
        margin-top: 70px;
        border-top: 1px solid #e0e0e0;
    }

    .markup-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .markup-mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Remove the old header - we'll use floating button instead */
    .markup-mobile-header {
        display: none;
    }

    /* Floating menu button */
    .markup-mobile-menu-btn {
        position: fixed;
        top: 70px;
        left: 20px;
        background:  #007bff;
        border: none;
        color: white;
        padding: 10px 14px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        z-index: 1002;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .markup-mobile-menu-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
        background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    }

    .markup-mobile-menu-btn:active {
        transform: translateY(-1px) scale(0.98);
    }

    /* Hide floating button when panel is open */
    .markup-mobile-menu-btn.hidden {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.8);
    }

    /* Filter badge on floating button */
    .markup-mobile-menu-btn .markup-filter-counter {
        position: absolute;
        top: -6px;
        right: -6px;
        background: #dc3545;
        color: white;
        font-size: 10px;
        font-weight: 600;
        min-width: 18px;
        height: 18px;
        border-radius: 50%;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        line-height: 1;
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    }

    .markup-mobile-menu-btn .markup-filter-counter.show {
        display: flex;
    }

    .markup-mobile-title {
        display: none;
    }

    /* Close button overlay when list is visible */
    .markup-mobile-close-overlay {
        position: fixed;
        top: 70px;
        right: 20px;
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, rgba(220, 53, 69, 0.9) 0%, rgba(180, 30, 50, 0.9) 100%);
        z-index: 1001;
        display: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(10px);
        border-radius: 50%;
    }

    .markup-mobile-close-overlay.active {
        display: flex;
    }

    .markup-mobile-close-overlay:hover {
        background: linear-gradient(135deg, rgba(220, 53, 69, 1) 0%, rgba(180, 30, 50, 1) 100%);
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    }

    .markup-mobile-close-overlay:active {
        transform: scale(0.95);
    }

    .markup-mobile-close-overlay i {
        color: white;
        font-size: 16px;
        font-weight: bold;
    }

}

@media (max-width: 480px) {
    .markup-left-panel {
        width: 100%;
        max-width: 100%;
    }

    .markup-mobile-menu-btn {
        padding: 8px 10px;
        font-size: 12px;
        top: 65px;
        left: 15px;
    }

    .markup-mobile-close-overlay {
        width: 36px;
        height: 36px;
        top: 65px;
        right: 15px;
    }

    .markup-mobile-close-overlay i {
        font-size: 14px;
    }

    .markup-mobile-menu-btn .markup-filter-counter {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        top: -4px;
        right: -4px;
        padding: 4px;
    }
}

/* Ensure desktop layout works correctly */
@media (min-width: 769px) {
    .markup-mobile-header {
        display: none;
    }

    .markup-mobile-menu-btn {
        display: none;
    }

    .markup-mobile-close-overlay {
        display: none;
    }

    .markup-mobile-overlay {
        display: none;
    }

    .markup-left-panel {
        position: static;
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .markup-creator-actions-block {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #markup-creator-images-retry-btn {
        width: 100%;
        margin-top: 5px;
    }

    #markup-creator-images-info {
        font-size: 13px;
        padding: 10px 12px;
    }

    .markup-tooltip-content {
        width: 95%;
        max-height: 85vh;
        margin: 20px;
    }

    .markup-tooltip-header {
        padding: 16px 20px;
    }

    .markup-tooltip-header h3 {
        font-size: 18px;
    }

    .markup-tooltip-section {
        padding: 20px;
    }

    .markup-tooltip-section h4 {
        font-size: 15px;
    }

    .markup-creator-help-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #markup-creator-images-info {
        font-size: 12px;
        padding: 8px 10px;
    }

    .markup-tooltip-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .markup-tooltip-section {
        padding: 16px;
    }

    .markup-tooltip-list li {
        font-size: 12px;
    }
    .markup-actions-panel {
        justify-content: left;
    }
}


/* Details view layout */

.markup-details-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 24px;
    justify-content: center;
    align-items: stretch;
    padding: 0 24px;
}
.markup-details-tabs div {
    cursor: pointer;
    padding: 16px;
    border-radius: 8px;
    background: #f3f6fa;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    flex: 1 1 6em;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid transparent;
}
.markup-details-tabs div:hover {
    background: #eaf2fa;
    border-color: #c2dcf2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
.markup-details-tabs div.active {
    background: #1976d2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(25, 118, 210, 0.25);
}
.markup-details-tabs div.disabled {
    pointer-events: none;
    opacity: 0.5;
}
.markup-details-tab-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
}
.markup-details-tabs div.active .markup-details-tab-title {
    font-weight: 600;
}


/* Filter Controls Styles */
.markup-filter-toggle-btn {
    font-size: 13px;
    padding: 6px 12px;
    border-color: #007bff;
    color: #007bff;
    background: #fff;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.markup-filter-toggle-btn:hover,
.markup-filter-toggle-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.markup-filter-toggle-btn i {
    margin-right: 6px;
}

.markup-filter-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: 6px;
    padding: 0 4px;
    line-height: 1;
}

.markup-filter-toggle-btn.active .markup-filter-counter {
    background: rgba(255, 255, 255, 0.9);
    color: #007bff;
}

.markup-filters-panel {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
}

.markup-filters-container {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: end;
}

.markup-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.markup-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
    white-space: nowrap;
}

.markup-filter-select,
.markup-filter-date {
    padding: 6px 8px;
    border: 1px solid #d0d7e2;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    color: #495057;
    width: 100%;
    transition: border-color 0.15s ease;
}

.markup-filter-select:focus,
.markup-filter-date:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.markup-filter-select:hover,
.markup-filter-date:hover {
    border-color: #007bff;
}

.markup-filter-reset-btn {
    font-size: 11px;
    padding: 6px 10px;
    border-color: #6c757d;
    color: #6c757d;
    background: #fff;
    transition: all 0.15s ease;
    white-space: nowrap;
    align-self: end;
    width: fit-content;
}

.markup-filter-reset-btn:hover {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.markup-filter-reset-btn:focus {
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.25);
}

.markup-filter-select:disabled,
.markup-filter-date:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.markup-filter-reset-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

.markup-filter-reset-btn:disabled:hover {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}



/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .markup-filters-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    .markup-filter-label {
        font-size: 10px;
    }

    .markup-filter-select,
    .markup-filter-date {
        font-size: 11px;
        padding: 5px 6px;
    }

    .markup-filter-reset-btn {
        font-size: 10px;
        padding: 5px 8px;
    }

    .markup-filter-counter {
        font-size: 9px;
        min-width: 16px;
        height: 16px;
        margin-left: 4px;
    }
}

@media (max-width: 480px) {
    .markup-filters-container {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
    }

    .markup-filter-toggle-btn, .markup-view-create-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* Image Filters Styles */
.markup-image-filters-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.markup-image-filters-manual {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.markup-image-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.markup-image-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
}

.markup-image-filter-select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.markup-image-filter-select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Multiselect Styles */
.markup-multiselect-wrapper {
    position: relative;
    min-width: 200px;
}

.markup-multiselect-display {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.markup-multiselect-display:hover {
    border-color: #007bff;
}

.markup-multiselect-display.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.markup-multiselect-placeholder {
    color: #6c757d;
    font-size: 13px;
}

.markup-multiselect-tag {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.markup-multiselect-tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    opacity: 0.8;
}

.markup-multiselect-tag-remove:hover {
    opacity: 1;
}

.markup-multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    display: none;
    flex-direction: column;
}

.markup-multiselect-dropdown.active {
    display: flex;
}

.markup-multiselect-search {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

.markup-multiselect-search input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.markup-multiselect-search input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.markup-multiselect-options {
    flex: 1;
    overflow-y: auto;
}

.markup-multiselect-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f8f9fa;
}

.markup-multiselect-option:last-child {
    border-bottom: none;
}

.markup-multiselect-option:hover {
    background: #f8f9fa;
}

.markup-multiselect-option.selected {
    background: #e7f3ff;
    color: #0056b3;
}

.markup-multiselect-checkbox {
    width: 14px;
    height: 14px;
    margin: 0;
}

.markup-multiselect-no-results {
    padding: 12px;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
}

/* Toggle Switch Styles */
.markup-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #495057;
  margin-bottom: 0;
}

.markup-toggle-label input[type="checkbox"] {
  display: none;
}

.markup-toggle-switch {
  position: relative;
  width: 44px;
  height: 22px;
  background: #ced4da;
  border-radius: 11px;
  transition: background 0.3s ease;
}

.markup-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.markup-toggle-label input:checked + .markup-toggle-switch {
  background: #007bff;
}

.markup-toggle-label input:checked + .markup-toggle-switch::after {
  transform: translateX(22px);
}

.markup-toggle-text {
  font-weight: 500;
}

/* Manual annotation toggle specific styles */
.markup-toggle-manual-annotation input:checked + .markup-toggle-switch {
  background: #28a745;
}

.markup-toggle-manual-annotation input:checked ~ .markup-toggle-text {
  color: #28a745;
  font-weight: 600;
}

.markup-toggle-manual-annotation {
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  margin: 8px 0;
  transition: all 0.2s ease;
  width: fit-content;
}

.markup-toggle-manual-annotation:has(input:checked) {
  background: #f8fff8;
  border-color: #28a745;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.markup-manual-annotation-notice {
    margin-bottom: 12px;
    padding: 8px 12px;
    font-size: 12px;
    border-left: 3px solid #28a745;
    border-radius: 4px;
    background: #e8f5e8;
    color: #2d5a2d;
}

/* Filter States */
.markup-task-view-image-thumb-wrapper.filtered-hidden {
    display: none;
}

/* Final Step - Start Buttons */
.markup-creator-start-block {
    border: 1px solid #c3e6cb;
    background-color: #f8fdf8;
    border-radius: 12px;
    padding: 24px;
    max-width: 50em;
    margin: 20px auto;
    text-align: center;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
    transition: all 0.3s ease;
}

.markup-creator-start-block:hover {
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.15);
    transform: translateY(-2px);
}

.markup-creator-start-info {
    margin-bottom: 16px;
    font-size: 15px;
    color: #495057;
}

.markup-creator-start-info p {
    margin: 4px 0;
}

.markup-creator-start-btn {
    font-size: 1.5rem;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.markup-creator-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.markup-creator-manual-start-block {
    max-width: 50em;
    margin: 20px auto;
    padding: 16px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.markup-creator-start-manual-btn {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
    font-weight: 500;
}

.markup-creator-start-manual-btn:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #fff;
}

.manual-start-info {
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}


/* Responsive Design for Filters */
@media (max-width: 768px) {
    .markup-image-filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .markup-image-filter-group, .markup-image-filter-group-manual {
        min-width: auto;
        width: 100%;
    }

    .markup-image-filter-group:nth-child(4),
    .markup-image-filter-group:nth-child(5) {
        min-width: auto;
        width: 100%;
    }

    .markup-multiselect-wrapper {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .markup-image-filters-container {
        padding: 12px;
        gap: 8px;
    }

    .markup-image-filter-label {
        font-size: 12px;
    }

    .markup-image-filter-select {
        font-size: 12px;
        padding: 5px 8px;
    }

    .markup-multiselect-display {
        font-size: 12px;
        padding: 5px 8px;
    }

    .markup-toggle-label {
        font-size: 11px;
    }

    .markup-toggle-text {
        font-weight: 400;
    }

    .markup-toggle-switch {
        width: 38px;
        height: 20px;
    }

    .markup-toggle-switch::after {
        width: 16px;
        height: 16px;
    }

    .markup-toggle-label input:checked + .markup-toggle-switch::after {
        transform: translateX(18px);
    }
}

/* Completion Modal Styles */
.markup-completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.markup-completion-modal.active {
    opacity: 1;
}

.markup-completion-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.markup-completion-modal.active .markup-completion-content {
    transform: scale(1);
}

.markup-completion-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 15px;
    animation: icon-pop 0.5s ease-out;
}

@keyframes icon-pop {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

.markup-completion-content h4 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.markup-completion-content p {
    font-size: 15px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.markup-completion-confirm-btn {
    font-size: 16px;
    padding: 10px 30px;
    border-radius: 25px;
}
