/* --- Apple Human Interface Guidelines (Sonoma/Sequoia style) --- */

:root {
    --bg-dark: #0d0e12;
    --glass-bg: rgba(255, 255, 255, 0.06); /* White transparent glass style requested */
    --glass-border: rgba(255, 255, 255, 0.15); /* Refined 1px solid border */
    --glass-border-hover: rgba(255, 255, 255, 0.28);
    --text-light: #f5f5f7; /* Apple premium light text */
    --text-muted: rgba(255, 255, 255, 0.55);
    --success: #30D158; /* Apple System Green (Dark mode) */
    --error: #FF453A; /* Apple System Red (Dark mode) */
    --apple-blue: #007AFF; /* Classic Apple Blue Accent Color */
    
    --font-title: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --window-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    --control-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/fondo1.jpg');
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
}

/* Wrapper de Alineación Principal */
.layout-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
    width: 95vw;
    max-width: 1450px;
    height: 92vh;
}

/* Overlay oscuro y desenfoque */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}

/* Contenedor Sidebar Flotante */
.main-container-sidebar {
    position: relative;
    z-index: 2;
    width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--window-shadow);
}

/* Contenedor Principal de Contenidos (Wrapper Grid Stack) */
.main-content-wrapper {
    position: relative;
    z-index: 2;
    width: calc(95vw - 280px - 20px);
    max-width: 1150px;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

/* Contenedor Contenido Principal Flotante */
.main-container-content {
    grid-area: 1 / 1 / 2 / 2; /* Ocupan la misma celda de la cuadrícula */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--glass-bg); /* Efecto Glassmorphism translúcido */
    border: 1px solid var(--glass-border); /* Borde Glassmorphism sutil */
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-radius: 16px;
    box-shadow: var(--window-shadow);
    
    /* Estado inicial para la animación de deslizar hacia arriba */
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.5s step-end;
}

.main-container-content.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0s;
}

/* Sidebar Izquierdo */
.sidebar {
    background: rgba(22, 22, 26, 0.45);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 16px;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    padding-left: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.85;
}

.brand-logo {
    min-width: 32px;
    height: 32px;
    padding: 0 4px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-weight: 700;
    color: #000000;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
}

.brand-name {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px; /* macOS rounded rect standard for lists */
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-title);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: left;
    outline: none;
}

.nav-item svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    transition: transform 0.2s;
}

.nav-item:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.08); /* Hover traslúcido macOS */
}

.nav-item:hover svg {
    transform: translateX(2px);
}

.nav-item.active {
    color: #000000;
    background: #ffffff; /* Contraste elegante blanco solicitado */
    font-weight: 600;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-item.active svg {
    stroke: #000000;
}

.sidebar-footer {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
}

/* Zona de Contenido Principal (Derecha) */
.content-area {
    padding: 3rem;
    overflow-y: auto;
    position: relative;
    height: 100%;
    width: 100%;
}

/* Animación de cambio de pestaña */
.tab-content {
    animation: cubic-bezier(0.25, 0.8, 0.25, 1) 0.5s fadeIn forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Títulos de sección */
.section-header {
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 750; /* Look premium bold de Apple */
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em; /* Reducción de tracking */
    line-height: 1.15;
    color: #ffffff;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Estilos del Formulario */
.form-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px; /* standard macOS curves */
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-section-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
    letter-spacing: -0.015em;
}

.form-section-title svg {
    opacity: 0.9;
}

.grid-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group.double-width {
    grid-column: span 2;
}

label {
    font-size: 11px; /* 11px-12px Apple style */
    font-weight: 600; /* Semibold/Medium */
    color: rgba(255, 255, 255, 0.6); /* Vibrant secondary */
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 4px;
}

label span.req {
    color: #FF453A; /* Apple SystemRed */
    font-weight: 700;
}

input,
select {
    background: rgba(255, 255, 255, 0.04); /* Gris translúcido Apple style */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; /* Estilo macOS Preferences */
    padding: 8px 12px; /* Alineación y alto uniforme */
    height: 36px;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.88rem; /* ~13px */
    font-weight: 400;
    transition: all 0.15s ease-in-out;
    outline: none;
    width: 100%;
}

/* Estilo premium del select */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2.5' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><polyline points='8 10 12 14 16 10'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

input:focus,
select:focus {
    border-color: rgba(255, 255, 255, 0.45); /* Elegant translucent white border */
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.05); /* Soft premium white ring */
    background: rgba(255, 255, 255, 0.08); /* Sophisticated glass look on focus */
    transition: none; /* Instant selection animation */
}

input::placeholder {
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.88rem;
}

select option {
    background-color: #1e1e1e; /* Color oscuro macOS dropdown */
    color: var(--text-light);
    padding: 8px;
}

/* Selector de archivos premium */
.file-upload-wrapper {
    position: relative;
    cursor: pointer;
}

.file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border-radius: 8px; /* macOS rounded rect standard */
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    min-height: 36px;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-wrapper:hover .file-upload-btn {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
}

.file-list {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 4px;
}

.file-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* Testigos y bloque dinámico */
.witness-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.witness-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px; /* Curva estándar macOS */
    padding: 2rem;
    position: relative;
    transition: all 0.2s;
    animation: slideDown 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.witness-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.025);
}

