@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #070a13;
    --bg-card: rgba(20, 28, 47, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 210, 255, 0.3);

    --text-primary: #f3f5f9;
    --text-secondary: #9aa5b8;
    --text-muted: #5e6b82;

    --accent-cyan: #00d2ff;
    --accent-cyan-glow: rgba(0, 210, 255, 0.4);
    --accent-green: #00f5a0;
    --accent-green-glow: rgba(0, 245, 160, 0.3);
    --accent-orange: #ff9f1c;
    --accent-orange-glow: rgba(255, 159, 28, 0.3);
    --accent-red: #ff3860;
    --accent-red-glow: rgba(255, 56, 96, 0.3);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --glass-blur: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Background Gradients */
.bg-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.bg-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(0, 245, 160, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* App Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

#logo-portal-link {
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

#logo-portal-link:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.logo-section h1 {
      font-size: 1.8rem;
      background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: flex;
}
.logo-section h1 span {
      font-weight: 300;
      color: var(--text-secondary);
}







.logo-section p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Portada de Presentación Forense Premium */
.forensics-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.2rem 2rem 1.8rem 2rem;
    margin: 0.5rem auto 1.5rem auto;
    max-width: 100%;
    min-height: 280px;
    background: radial-gradient(circle at 15% 25%, rgba(0, 210, 255, 0.12) 0%, transparent 45%),
                radial-gradient(circle at 85% 75%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.03) 0%, transparent 60%),
                rgba(20, 28, 47, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5),
                inset 0 0 45px rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
    animation: coverPulse 8s ease-in-out infinite alternate;
}

@keyframes coverPulse {
    0% {
        border-color: rgba(255, 255, 255, 0.04);
        box-shadow: 0 35px 80px rgba(0, 0, 0, 0.6);
    }
    100% {
        border-color: rgba(0, 210, 255, 0.15);
        box-shadow: 0 35px 90px rgba(0, 210, 255, 0.05);
    }
}

.forensics-cover-icon-wrapper {
    margin-bottom: 0.8rem;
    position: relative;
    filter: drop-shadow(0 8px 16px rgba(0, 210, 255, 0.15));
    animation: floatIcon 6s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1.2deg);
    }
}

.forensics-cover-svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.cover-title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cover-title span.eas {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
    text-transform: none;
}

.cover-title span.pdf {
    color: var(--accent-cyan);
    text-shadow: 0 0 25px rgba(0, 210, 255, 0.7), 0 0 50px rgba(0, 210, 255, 0.3);
}

.cover-title span.forensics {
    color: #f3f5f9;
    font-weight: 300;
    letter-spacing: 5px;
    margin-left: 0.3rem;
}

.cover-slogan {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 300;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.cover-swoosh-container {
    width: 100%;
    max-width: 550px;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.cover-swoosh-svg {
    width: 100%;
    height: auto;
}

/* Títulos del Grid del Portal */
.modules-grid-title-container {
    text-align: center;
    margin: 1.8rem auto 1.2rem auto;
    max-width: 800px;
}

.portal-grid-header {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.portal-grid-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Grid de Módulos */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-bottom: 5rem;
    padding: 0 0.5rem;
}

/* Tarjeta del Módulo */
.module-card {
    background: rgba(20, 28, 47, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: all 0.35s ease;
}

/* Variaciones de Color de Bordes de Neón para Hover */
.module-card.card-cyan:hover {
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 210, 255, 0.12);
    transform: translateY(-5px);
}
.module-card.card-amber:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 15px 35px rgba(251, 191, 36, 0.12);
    transform: translateY(-5px);
}
.module-card.card-emerald:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.12);
    transform: translateY(-5px);
}
.module-card.card-green:hover {
    border-color: rgba(52, 211, 153, 0.4);
    box-shadow: 0 15px 35px rgba(52, 211, 153, 0.12);
    transform: translateY(-5px);
}
.module-card.card-sky:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.12);
    transform: translateY(-5px);
}
.module-card.card-purple:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.12);
    transform: translateY(-5px);
}
.module-card.card-yellow:hover {
    border-color: rgba(234, 179, 8, 0.4);
    box-shadow: 0 15px 35px rgba(234, 179, 8, 0.12);
    transform: translateY(-5px);
}
.module-card.card-rose:hover {
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 15px 35px rgba(244, 63, 94, 0.12);
    transform: translateY(-5px);
}

