.stepper {
      display: flex;
      align-items: center;
      width: 50%;
      margin: 2rem auto 0;
    }

    .step {
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      flex: 1;
    }

    .step-number {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      border: 2px solid #ccc;
      background-color: #fff;
      color: #999;
      position: relative;
      z-index: 1;
    }

    

    .step.active .step-number {
      border-color: #1e90ff;
      color: #1e90ff;
    }

    .step-label {
      margin-top: 8px;
      font-size: 14px;
      color: #999;
    }

    .step.active .step-label {
      color: #1e90ff;
    }

    .step.completed .step-number {
      background: linear-gradient(to right, #3669f2, #0abafd);
      color: white;
      border: none;
    }

    .step:not(:last-child)::after {
      content: '';
      position: absolute;
      top: 18px;
      left: 50%;
      width: 100%;
      height: 2px;
      background: #ccc;
      z-index: 0;
    }

    .step.completed:not(:last-child)::after {
      background: #1e90ff;
    }


        :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --accent-color: #1abc9c;
            --light-color: #ecf0f1;
            --dark-color: #2c3e50;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --error-color: #e74c3c;
            --console-bg: #1e1e1e;
            --console-header: #2d2d30;
            --console-text: #d4d4d4;
        }

        body {
            position: relative;
            background: linear-gradient(to bottom right, #f4f8f7, #dee5e2);
            background-size: cover;
            background-repeat: no-repeat;
            background-attachment: fixed;
            min-height: 100vh;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        body::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0); /* White overlay with 0% opacity */
            z-index: -1; /* Place behind content */
        }

        .main-container {
            margin: 0 auto;
            max-width: 1200px;
            width: 100%;
        }

        .header {
            background: rgba(247, 248, 252, 0.3);
            backdrop-filter: blur(25px);
            color: #2c3e50;
            border-radius: 15px;
            padding: 2rem;
            position: relative;
            margin-bottom: 1.5rem;
            box-shadow: 0 15px 30px rgba(0,0,0,0.15);
            border: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 2;
        }

                .content-block {
            background: rgba(247, 248, 252, 0.3);
            backdrop-filter: blur(25px);
            border-radius: 15px;
            box-shadow: 0 15px 30px rgba(0,0,0,0.15);
            border: 1px solid rgba(255, 255, 255, 0.2);
            overflow: hidden;
        }

        .auth-container {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .header h1 {
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .upload-area {
            border: 3px dashed var(--secondary-color);
            border-radius: 12px;
            padding: 3rem;
            text-align: center;
            background: rgba(52, 152, 219, 0.05);
            transition: all 0.3s ease;
            cursor: pointer;
            margin: 2rem 0;
        }

        .upload-area:hover {
            background: rgba(52, 152, 219, 0.1);
            transform: translateY(-5px);
        }

        .upload-area.dragover {
            background: rgba(26, 188, 156, 0.1);
            border-color: var(--accent-color);
        }

        .file-input {
            display: none;
        }

        .btn-primary {
            background: linear-gradient(to right, #3669f2, #0abafd);
            border: none;
            padding: 12px 30px;
            font-size: 1.1rem;
            font-weight: 600;
            transition: all 0.3s ease;
            border-radius: 8px;
            color: #ffffff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            position: relative;
            z-index: 0;
        }

        .btn-primary:before {
            content: '';
            position: absolute;
            top: -2px; left: -2px;
            width: calc(100% + 4px);
            height: calc(100% + 4px);
            background: linear-gradient(to right, #3669f2, #0abafd);
            border-radius: 10px;
            z-index: -1;
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
        }

        .btn-primary:disabled {
            background: #bdc3c7;
            transform: none;
            box-shadow: none;
        }

        .btn-success, .btn-info, .btn-warning, .btn-secondary {
            border-radius: 8px;
            padding: 10px 20px;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .btn-success:hover, .btn-info:hover, .btn-warning:hover, .btn-secondary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .btn-secondary-custom {
            background-color: rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(25px);
            border: 2px solid #3c5ef1;
            color: #3c5ef1;
            padding: 12px 30px; /* Same as primary */
            font-size: 1.1rem; /* Same as primary */
            font-weight: 600; /* Same as primary */
            transition: all 0.3s ease; /* Same as primary */
            border-radius: 8px; /* Same as primary */
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .btn-secondary-custom:hover {
            background-color: rgba(60, 94, 241, 0.1); /* Light blue background on hover */
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(60, 94, 241, 0.3);
        }

        .progress-container {
            display: none;
            margin: 2rem 0;
        }

        .file-info {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(25px);
            border-radius: 10px;
            padding: 1rem;
            margin: 1rem 0;
            border-left: 4px solid rgba(52, 152, 219, 0.5);
        }

        .results-container {
            display: none;
            margin-top: 0;
            padding: 0 2rem 1rem;
            background: transparent;
            border-radius: 15px;
        }

        #download-buttons-container {
            background: transparent;
            box-shadow: none;
        }

        .result-card {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            transition: transform 0.3s ease;
            border: 1px solid rgba(224, 224, 224, 0.5);
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .result-card p {
            flex-grow: 1;
        }

        .result-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .status-indicator {
            display: inline-block;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .status-pending {
            background-color: #ffc107;
        }

        .status-processing {
            background-color: #17a2b8;
            animation: pulse 1.5s infinite;
        }

        .status-completed {
            background-color: #28a745;
        }

        .status-error {
            background-color: #dc3545;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }

        

        .spinner {
            width: 2rem;
            height: 2rem;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
            display: inline-block;
            vertical-align: middle;
            margin-right: 10px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .feature-icon {
            font-size: 1.875rem;
            color: var(--secondary-color);
            margin-bottom: 0.75rem;
        }

        .feature-card {
            text-align: center;
            padding: 1.5rem 1rem;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            height: 100%;
            transition: all 0.3s ease;
            border: 1px solid rgba(238, 238, 238, 0.5);
        }

        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }

        .footer {
            text-align: center;
            padding: 1.5rem;
            color: #7f8c8d;
            font-size: 0.9rem;
            border-top: 1px solid #eee;
            margin-top: 1rem;
        }

        .footer a {
            color: var(--secondary-color);
            text-decoration: none;
            font-weight: 600;
        }

        .footer a:hover {
            color: var(--accent-color);
            text-decoration: underline;
        }

        .time-info {
            background: #e8f4fc;
            border-radius: 10px;
            padding: 0.5rem;
            margin: 0.5rem auto 1rem;
            width: 45.5%;
            text-align: center;
            font-weight: 600;
            color: var(--secondary-color);
            border: 1px solid #bee0f5;
            font-size: 0.8rem;
        }

        .collapsed .console-content {
            display: none;
        }

        .collapsed {
            height: auto;
        }

        .collapsed .console-container {
            height: auto;
        }

        /* Auth Forms Styles */
        .auth-modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
        }

        .auth-modal-content {
            background-color: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            margin: 5% auto;
            padding: 30px;
            border-radius: 15px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.3);
        }

        .auth-form {
            display: none;
        }

        .auth-form.active {
            display: block;
        }

        .close-auth {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .close-auth:hover {
            color: #000;
        }

        .form-switch {
            text-align: center;
            margin: 20px 0;
        }

        .user-info {
            position: relative;
            display: flex;
            align-items: center;
            color: #2c3e50;
        }

        .user-info span {
            margin-right: 15px;
            font-weight: 500;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-menu {
            position: absolute;
            top: 50px;
            right: 0;
            background-color: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(25px);
            border-radius: 5px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
            display: none;
            z-index: 1001;
            width: 150px;
        }

        .user-menu a {
            color: #333;
            padding: 10px 15px;
            display: block;
            text-decoration: none;
        }

        .user-menu a:hover {
            background-color: #f0f0f0;
        }

        /* Confirmation message */
        .confirmation-message {
            display: none;
            background: #d4edda;
            border: 1px solid #c3e6cb;
            color: #155724;
            padding: 15px;
            border-radius: 5px;
            margin: 20px 0;
            text-align: center;
        }

        /* Admin Console Styles */
        #adminConsoleModal .auth-modal-content {
            max-height: 90vh;
            overflow-y: auto;
            max-width: 95%;
            width: 95%;
        }

        .nav-tabs .nav-link {
            font-weight: 500;
        }

        .nav-tabs .nav-link.active {
            background-color: #0d6efd;
            color: white;
        }

        .card {
            box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
            border: 1px solid rgba(0, 0, 0, 0.125);
        }

        .card-header {
            background-color: rgba(0, 0, 0, 0.03);
            border-bottom: 1px solid rgba(0, 0, 0, 0.125);
        }

        .table th {
            background-color: #f8f9fa;
            font-weight: 600;
        }

        .pagination .page-item.active .page-link {
            background-color: #0d6efd;
            border-color: #0d6efd;
        }

        .user-status-active {
            color: #198754;
            font-weight: bold;
        }

        .user-status-inactive {
            color: #dc3545;
            font-weight: bold;
        }

        .action-buttons .btn {
            padding: 0.25rem 0.5rem;
            font-size: 0.875rem;
        }

        /* Error messages in forms */
        .auth-error {
            display: none;
            margin-top: 10px;
            padding: 10px;
            border-radius: 5px;
        }

        @media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-container {
        margin: 0;
    }
    
    .header {
        padding: 1rem;
    }

    .header > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: center;
    }

    .header .d-flex.align-items-center {
        flex-direction: column;
        text-align: center;
    }

    .header img {
        height: 50px !important;
        margin-right: 0 !important;
        margin-bottom: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header .lead {
        font-size: 0.9rem;
    }

    #login-button, #user-avatar {
        margin-top: 1rem;
    }
    
    .auth-container {
        position: static;
        margin: 15px 0;
        justify-content: center;
        padding-right: 0;
    }
    
    .header h1, .header .lead {
        padding-right: 0;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .console-container {
        height: 200px;
    }

    .console-content {
        height: calc(200px - 40px);
    }
    
    #adminConsoleModal .auth-modal-content {
        max-width: 98%;
        width: 98%;
        margin: 2% auto;
    }

    .stepper {
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .step-label {
        font-size: 11px;
        white-space: nowrap;
    }

    .time-info {
        width: 90%;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}
        #anonymizedTextView strong:hover {
            background-color: #FFEF73; /* Or any other "illumination" effect */
            cursor: pointer;
        }

        .popup-tooltip {
            position: absolute;
            background-color: #333;
            color: #fff;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.8em;
            white-space: nowrap;
            z-index: 100;
            display: none; /* Hidden by default */
            pointer-events: auto; /* Allow clicks on the popup and its children */
            transform: translateX(-50%);
        }

        .popup-tooltip-aligned {
            position: absolute;
            background-color: #333;
            color: #fff;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.8em;
            white-space: nowrap;
            z-index: 100;
            display: none; /* Hidden by default */
            pointer-events: auto; /* Allow clicks on the popup and its children */
        }

        .view-btn {
            color: #333;
            text-decoration: none;
        }
        .view-btn.active {
            color: var(--primary-color);
        }
    .add-tag-popup {
            position: absolute;
            background-color: #FFEF73;
            padding: 8px 12px;
            border-radius: 5px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            z-index: 1000;
            display: none; /* Hidden by default */
            font-size: 0.9rem;
            font-weight: 500;
            color: #333;
        }

.toast-notification {
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: rgba(228, 251, 240, 0.5);
    backdrop-filter: blur(25px);
    border: 1px solid #01e17b;
    border-radius: 8px;
    padding: 16px 24px;
    box-shadow: 0 16px 20px -8px rgba(3, 5, 18, 0.1);
    z-index: 1050;
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.toast-notification.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #01e17b;
    color: white;
    margin-right: 15px;
}

.toast-message {
    color: #28292a;
    flex-grow: 1;
}

.toast-close {
    color: #01e17b;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 15px;
}

#originalTextView,
#anonymizedTextView {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Confirmation Modal Styles */
.confirmation-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1060; /* Higher than Bootstrap modals (1055) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.confirmation-modal-content {
    position: relative; /* Needed for the pseudo-element border */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px); /* For Safari */
    padding: 30px;
    border-radius: 17px; /* A bit larger to contain the border */
    width: 90%;
    max-width: 450px;
    box-shadow: none;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
    z-index: 1; /* Needed to contain the pseudo-element */
    border: none;
}


@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.confirmation-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 1.1rem; /* Smaller font size for h2 */
}

.confirmation-modal-content p {
    margin-bottom: 25px;
    color: #333;
    font-weight: normal;
    font-size: 0.9rem; /* Smaller font size for p */
}

.confirmation-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}



.user-credits {
    margin-right: 15px;
    font-size: 0.9rem;
    color: #1e90ff;
    background-color: #e8f4fc;
    padding: 0 15px;
    border-radius: 8px;
    height: 48px;
    border: 1px solid #bee0f5;
}

#substitutionModal .modal-dialog {
    width: auto; /* Allow width to adjust to content */
    max-width: 60vw; /* Max width 60% of viewport width */
    margin: auto; /* Center horizontally */
}

#substitutionModal .modal-content {
    /* height: 100%; */
}