.witness-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
}

.witness-title {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.015em;
}

.btn-delete-witness {
    background: rgba(255, 69, 58, 0.12); /* Vibrant Apple Red transparent */
    border: 1px solid rgba(255, 69, 58, 0.2);
    color: #FF453A; /* Apple Red */
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-delete-witness:hover {
    background: #FF453A;
    color: #ffffff;
    border-color: #FF453A;
    box-shadow: 0 2px 8px rgba(255, 69, 58, 0.35);
}

/* Botones generales */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    height: 36px;
    border-radius: 8px; /* macOS rounded rect standard */
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    outline: none;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary {
    background: var(--apple-blue);
    color: #ffffff;
    border-color: var(--apple-blue);
    box-shadow: var(--control-shadow);
}

.btn-primary:hover {
    background: #007AFF;
    border-color: #007AFF;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.35);
}

.btn-add {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: #ffffff;
    margin-top: 1rem;
    padding: 10px;
    border-radius: 8px;
}

.btn-add:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.30);
}

.form-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
}

/* Vista B: Lista de ACMs */
.acm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.acm-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px; /* Apple window curves */
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.acm-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.acm-card-img-cont {
    height: 180px;
    background: rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

.acm-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.acm-card:hover .acm-card-img {
    transform: scale(1.04);
}

.acm-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffffff;
    color: #000000;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-title);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.acm-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.acm-card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.acm-card-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: -6px;
}

.acm-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.feature-tag strong {
    color: #ffffff;
    font-weight: 600;
}

.acm-card-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.acm-card-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-card-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-title);
}

.btn-card-action:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    gap: 1.5rem;
    max-width: 500px;
    margin: 3rem auto;
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.empty-state-icon svg {
    width: 26px;
    height: 26px;
}

.empty-state-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.empty-state-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Vista C: Presentación Placeholder */
.presentation-container {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.placeholder-dashboard {
    background: rgba(22, 22, 26, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.placeholder-dashboard::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
    pointer-events: none;
}

.dashboard-mock {
    width: 100%;
    max-width: 650px;
    margin: 1rem 0;
    opacity: 0.85;
}

.placeholder-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.placeholder-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 600px;
}

/* Loader de Carga */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 14, 18, 0.92);
    backdrop-filter: blur(16px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 16px;
}

.loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--apple-blue);
    animation: spin 1s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 3px solid transparent;
    border-radius: 50%;
    border-top-color: rgba(255, 255, 255, 0.3);
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.015em;
}

.loader-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Notificaciones / Alertas */
.alert-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    padding: 14px 22px;
    border-radius: 8px; /* macOS style alert box */
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-width: 400px;
    backdrop-filter: blur(15px);
}

