/* =============================================
   DOCS EDUCATIVOS - Estilos Globales
   ============================================= */

:root {
    --primary: #6C63FF;
    --secondary: #FF6584;
    --accent: #00D2FF;
    --warning: #FFC107;
    --success: #28a745;
    --danger: #dc3545;
    --dark: #2d3436;
    --gray: #636e72;
    --light-gray: #dfe6e9;
    --bg: #f0f2f5;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
}

/* =============================================
   HEADER (Editor)
   ============================================= */
.editor-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 15px rgba(108, 99, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header {
    background: linear-gradient(135deg, var(--secondary), var(--warning));
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 15px rgba(255, 101, 132, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    font-size: 28px;
}

.header-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.header-center {
    flex: 1;
    text-align: center;
}

.student-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-save {
    background: white;
    color: var(--primary);
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-ia {
    background: linear-gradient(135deg, var(--secondary), #e84393);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ia:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 101, 132, 0.4);
}

.btn-logout {
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* =============================================
   PROGRESS BAR
   ============================================= */
.progress-bar-container {
    background: white;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.progress-info {
    font-size: 13px;
    color: var(--gray);
    white-space: nowrap;
    font-weight: 600;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--danger);
}

.progress-fill.complete {
    background: var(--success);
}

/* =============================================
   TOOLBAR
   ============================================= */
.toolbar {
    background: white;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--light-gray);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 56px;
    z-index: 99;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: var(--light-gray);
    margin: 0 5px;
}

.toolbar-spacer {
    flex: 1;
}

.tool-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    color: #555;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #f0f0ff;
    border-color: var(--primary);
    color: var(--primary);
}

.tool-btn:active {
    background: var(--primary);
    color: white;
}

.tool-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    color: #555;
}

.tool-label:hover {
    background: #f0f0ff;
    color: var(--primary);
}

.color-picker {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.tool-select {
    padding: 5px 8px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background: white;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    outline: none;
}

.tool-select:focus {
    border-color: var(--primary);
}

/* =============================================
   TABS
   ============================================= */
.tabs-container {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid var(--primary);
    overflow-x: auto;
    padding: 0 10px;
}

.tab {
    padding: 10px 18px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-right: 3px;
    transition: all 0.2s;
    min-width: 120px;
    text-align: center;
    background: transparent;
    position: relative;
    top: 2px;
}

.tab:hover {
    background: rgba(108, 99, 255, 0.08);
}

.tab.active {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 -2px 10px rgba(108, 99, 255, 0.1);
}

.tab-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.tab-tipo {
    display: block;
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

.tab.active .tab-tipo {
    color: var(--primary);
}

/* =============================================
   EDITOR
   ============================================= */
.editor-wrapper {
    flex: 1;
    padding: 20px;
    background: #e8e8e8;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    min-height: calc(100vh - 220px);
}

.editor-page {
    background: white;
    width: 100%;
    max-width: 900px;
    min-height: 1100px;
    box-shadow: 0 3px 20px rgba(0,0,0,0.12);
    padding: 60px 70px;
    border-radius: 3px;
    position: relative;
}

.editor-content {
    min-height: 900px;
    outline: none;
    font-size: 16px;
    line-height: 1.8;
    font-family: Arial, sans-serif;
}

.editor-content:empty:before {
    content: 'Comienza a escribir aquí...';
    color: #ccc;
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

.modal-content.small-modal {
    max-width: 400px;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* IA Modal Results */
.ia-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

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

.ia-result {
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #f8f9fa;
}

.ia-result .label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.ia-result .value {
    font-size: 18px;
    font-weight: 700;
}

.badge-si { color: var(--success); }
.badge-no { color: var(--danger); }
.badge-original { color: var(--success); }
.badge-ia { color: var(--danger); }
.badge-Superior { color: var(--success); background: #d4edda; display: inline-block; padding: 2px 12px; border-radius: 20px; }
.badge-Alto { color: #004085; background: #cce5ff; display: inline-block; padding: 2px 12px; border-radius: 20px; }
.badge-Basico { color: #856404; background: #fff3cd; display: inline-block; padding: 2px 12px; border-radius: 20px; }
.badge-Bajo { color: #721c24; background: #f8d7da; display: inline-block; padding: 2px 12px; border-radius: 20px; }

/* Config Modal */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.config-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.config-group input,
.config-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.config-group input:focus,
.config-group select:focus {
    border-color: var(--primary);
}

.config-group input[type="color"] {
    height: 45px;
    padding: 3px;
}

.margins-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.3);
}

.btn-secondary {
    background: var(--light-gray);
    color: #555;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #ccc;
}

.btn-large {
    padding: 15px 40px;
    font-size: 17px;
    margin-top: 15px;
}

.btn-small {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ia-small {
    background: linear-gradient(135deg, var(--secondary), #e84393);
    color: white;
}

.btn-ia-small:hover {
    opacity: 0.9;
}

/* =============================================
   ADMIN PANEL
   ============================================= */
.admin-tabs {
    display: flex;
    background: white;
    border-bottom: 2px solid var(--light-gray);
    padding: 0;
    margin: 0;
}

.admin-tab {
    padding: 15px 25px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tab:hover {
    color: var(--dark);
    background: #f8f9fa;
}

.admin-tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.admin-section {
    display: none;
    padding: 25px;
}

.admin-section.active {
    display: block;
}

.section-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.section-card h2 {
    margin: 0 0 5px;
    font-size: 22px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-desc {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 14px;
}

/* Trabajos Grid */
.trabajos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.trabajo-card {
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    padding: 15px;
    transition: border-color 0.2s;
}

.trabajo-card:hover {
    border-color: var(--primary);
}

.trabajo-codigo {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(108, 99, 255, 0.1);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.trabajo-campos label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-top: 8px;
    margin-bottom: 3px;
}

.trabajo-campos input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.trabajo-campos input:focus {
    border-color: var(--primary);
}

/* Forms */
.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray);
    border-bottom: 2px solid var(--light-gray);
}

.table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--light-gray);
    font-size: 14px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8f9ff;
}

.table code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary);
}

.actions-cell {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Alerts */
.alert {
    padding: 15px 25px;
    margin: 15px 25px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
}

.empty-state p {
    margin-top: 15px;
    font-size: 16px;
}

/* Filtros */
.filtros {
    margin-bottom: 20px;
}

.filtros .form-inline {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--radius-sm);
}

/* Eval Actions */
.eval-actions {
    text-align: center;
    padding: 30px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .editor-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
    }

    .header-center {
        order: 3;
        flex-basis: 100%;
    }

    .header-right {
        gap: 6px;
    }

    .btn-save, .btn-ia {
        padding: 6px 12px;
        font-size: 12px;
    }

    .toolbar {
        padding: 5px 8px;
        gap: 3px;
    }

    .tool-btn {
        padding: 4px 7px;
        font-size: 13px;
    }

    .editor-page {
        padding: 25px 20px;
    }

    .tabs-container {
        padding: 0 5px;
    }

    .tab {
        padding: 8px 12px;
        min-width: 90px;
    }

    .tab-label {
        font-size: 11px;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .margins-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-tab {
        padding: 12px 15px;
        font-size: 13px;
    }

    .admin-section {
        padding: 15px;
    }

    .trabajos-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .table thead th,
    .table tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* =============================================
   COLOR PICKER MODAL
   ============================================= */
.color-palette {
    margin-bottom: 15px;
}

.color-row {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    flex-shrink: 0;
}

.color-swatch:hover {
    transform: scale(1.15);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.color-swatch.selected {
    border-color: var(--dark);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary);
}

.color-custom-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
}

.color-custom-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.color-custom-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-custom-input-group input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
}

.color-custom-input-group input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    outline: none;
    text-transform: uppercase;
}

.color-custom-input-group input[type="text"]:focus {
    border-color: var(--primary);
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
}

.color-preview-box {
    width: 40px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.color-preview-hex {
    font-family: monospace;
    font-weight: 700;
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--dark);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

/* =============================================
   ANTI-COPY COMPLETO - Todas las Plataformas (v10)
   Windows, macOS, Linux, Android, iOS
   ============================================= */

/* Base: prevenir callout y highlight en todas las plataformas */
.editor-content {
    -webkit-touch-callout: none !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-text-size-adjust: none !important;
    touch-action: manipulation !important;
    -webkit-font-smoothing: antialiased;
}

/* Prevenir selección visual que facilite copia */
.editor-content ::selection {
    background: rgba(108,99,255,0.15);
}

.editor-content ::-moz-selection {
    background: rgba(108,99,255,0.15);
}

/* Ocultar scrollbar en WebKit (Android/Safari) */
.editor-content::-webkit-scrollbar {
    display: none;
}

/* Dispositivos táctiles (Android/iOS) - más agresivo */
@media (hover: none) and (pointer: coarse) {
    .editor-content {
        -webkit-touch-callout: none !important;
        -webkit-user-select: text !important;
        -moz-user-select: text !important;
        -ms-user-select: text !important;
        user-select: text !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-text-size-adjust: none !important;
        touch-action: manipulation !important;
    }

    .editor-content:focus {
        outline: none !important;
        -webkit-focus-ring-color: transparent !important;
    }
}

/* Android específico */
@supports (-webkit-touch-callout: none) {
    .editor-content {
        -webkit-touch-callout: none !important;
        -webkit-user-select: text !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-appearance: none !important;
    }
}

/* iOS Safari específico */
@supports (-webkit-overflow-scrolling: touch) {
    .editor-content {
        -webkit-touch-callout: none !important;
        -webkit-user-select: text !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-text-size-adjust: none !important;
    }
}

/* Firefox Android */
@-moz-document url-prefix() {
    .editor-content {
        -moz-user-select: text !important;
        -webkit-touch-callout: none !important;
    }
}

/* Bloquear selección en elementos interactivos del editor */
.editor-content img,
.editor-content table {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    pointer-events: none !important;
}

/* Prevenir arrastre de imágenes y tablas dentro del editor */
.editor-content img {
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
}

/* Toast de advertencia anti-copy - estilo específico */
.toast.anti-copy-toast {
    background: #dc3545;
    color: white;
    border-left: 4px solid #a71d2a;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =============================================
   OVERLAY ANTI-PEGADO ANDROID (v11)
   Div transparente que bloquea long-press nativo
   ============================================= */
#antiPasteOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 10;
    display: none;
    pointer-events: none;
}

#antiPasteOverlay.active {
    display: block;
}