#substitutionModal .modal-body {
    overflow-y: auto;
    max-height: 60vh;
}

.view-btn-container {
    position: relative;
    display: inline-block;
}

.active-indicator {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: none; /* Hidden by default */
}

.view-btn.active .active-indicator {
    display: block; /* Show for active view */
}
/* New Icon Styles */
.custom-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em; /* Match fa-lg size */
    height: 1em;
    vertical-align: -0.125em; /* Align like Font Awesome icons */
    color: #333;
}

.view-btn.active .custom-icon {
    color: var(--primary-color);
}

/* Single View - One Square */
.custom-icon-single-view .square {
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
}

/* Double View - Two Rectangles */
.custom-icon-double-view {
    flex-direction: row;
}

.custom-icon-double-view .rectangle {
    width: 6px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
}

.custom-icon-double-view .rectangle:first-child {
    margin-right: 2px;
}

.btn-magic {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(25px);
    border: 2px solid #8e44ad;
    color: #8e44ad;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 258px;
}

#finish-review-btn-top {
    width: 258px;
}

.btn-magic:hover {
    background-color: rgba(142, 68, 173, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(142, 68, 173, 0.3);
}

.btn-magic i {
    margin-right: 8px;
    color: #8e44ad;
}

.search-highlight {
    background-color: yellow;
    border-radius: 3px;
}

#search-count {
    min-width: 50px;
    text-align: center;
}

.current-match {
    background-color: #ff9632;
    border: 1px solid #b35c00;
}
.info-icon {
  color: #0d6efd; /* A common bootstrap blue */
}

.tooltip-inner {
  background-color: #fff !important;
  color: #343a40 !important; /* A dark gray */
  border: 1px solid #ccc !important;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #fff !important;
}

#automaticReviewModal .modal-body {
    overflow-y: auto;
    max-height: 70vh; /* Adjust as needed */
}

/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 37, 41, 0.9);
    color: white;
    padding: 10px 15px;
    z-index: 1050;
    display: none; /* Oculto por defecto */
    backdrop-filter: blur(5px);
}
.cookie-consent-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.cookie-consent-content p { margin: 0; }
.cookie-consent-content a {
    color: var(--secondary-color);
    text-decoration: underline;
}
}