.alert-box.show {
    transform: translateY(0);
    opacity: 1;
}

.alert-box.success {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #000000;
}

.alert-box.success svg {
    stroke: #000000;
}

.alert-box.error {
    background: rgba(255, 69, 58, 0.94);
    border: 1px solid rgba(255, 69, 58, 0.2);
    color: #ffffff;
}

.alert-box.error svg {
    stroke: #ffffff;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Previsualización de Fotos en Modo Edición */
.existing-photos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 8px;
}

.existing-photo-thumb {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.existing-photo-thumb:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.3);
}

.existing-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.existing-photo-thumb .btn-delete-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 69, 58, 0.85);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.existing-photo-thumb .btn-delete-photo:hover {
    background: #FF453A;
    transform: scale(1.1);
}

/* === ESTILOS PARA EL CUADRO COMPARATIVO DE ACM === */

.comp-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.comp-kpi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.comp-kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.comp-kpi-value {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}

.comp-kpi-value.highlight {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

.comp-kpi-subtext {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.comp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.comp-property-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.comp-property-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.comp-property-card.main-property-highlight {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
}

@media (max-width: 768px) {
    .comp-property-card.main-property-highlight {
        grid-template-columns: 1fr;
    }
}

.comp-card-img-wrapper {
    position: relative;
    height: 100%;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.3);
}

.comp-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comp-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    font-family: var(--font-title);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.comp-property-card.main-property-highlight .comp-card-badge {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.3);
}

.comp-card-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

.comp-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comp-card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.comp-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comp-homog-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comp-property-card.main-property-highlight .comp-homog-badge {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.comp-homog-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.comp-homog-value {
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 750;
    color: #ffffff;
}

.comp-specs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
}

.comp-spec-row {
    display: flex;
    justify-content: space-between;
}

.comp-spec-val {
    font-weight: 600;
    color: #ffffff;
}

/* Tabla Estilo SaaS */
.comp-table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.comp-responsive-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
}

.comp-responsive-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 14px 16px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comp-responsive-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.comp-responsive-table tr.main-row {
    background: rgba(255, 255, 255, 0.06);
}

.comp-responsive-table tr.main-row td {
    font-weight: 600;
    color: #ffffff;
}

.comp-responsive-table tr:hover:not(.header-row) {
    background: rgba(255, 255, 255, 0.03);
}

.comp-responsive-table tr.main-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Popover de confirmación inline */
.btn-popover-wrapper {
    position: relative;
    display: inline-block;
}

.link-confirm-popover {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(22, 22, 26, 0.96);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    width: 220px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: center;
}

.link-confirm-popover.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.link-confirm-popover-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    font-family: var(--font-title);
    line-height: 1.3;
}

.link-confirm-popover-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.link-confirm-popover-btn {
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    outline: none;
}

.link-confirm-popover-btn.yes {
    background: #ffffff;
    color: #000000;
}

.link-confirm-popover-btn.yes:hover {
    background: rgba(255, 255, 255, 0.9);
}

.link-confirm-popover-btn.no {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.link-confirm-popover-btn.no:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* === ESTILOS PARA EL POPOVER DE ACCESO === */
.access-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(22, 22, 26, 0.98);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    width: 220px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: center;
}

.access-popover.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.access-popover.above {
    top: auto;
    bottom: calc(100% + 8px);
    left: auto;
    right: 0;
    transform: translateY(10px);
}

.access-popover.above.active {
    transform: translateY(0);
}

.access-popover-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    font-family: var(--font-title);
    line-height: 1.3;
}

.access-popover-body {
    display: flex;
    gap: 6px;
}

.access-popover-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.85rem;
    outline: none;
    text-align: center;
    width: 100%;
}

.access-popover-input:focus {
    border-color: #ffffff !important;
}

.access-popover-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.access-popover-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.access-popover.shake {
    animation: accessPopoverShake 0.3s ease-in-out;
}