.module-card:hover::before {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
}

.card-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.35s ease;
}

/* Colores de Icono por Módulo */
.card-cyan .card-icon-container { color: #00d2ff; background: rgba(0, 210, 255, 0.06); border-color: rgba(0, 210, 255, 0.15); }
.card-amber .card-icon-container { color: #fbbf24; background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.15); }
.card-emerald .card-icon-container { color: #10b981; background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.15); }
.card-green .card-icon-container { color: #34d399; background: rgba(52, 211, 153, 0.06); border-color: rgba(52, 211, 153, 0.15); }
.card-sky .card-icon-container { color: #38bdf8; background: rgba(56, 189, 248, 0.06); border-color: rgba(56, 189, 248, 0.15); }
.card-purple .card-icon-container { color: #c084fc; background: rgba(192, 132, 252, 0.06); border-color: rgba(192, 132, 252, 0.15); }
.card-yellow .card-icon-container { color: #fbbf24; background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.15); }
.card-rose .card-icon-container { color: #f43f5e; background: rgba(244, 63, 94, 0.06); border-color: rgba(244, 63, 94, 0.15); }

.module-card:hover .card-icon-container {
    transform: scale(1.1);
    box-shadow: 0 0 15px currentColor;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.card-cyan .card-tag { color: rgba(0, 210, 255, 0.7); }
.card-amber .card-tag { color: rgba(251, 191, 36, 0.7); }
.card-emerald .card-tag { color: rgba(16, 185, 129, 0.7); }
.card-green .card-tag { color: rgba(52, 211, 153, 0.7); }
.card-sky .card-tag { color: rgba(56, 189, 248, 0.7); }
.card-purple .card-tag { color: rgba(192, 132, 252, 0.7); }
.card-yellow .card-tag { color: rgba(251, 191, 36, 0.7); }
.card-rose .card-tag { color: rgba(244, 63, 94, 0.7); }

.card-content h4 {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 700;
    margin: 0.2rem 0;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
    min-height: 58px;
}

.btn-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0.5rem;
    text-align: center;
    width: fit-content;
}

.module-card:hover .btn-card {
    background: var(--text-primary);
    color: #070a13;
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

/* Modificar estilos del drop-zone original para que luzca en el workspace */
.upload-wrapper {
    margin-bottom: 2rem;
    width: 100%;
}

.drop-zone {
    border: 2px dashed rgba(0, 210, 255, 0.25);
    border-radius: 20px;
    background: rgba(20, 28, 47, 0.45);
    backdrop-filter: blur(12px);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 40px rgba(0, 210, 255, 0.12);
    background: rgba(20, 28, 47, 0.7);
}

.drop-zone:hover::before,
.drop-zone.dragover::before {
    opacity: 1;
}

.drop-zone-icon {
    font-size: 3rem;
    color: var(--accent-cyan);
    margin-bottom: 1.2rem;
    display: inline-flex;
    justify-content: center;
    animation: floatIcon 4s ease-in-out infinite;
}

.drop-zone h3 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.drop-zone p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 500px;
    margin: 0 auto;
}

.file-input {
    display: none;
}

/* Dashboard Grid (Hidden until file loaded) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-grid.active {
    opacity: 1;
    transform: translateY(0);
}

/* Left Sidebar - Score & Stats */
.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(var(--glass-blur));
    padding: 1.5rem;
}

/* Gauge Chart / Score */
.score-section {
    text-align: center;
    position: relative;
}

.score-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.score-circle {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
}

.score-svg {
    transform: rotate(-90deg);
}

.score-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 12;
}

.score-fill {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out, stroke 1s ease-out;
}

.score-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-lbl {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.score-verdict {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.score-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* File Basic Info */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    font-weight: 500;
    color: var(--text-primary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Main Dashboard Panel */
.main-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(var(--glass-blur));
    display: flex;
    flex-direction: column;
    min-height: 600px;
    overflow: hidden;
}

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 1.2rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.03);
}

/* Pestaña Desagrupar Capas en Rojo */
.tab-btn[data-tab="panel-desagrupar"] {
    color: #ff4d6d;
    background: rgba(255, 56, 96, 0.08);
    font-weight: 600;
}

.tab-btn[data-tab="panel-desagrupar"] svg {
    color: #ff4d6d;
    stroke: #ff4d6d;
}

.tab-btn[data-tab="panel-desagrupar"]:hover {
    color: #ff6b8b;
    background: rgba(255, 56, 96, 0.16);
}

.tab-btn[data-tab="panel-desagrupar"].active {
    color: #ffffff !important;
    background: linear-gradient(180deg, rgba(255, 56, 96, 0.3), rgba(255, 56, 96, 0.12)) !important;
    border-bottom-color: #ff3860 !important;
    box-shadow: inset 0 -2px 0 #ff3860, 0 0 16px rgba(255, 56, 96, 0.35);
}

.tab-btn[data-tab="panel-desagrupar"].active svg {
    color: #ffffff;
    stroke: #ffffff;
}

/* Tab Content */
.tabs-content {
    padding: 2rem;
    flex: 1;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards Grid inside panels */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.data-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    transition: border var(--transition-fast);
}

.data-card:hover {
    border-color: var(--border-hover);
}

.data-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.data-card-value {
    font-size: 1.2rem;
    font-weight: 600;
    word-break: break-all;
}

.data-card-value.warning {
    color: var(--accent-orange);
}

.data-card-value.danger {
    color: var(--accent-red);
}

.data-card-value.success {
    color: var(--accent-green);
}

/* Timeline & Comparisons */
.timeline-comparison {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.timeline-node {
    flex: 1;
}

.timeline-node .node-date {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.timeline-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
}

.timeline-arrow-line {
    width: 60px;
    height: 2px;
    background: var(--text-muted);
    position: relative;
}

.timeline-arrow-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--text-muted);
    border-right: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

.timeline-days {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.timeline-days.flagged {
    color: var(--accent-red);
    font-weight: 600;
}

/* Raw XMP XML Container */
.xml-container {
    background: #04060a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem;
    max-height: 250px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    color: #a8ffb2;
    white-space: pre-wrap;
}

/* Page Analysis list */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.page-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.page-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.page-title {
    font-weight: 600;
    font-size: 1rem;
}

.page-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-scanned {
    background: rgba(255, 159, 28, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 159, 28, 0.3);
}

.badge-digital {
    background: rgba(0, 245, 160, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(0, 245, 160, 0.3);
}

.badge-hybrid {
    background: rgba(0, 210, 255, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.stat-item {
    margin-bottom: 0.8rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.stat-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    width: 0;
    transition: width 1s ease-out;
}

.fill-text {
    background: var(--accent-green);
}

.fill-vectors {
    background: var(--accent-cyan);
}

.fill-images {
    background: var(--accent-orange);
}

.page-fonts-list {
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    padding-top: 0.5rem;
    margin-top: auto;
}

.page-fonts-list span {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Embedded Objects gallery */
.objects-summary {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.objects-summary-item {
    text-align: center;
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.objects-summary-item:last-child {
    border-right: none;
}

.objects-summary-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.objects-summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.objects-table-wrapper {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.objects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.objects-table th {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.objects-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.objects-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.btn-action {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--accent-cyan);
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-action:hover {
    background: var(--accent-cyan);
    color: var(--bg-main);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.badge-orphan {
    background: rgba(255, 56, 96, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 56, 96, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Modal for Image inspection */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 12, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--transition-normal) ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #0f1524;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close-modal:hover {
    color: var(--accent-red);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.modal-image-preview-container {
    background: #07090f;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    min-height: 280px;
    max-height: 400px;
}

.modal-image-preview {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-info-panel {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.exif-details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
}

.exif-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.2rem;
}

/* Indicators and flags list */
.findings-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.finding-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--text-muted);
    border-radius: 0 8px 8px 0;
    padding: 1rem;
    transition: background var(--transition-fast);
}

.finding-card:hover {
    background: rgba(255, 255, 255, 0.03);
}

.finding-card.danger {
    border-left-color: var(--accent-red);
    background: rgba(255, 56, 96, 0.03);
}

.finding-card.warning {
    border-left-color: var(--accent-orange);
    background: rgba(255, 159, 28, 0.03);
}

.finding-card.info {
    border-left-color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.03);
}

.finding-card.success {
    border-left-color: var(--accent-green);
    background: rgba(0, 245, 160, 0.03);
}

.finding-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.finding-card.danger .finding-icon {
    color: var(--accent-red);
}

.finding-card.warning .finding-icon {
    color: var(--accent-orange);
}

.finding-card.info .finding-icon {
    color: var(--accent-cyan);
}

.finding-card.success .finding-icon {
    color: var(--accent-green);
}

.finding-content {
    flex: 1;
}

.finding-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.finding-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Report Action bar */
.report-action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0099ff 100%);
    border: none;
    color: #04060c;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

/* Print Styling for Report */
.report-paper {
    background: white;
    color: #111827;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    position: relative;
    border-top: 10px solid #002244;
}

.report-header-print {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.report-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #002244;
}

.report-logo-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4b5563;
}

.report-meta-box {
    text-align: right;
    font-size: 0.8rem;
    color: #4b5563;
}

.report-title-print {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.report-section-print {
    margin-bottom: 2rem;
}

.report-section-print h3 {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
    color: #002244;
    text-transform: uppercase;
}

.report-table-print {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.report-table-print th {
    background: #f3f4f6;
    padding: 0.6rem;
    border: 1px solid #e5e7eb;
    font-weight: 600;
    color: #111827;
}

.report-table-print td {
    padding: 0.6rem;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.verdict-box-print {
    border: 2px solid #111827;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2.5rem;
    background: #f9fafb;
}

.verdict-header-print {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.verdict-score-print {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.report-signature-block {
    margin-top: 4rem;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.signature-line {
    width: 200px;
    border-top: 1px solid #4b5563;
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #4b5563;
}

/* Print Media Queries */
@media print {
    body {
        background: white !important;
        color: black !important;
        display: block !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    header,
    .upload-wrapper,
    .dashboard-grid>.sidebar-panel,
    .tabs-nav,
    .report-action-bar,
    .bg-glow-1,
    .bg-glow-2 {
        display: none !important;
    }

    .dashboard-grid {
        display: block !important;
        grid-template-columns: 1fr !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-panel {
        display: block !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .tabs-content {
        padding: 0 !important;
        overflow: visible !important;
        display: block !important;
    }

    .tab-panel {
        display: none !important;
    }

    .tab-panel#panel-report {
        display: block !important;
        opacity: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .report-paper {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
}

/* Estilos del Localizador Visual */
.image-highlight-overlay {
    fill: rgba(255, 56, 96, 0.22);
    stroke: var(--accent-red);
    stroke-width: 2px;
    cursor: pointer;
    transition: fill 0.2s, stroke-width 0.2s, stroke 0.2s;
}

.image-highlight-overlay:hover {
    fill: rgba(255, 56, 96, 0.45);
    stroke: #ff5c7d;
    stroke-width: 3.5px;
}

/* Soporte para overlay en HTML (div) */
div.image-highlight-overlay {
    background-color: rgba(255, 56, 96, 0.22);
    border: 2px solid var(--accent-red);
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s, border-width 0.2s, box-shadow 0.2s;
}

div.image-highlight-overlay:hover {
    background-color: rgba(255, 56, 96, 0.45);
    border-width: 3.5px;
    box-shadow: 0 0 12px var(--accent-red-glow);
}

div.native-text-overlay {
    background-color: rgba(239, 68, 68, 0.15); /* bg-red-500 with opacity */
    border: 2px dashed #ef4444;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s, border-width 0.2s, box-shadow 0.2s;
    border-radius: 2px;
}

div.native-text-overlay:hover {
    background-color: rgba(239, 68, 68, 0.4);
    border-width: 3px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.vector-highlight-overlay {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 1.5px;
    stroke-dasharray: 4, 3;
    opacity: 0.65;
    pointer-events: none;
}

div.vector-layer-overlay {
    border-color: #10b981 !important; /* Emerald green */
    border-style: dashed !important;
}

div.vector-layer-overlay:hover, div.vector-layer-overlay.selected-focus {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6) !important;
    background-color: rgba(16, 185, 129, 0.2) !important;
}

/* Animación de Pulso para Carga */
@keyframes pulse {

    0%,
    100% {
        opacity: 0.65;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Estilos de la Pantalla de Login */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    background: var(--bg-main);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    backdrop-filter: blur(var(--glass-blur));
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    opacity: 1; /* Forzar visibilidad por defecto ante bloqueos de animación */
    animation: cardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.4rem;
}

.login-header h2 span {
    color: var(--accent-cyan);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.input-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.input-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
    background: rgba(0, 0, 0, 0.5);
}

.login-error-msg {
    color: var(--accent-red);
    background: rgba(255, 56, 96, 0.1);
    border: 1px solid rgba(255, 56, 96, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1.2rem;
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

/* ==========================================================================
   MÓDULO DE COMPARACIÓN DE FIRMAS (SIGNATURE OVERLAY)
   ========================================================================== */

.comparator-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .comparator-layout {
        grid-template-columns: 1fr;
    }
}

.comparator-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar personalizado para la barra lateral */
.comparator-sidebar::-webkit-scrollbar {
    width: 6px;
}

.comparator-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 3px;
}

.comparator-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.comparator-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

.comparator-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    backdrop-filter: blur(var(--glass-blur));
}

.card-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.6rem;
    margin-bottom: 0.8rem;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}

.signature-a-dot {
    background-color: var(--accent-red);
    color: var(--accent-red-glow);
}

.signature-b-dot {
    background-color: var(--accent-cyan);
    color: var(--accent-cyan-glow);
}

/* Drop area para archivos */
.file-drop-area {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.04);
    box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.1);
}

.file-drop-area p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.file-drop-area.has-file {
    border-color: var(--accent-green);
    background: rgba(0, 245, 160, 0.03);
}

.file-drop-area.has-file p {
    color: var(--accent-green);
    font-weight: 500;
}

/* Dropdowns y entradas */
.comparator-select {
    width: 100%;
    background: #090e1a;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.comparator-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.comparator-num-input {
    width: 100%;
    background: #090e1a;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    outline: none;
}

.comparator-num-input:focus {
    border-color: var(--accent-cyan);
}

.comparator-checkbox {
    accent-color: var(--accent-cyan);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Picker de colores */
.color-picker-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.color-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease, border-color var(--transition-fast);
    position: relative;
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.active {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Deslizadores de rango (Slider) */
.control-group {
    margin-bottom: 1rem;
}

.control-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.comparator-range {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    outline: none;
    accent-color: var(--accent-cyan);
    cursor: pointer;
    -webkit-appearance: none;
}

.comparator-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
}

/* Caja de Alineación */
.alignment-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 0.8rem;
    margin-top: 1rem;
}

.alignment-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 0.3rem;
}

/* Viewport / Lienzo de comparación */
.comparator-viewport-wrapper {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #080c14;
    overflow: hidden;
    height: calc(80vh - 2rem);
    min-height: 550px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.comparator-viewport-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.viewport-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.viewport-shortcuts-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.viewport-canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    cursor: grab;
    /* Checkerboard Pattern */
    background-color: #0a0d17;
    background-image: linear-gradient(45deg, #101525 25%, transparent 25%),
        linear-gradient(-45deg, #101525 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #101525 75%),
        linear-gradient(-45deg, transparent 75%, #101525 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
}

.viewport-canvas-container:active {
    cursor: grabbing;
}

#comparison-canvas {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: transparent;
    max-width: none;
    max-height: none;
    display: block;
}

/* Estilos para el texto oculto en tarjetas de página */
.hidden-text-alert {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 56, 96, 0.08);
    border: 1px solid rgba(255, 56, 96, 0.25);
    border-radius: 8px;
}

.hidden-text-title {
    color: var(--accent-red);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.hidden-text-items-list {
    max-height: 120px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Scrollbar personalizado para la lista de textos ocultos */
.hidden-text-items-list::-webkit-scrollbar {
    width: 4px;
}

.hidden-text-items-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}

.hidden-text-items-list::-webkit-scrollbar-thumb {
    background: rgba(255, 56, 96, 0.3);
    border-radius: 2px;
}

.hidden-text-item {
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border-left: 2px solid var(--accent-red);
}

.hidden-text-content {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.hidden-text-meta {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 0.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Estilos de overlays de texto oculto en el visor */
div.hidden-text-highlight-overlay {
    background-color: rgba(255, 56, 96, 0.12);
    border: 2px solid var(--accent-red);
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s, border-width 0.2s, box-shadow 0.2s;
    z-index: 10;
}

div.hidden-text-highlight-overlay:hover {
    background-color: rgba(255, 56, 96, 0.25);
    border-width: 3.5px;
    box-shadow: 0 0 15px rgba(255, 56, 96, 0.45);
}

/* ==========================================
   GALERÍA DE IMÁGENES DETECTADAS
   ========================================== */
.gallery-layout-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    height: 620px;
    margin-top: 1.5rem;
}

.gallery-sidebar-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(var(--glass-blur));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.gallery-sidebar-header {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.sidebar-title {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
}

.gallery-badge {
    background: linear-gradient(135deg, var(--accent-cyan), #00a8cc);
    color: #070a13;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 9px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.gallery-thumbnails {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Scrollbar para las miniaturas */
.gallery-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-thumbnail-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.gallery-thumbnail-card:hover {
    background: rgba(0, 210, 255, 0.05);
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
}

.gallery-thumbnail-card.selected {
    background: rgba(0, 210, 255, 0.12);
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.15);
}

.thumbnail-img-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: #0d111d;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.thumbnail-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.thumbnail-info {
    flex: 1;
    min-width: 0;
}

.thumbnail-ref {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumbnail-specs {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Panel Principal de Vista Previa */
.gallery-preview-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(var(--glass-blur));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.gallery-preview-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
    gap: 1.2rem;
}

.gallery-preview-empty-state svg {
    opacity: 0.35;
    color: var(--text-muted);
    animation: float 4s ease-in-out infinite;
}

.gallery-preview-empty-state p {
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 320px;
}

.gallery-preview-active-state {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.gallery-image-viewport {
    flex: 1;
    background: #090c15;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow: auto;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.85);
}

.gallery-image-viewport img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Controles de alternancia de fondo */
.viewport-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.viewport-controls .btn-action {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.viewport-controls .btn-action:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.bg-toggle-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
}

.gallery-image-viewport.bg-white-preview {
    background: #ffffff !important;
    box-shadow: none !important;
}

.gallery-image-viewport.bg-white-preview img {
    background-image: none !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

.gallery-image-metadata {
    padding: 1.5rem;
    background: rgba(13, 17, 29, 0.5);
    overflow-y: auto;
    max-height: 250px;
    border-top: 1px solid var(--border-color);
}

.gallery-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.gallery-meta-header h4 {
    font-size: 1.15rem;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.gallery-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.gallery-meta-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    transition: background-color var(--transition-fast);
}

.gallery-meta-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.meta-card-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
    font-weight: 600;
}

.meta-card-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.gallery-exif-section {
    border-top: 1px dashed var(--border-color);
    padding-top: 1.2rem;
    margin-top: 1rem;
}

.exif-title {
    font-size: 0.95rem;
    color: var(--accent-cyan);
    margin-bottom: 0.8rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.gallery-exif-rows {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem 1.2rem;
}

/* Responsividad para la Galería */
@media (max-width: 900px) {
    .gallery-layout-wrapper {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .gallery-sidebar-container {
        height: 250px;
    }

    .gallery-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: 120px;
        padding: 0.8rem;
    }

    .gallery-thumbnail-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 140px;
        flex-shrink: 0;
    }

    .thumbnail-img-wrapper {
        width: 48px;
        height: 48px;
    }

    .gallery-preview-container {
        height: 500px;
    }
}

/* EAS Layers Manager Styles */
.layer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    user-select: none;
}

.layer-card:hover {
    border-color: var(--border-hover);
    background: rgba(20, 28, 47, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.layer-card.active-layer {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.layer-card.dimmed-layer {
    opacity: 0.45;
    cursor: default;
}

.layer-card.dimmed-layer:hover {
    border-color: var(--border-color);
    background: var(--bg-card);
    box-shadow: none;
}

.layer-thumb-container {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%), linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%), linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.layer-thumb-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.layer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.layer-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layer-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.layer-eye-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.layer-eye-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.layer-eye-btn.visible-active {
    color: var(--accent-cyan);
}

.layer-eye-btn.visible-inactive {
    color: var(--text-muted);
}

/* Visor overlays */
.layers-image-overlay {
    position: absolute;
    box-sizing: border-box;
    border: 1.5px dashed rgba(0, 210, 255, 0.45);
    background-color: rgba(0, 210, 255, 0.02);
    transition: border-color var(--transition-fast), border-style var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast);
    z-index: 50;
    cursor: grab;
}

.layers-image-overlay:hover {
    border-style: solid;
    border-color: var(--accent-cyan);
    border-width: 2px;
    box-shadow: 0 0 12px var(--accent-cyan-glow);
    background-color: rgba(0, 210, 255, 0.05);
}

.layers-image-overlay.layer-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.layers-image-overlay.selected-focus {
    border-style: solid;
    border-color: var(--accent-cyan);
    border-width: 2px;
    box-shadow: 0 0 18px var(--accent-cyan-glow);
    background-color: rgba(0, 210, 255, 0.05);
}

/* ==========================================================================
   CONTROL DE VISIBILIDAD (ELEMENTOS EXTRAÍDOS - DESAGRUPAR CAPAS)
   ========================================================================== */

.ungroup-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ungroup-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: #243248;
}

.ungroup-card.selected {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.ungroup-card.is-hidden {
    opacity: 0.45;
}

.ungroup-card.is-hidden .ungroup-thumb {
    filter: grayscale(0.85);
    opacity: 0.6;
}

.ungroup-eye-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.ungroup-eye-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.6);
    color: #60a5fa;
    transform: scale(1.05);
}

.ungroup-eye-btn.visible-active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

.ungroup-eye-btn.visible-inactive {
    color: #64748b;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.ungroup-eye-btn.visible-inactive:hover {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.12);
}