.access-popover.above.shake {
    animation: accessPopoverShakeAbove 0.3s ease-in-out;
}

@keyframes accessPopoverShake {
    0%, 100% { transform: translateX(-50%) translateX(0); }
    20%, 60% { transform: translateX(-50%) translateX(-6px); }
    40%, 80% { transform: translateX(-50%) translateX(6px); }
}

@keyframes accessPopoverShakeAbove {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ==========================================================================
   ESTILOS PARA LA SECCIÓN DE INTRODUCCIÓN
   ========================================================================== */

/* Contenedor principal de Introducción */
#container-introduccion {
    max-width: 1000px;
    margin: 0 auto;
}

/* Selector segmentado estilo macOS */
.intro-tabs-selector {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 2rem;
    gap: 2px;
    backdrop-filter: blur(10px);
}

.intro-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-title);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    text-align: center;
    white-space: nowrap;
}

.intro-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.intro-tab-btn.active {
    color: #000000;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Sub-paneles de contenido */
.intro-sub-content {
    display: none;
    animation: fadeInIntro 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.intro-sub-content.active {
    display: block;
}

@keyframes fadeInIntro {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Diseños de Grilla */
.intro-grid-two {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .intro-grid-two {
        grid-template-columns: 1fr;
    }
}

/* Tarjeta Primaria */
.intro-card-primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.intro-icon-large {
    color: #ffffff;
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.intro-icon-large svg {
    width: 100%;
    height: 100%;
}

.intro-card-primary h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.intro-card-primary p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Stack de Tarjetas Secundarias */
.intro-card-secondary-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.intro-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.25s ease;
}

.intro-mini-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.intro-mini-card h3 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.intro-mini-card p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Grilla de Variables */
.intro-variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.variable-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.variable-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.variable-icon {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.85);
}

.variable-icon svg {
    width: 100%;
    height: 100%;
}

.variable-card h3 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.variable-card p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ==================== ESTRATEGIA DE PRECIOS: PIRÁMIDE ==================== */
.intro-pyramid-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .intro-pyramid-grid {
        grid-template-columns: 1fr;
    }
}

.pyramid-interactive-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pyramid-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pyramid-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: #ffffff;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
}

/* Formas trapezoidales con clip-path */
.pyramid-block.tier-3 {
    clip-path: polygon(30% 0%, 70% 0%, 75% 100%, 25% 100%);
    background: linear-gradient(180deg, #ff453a22 0%, #ff453a55 100%);
    border-color: rgba(255, 69, 58, 0.3);
}

.pyramid-block.tier-2 {
    clip-path: polygon(25% 0%, 75% 0%, 82% 100%, 18% 100%);
    background: linear-gradient(180deg, #ff9f0a22 0%, #ff9f0a55 100%);
    border-color: rgba(255, 159, 10, 0.3);
}

.pyramid-block.tier-1 {
    clip-path: polygon(18% 0%, 82% 0%, 90% 100%, 10% 100%);
    background: linear-gradient(180deg, #ffd60a22 0%, #ffd60a55 100%);
    border-color: rgba(255, 214, 10, 0.3);
}

.pyramid-block.tier-0 {
    clip-path: polygon(10% 0%, 90% 0%, 96% 100%, 4% 100%);
    background: linear-gradient(180deg, #30d15822 0%, #30d15855 100%);
    border-color: rgba(48, 209, 88, 0.3);
}

/* Efecto hover general de los bloques */
.pyramid-block:hover,
.pyramid-block.highlighted {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(255,255,255,0.25);
    z-index: 10;
}

.pyramid-block.tier-3:hover,
.pyramid-block.tier-3.highlighted {
    background: linear-gradient(180deg, #ff453a77 0%, #ff453acc 100%);
    border-color: #ff453a;
    box-shadow: 0 0 20px rgba(255, 69, 58, 0.4);
}

.pyramid-block.tier-2:hover,
.pyramid-block.tier-2.highlighted {
    background: linear-gradient(180deg, #ff9f0a77 0%, #ff9f0acc 100%);
    border-color: #ff9f0a;
    box-shadow: 0 0 20px rgba(255, 159, 10, 0.4);
}

.pyramid-block.tier-1:hover,
.pyramid-block.tier-1.highlighted {
    background: linear-gradient(180deg, #ffd60a77 0%, #ffd60acc 100%);
    border-color: #ffd60a;
    box-shadow: 0 0 20px rgba(255, 214, 10, 0.4);
}

.pyramid-block.tier-0:hover,
.pyramid-block.tier-0.highlighted {
    background: linear-gradient(180deg, #30d15877 0%, #30d158cc 100%);
    border-color: #30d158;
    box-shadow: 0 0 20px rgba(48, 209, 88, 0.4);
}

.pyramid-pct {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    line-height: 1;
}

.pyramid-desc {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.85;
}

.pyramid-axis-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pyramid-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pyramid-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.pyramid-card h3 {
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.pyramid-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Badges para el estado de la tarjeta */
.card-status-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.badge-red { background: rgba(255, 69, 58, 0.15); color: #ff453a; border: 1px solid rgba(255, 69, 58, 0.3); }
.badge-orange { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; border: 1px solid rgba(255, 159, 10, 0.3); }
.badge-yellow { background: rgba(255, 214, 10, 0.15); color: #ffd60a; border: 1px solid rgba(255, 214, 10, 0.3); }
.badge-green { background: rgba(48, 209, 88, 0.15); color: #30d158; border: 1px solid rgba(48, 209, 88, 0.3); }

/* Resaltado de tarjetas en hover/JS */
.pyramid-card.highlighted {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.pyramid-card#pyramid-card-3.highlighted { border-color: rgba(255, 69, 58, 0.5); box-shadow: 0 0 15px rgba(255, 69, 58, 0.15); }
.pyramid-card#pyramid-card-2.highlighted { border-color: rgba(255, 159, 10, 0.5); box-shadow: 0 0 15px rgba(255, 159, 10, 0.15); }
.pyramid-card#pyramid-card-1.highlighted { border-color: rgba(255, 214, 10, 0.5); box-shadow: 0 0 15px rgba(255, 214, 10, 0.15); }
.pyramid-card#pyramid-card-0.highlighted { border-color: rgba(48, 209, 88, 0.5); box-shadow: 0 0 15px rgba(48, 209, 88, 0.15); }


/* ==================== SUPERFICIE HOMOGENEIZADA ==================== */
.homog-explain-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.homog-explain-card h2 {
    font-family: var(--font-title);
    font-size: 1.45rem;
    font-weight: 750;
    color: #ffffff;
}

.homog-explain-card p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.homog-coefficients-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.homog-coefficients-box h4 {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.coeff-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.coeff-lbl {
    color: var(--text-muted);
}

.coeff-val {
    color: #ffffff;
    font-weight: 600;
}

.homog-calc-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.homog-calc-card h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.homog-calc-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-row {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr 1fr;
    align-items: center;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
}

.calc-type {
    color: var(--text-muted);
    font-weight: 500;
}

.calc-formula {
    color: rgba(255, 255, 255, 0.75);
    font-family: monospace;
}

.calc-res {
    text-align: right;
    color: #ffffff;
    font-weight: 600;
}

.homog-calc-total {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 4px;
    align-items: center;
}

.total-lbl {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

.total-val {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    text-align: right;
}

.total-desc {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
}


/* ==================== VISTA PREVIA DEL REPORTE ==================== */
.report-preview-container {
    background: rgba(22, 22, 26, 0.35);
    border: 1.5px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--window-shadow);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.report-preview-container h3 {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 750;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.preview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.preview-kpi-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-kpi-lbl {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.preview-kpi-val {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
}

.preview-sugerido-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.sug-lbl {
    font-family: var(--font-title);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.sug-val {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.01em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.preview-recommendation-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1.5rem;
}

.preview-recommendation-box h4 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.preview-recommendation-box p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}
