/* Paleta base inspirada en paratupyme.com */
:root {
    --color-morado-base: #5A4EDE;
    --color-morado-oscuro: #674295;
    --color-rojo-alerta: #FE1E79;
    --color-fondo: #FFFFFF;
    --color-boton-principal: #A21089;
    --color-texto-boton-claro: #A3148B;
    --color-texto: #1F2532;
    --color-borde: #D9E2EC;
    --color-error: #DC3545;
    
    --ptp-morado-base: #5A4EDE;
    --ptp-morado-oscuro: #674295;
    --ptp-rojo-critico: #FE1E79;
    --ptp-blanco: #FFFFFF;
    --ptp-boton-principal: #A21089;
    --ptp-texto-boton-claro: #A3148B;
    --topbar-height: 72px;
    --sidebar-width: 280px;
    --sidebar-toggle-size: 42px;
    --color-topbar-fondo: #A21089;
    --color-topbar-fondo-hover: rgba(255, 255, 255, 0.18);
    --color-topbar-borde: rgba(162, 16, 137, 0.45);
    --color-topbar-texto: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Poppins', 'Open Sans', Arial, sans-serif;
    color: var(--color-texto);
    background-color: var(--color-fondo);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-boton-principal);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.with-navigation {
    background-color: var(--color-fondo);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-topbar-fondo);
    border-bottom: 1px solid var(--color-topbar-borde);
    padding: 0 1.5rem;
    min-height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 1001;
    gap: 1.5rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.topbar-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    transition: background 0.2s ease;
    margin-left: auto;
}

.topbar-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.28);
}

.topbar-menu-toggle-bar {
    width: 20px;
    height: 2px;
    background: var(--color-topbar-texto);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.topbar-mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.topbar-mobile-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.topbar-logo img {
    max-width: 250px;
    width: 100%;
    height: auto;
    transition: max-width 0.2s ease;
    filter: brightness(0) invert(1);
}

.sidebar-toggle {
    position: absolute;
    top: 1.1rem;
    left: 1rem;
    width: var(--sidebar-toggle-size);
    height: var(--sidebar-toggle-size);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    transition: background 0.2s ease, box-shadow 0.2s ease, left 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(8px);
    z-index: 980;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 25px rgba(17, 25, 40, 0.18);
}

.sidebar-toggle-bar {
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--color-morado-oscuro);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

body.sidebar-open .sidebar-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

body.sidebar-open .sidebar-toggle-bar:nth-child(2) {
    opacity: 0;
}

body.sidebar-open .sidebar-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 993px) {
    body.sidebar-open .sidebar-toggle {
        left: calc(var(--sidebar-width) - (var(--sidebar-toggle-size) / 2));
    }
}

.topbar-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.topbar-nav {
    margin-left: auto;
}

.topbar-actions {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
}

.logout-form {
    margin: 0;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--color-topbar-texto);
    padding: 0.55rem 0.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 24px rgba(9, 11, 35, 0.18);
}

.icon-logout {
    display: inline-flex;
    position: relative;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: var(--color-topbar-texto);
}

.icon-logout::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 3px;
    width: 10px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 4px 0 0 4px;
    background: transparent;
}

.icon-logout-arrow {
    position: absolute;
    right: 2px;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

.icon-logout-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 6px;
    width: 8px;
    height: 2px;
    background: currentColor;
    transform: translateY(-50%);
}

.topbar-nav a,
.topbar-nav button {
    font-weight: 500;
    color: var(--color-topbar-texto);
    background: none;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.topbar-nav a:hover,
.topbar-nav button:hover {
    color: var(--color-topbar-texto);
    background: var(--color-topbar-fondo-hover);
}

.nav-item.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 0.5rem);
    min-width: 220px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(17, 25, 40, 0.18);
    padding: 0.75rem 0;
    list-style: none;
    margin: 0;
    border: 1px solid rgba(31, 37, 50, 0.08);
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1200;
}

.dropdown-menu:focus,
.dropdown-menu a {
    outline: none;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-right: 1px solid rgba(31, 37, 50, 0.08);
    border-top: 1px solid rgba(31, 37, 50, 0.08);
    transform: rotate(45deg);
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--color-texto);
}

.dropdown-menu li a:hover {
    background: rgba(90, 78, 222, 0.08);
    color: var(--color-morado-base);
}

.dropdown-icon {
    display: inline-block;
    font-size: 0.75rem;
    line-height: 1;
    color: inherit;
    transition: transform 0.2s ease;
}

.dropdown-icon::before {
    content: '▾';
}

.nav-item.dropdown-open > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item.dropdown-open > button .dropdown-icon {
    transform: rotate(180deg);
}

.nav-item:focus-within > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.layout-shell {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - var(--topbar-height));
    background: var(--color-fondo);
    position: relative;
    margin-bottom: 0;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--color-morado-base), var(--color-morado-oscuro));
    color: #ffffff;
    flex-shrink: 0;
    transition: width 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    z-index: 950;
    min-height: calc(100vh - var(--topbar-height) - 120px);
    align-self: stretch;
    margin-bottom: 0;
}

.sidebar-inner {
    padding: 1.75rem 1.5rem;
}

.sidebar-header {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-empty {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

.sidebar-proyecto {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem 1.1rem;
}

.sidebar-proyecto-nombre {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-proyecto-contrato,
.sidebar-proyecto-tipo {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.sidebar-progreso {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-acciones {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.6rem;
    margin: 0.8rem 0 0.6rem;
}

.sidebar-accion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.sidebar-accion:visited {
    color: inherit;
}

.sidebar-accion:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.sidebar-accion-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
}

.sidebar-hitos {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sidebar-hitos h4 {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.8;
}

.sidebar-hitos ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 22, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1090;
}

.sidebar-modal-backdrop.activo {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(10px);
    z-index: 1100;
}

.sidebar-modal.activo {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sidebar-modal-card {
    width: min(480px, 95vw);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 28px 50px rgba(17, 25, 40, 0.18);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.sidebar-modal-card[data-sidebar-modal="cliente"],
[data-sidebar-modal="cliente"] .sidebar-modal-card,
.sidebar-modal-card[data-sidebar-modal="calendario-detalle"],
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-card {
    background: linear-gradient(135deg, #5A4EDE, #A21089);
}

[data-sidebar-modal="cliente"] .sidebar-modal-body,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-body {
    background: #ffffff;
    border-radius: 0 0 18px 18px;
}

.sidebar-modal-card-grande {
    width: min(1200px, 96vw);
}

/* === CALENDARIO DEL VIAJE === */
.viaje-calendario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.viaje-calendario-mes {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(26, 23, 68, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.viaje-calendario-mes:hover {
    box-shadow: 0 4px 16px rgba(90, 78, 222, 0.15);
}

.viaje-calendario-mes header {
    background: linear-gradient(135deg, #5A4EDE, #A21089);
    padding: 0.85rem 1rem;
    text-align: center;
}

.viaje-calendario-mes header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.viaje-calendario-mes table {
    width: 100%;
    border-collapse: collapse;
}

.viaje-calendario-mes thead {
    background: #f8f9fa;
}

.viaje-calendario-mes thead th {
    padding: 0.6rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.viaje-calendario-mes tbody td {
    padding: 0.5rem 0.25rem;
    text-align: center;
    vertical-align: top;
    border: 1px solid #f0f0f0;
    min-height: 50px;
    position: relative;
    transition: background-color 0.2s ease;
}

.viaje-calendario-mes tbody td:hover {
    background-color: #f8f9fa;
}

.viaje-calendario-mes tbody td.hoy {
    background-color: #fff3cd;
    font-weight: 700;
}

.viaje-calendario-mes tbody td.hoy .cal-dia {
    color: #ffc107;
    font-weight: 700;
    font-size: 1.05em;
}

/* Colores de estado para días con hitos */
.viaje-calendario-mes tbody td.estado-atrasado {
    background-color: #ffe5e5;
}

.viaje-calendario-mes tbody td.estado-completado {
    background-color: #e5f8f3;
}

.viaje-calendario-mes tbody td.estado-gestion {
    background-color: #fff8e5;
}

.viaje-calendario-mes tbody td.estado-pendiente {
    background-color: #f5f5f5;
}

.cal-dia {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1F2532;
    margin-bottom: 0.25rem;
}

.cal-hitos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.3rem;
}

.cal-hito {
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.cal-hito:hover {
    transform: scale(1.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cal-hito-punto {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* Colores de hitos según estado */
.cal-hito.estado-atrasado .cal-hito-punto {
    background-color: #dc3545;
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.4);
}

.cal-hito.estado-completado .cal-hito-punto {
    background-color: #00b48d;
    box-shadow: 0 0 4px rgba(0, 180, 141, 0.4);
}

.cal-hito.estado-gestion .cal-hito-punto {
    background-color: #ffc107;
    box-shadow: 0 0 4px rgba(255, 193, 7, 0.4);
}

.cal-hito.estado-pendiente .cal-hito-punto {
    background-color: #6c757d;
    box-shadow: 0 0 4px rgba(108, 117, 125, 0.4);
}

.cal-hito.estado-hoy .cal-hito-punto {
    background-color: #ffc107;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
    animation: pulseHito 2s infinite;
}

@keyframes pulseHito {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive: 2 columnas en tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .viaje-calendario-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 3 columnas en desktop */
@media (min-width: 1025px) {
    .viaje-calendario-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive: 1 columna en móviles */
@media (max-width: 767px) {
    .viaje-calendario-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .viaje-calendario-mes tbody td {
        padding: 0.4rem 0.2rem;
        min-height: 40px;
    }
}

/* === MODAL DE DATOS DEL CLIENTE Y CONTRATO === */
.cliente-modal-seccion {
    margin-bottom: 2rem;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(26, 23, 68, 0.08);
    transition: box-shadow 0.2s ease;
}

.cliente-modal-seccion:hover {
    box-shadow: 0 4px 16px rgba(90, 78, 222, 0.12);
}

.cliente-modal-seccion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.cliente-modal-icono {
    width: 24px;
    height: 24px;
    fill: #5A4EDE;
    flex-shrink: 0;
}

.cliente-modal-seccion-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1F2532;
}

.cliente-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.cliente-modal-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cliente-modal-item-full {
    grid-column: 1 / -1;
}

.cliente-modal-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cliente-modal-valor {
    font-size: 1rem;
    color: #1F2532;
    font-weight: 500;
}

.cliente-modal-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cliente-modal-badge-vigente {
    background-color: #e5f8f3;
    color: #00b48d;
}

.cliente-modal-badge-otro {
    background-color: #fff3cd;
    color: #856404;
}

.cliente-modal-servicio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(90, 78, 222, 0.1), rgba(162, 16, 137, 0.1));
    border-radius: 8px;
    color: #5A4EDE;
    font-weight: 600;
}

.cliente-modal-icono-inline {
    width: 18px;
    height: 18px;
    fill: #00b48d;
    flex-shrink: 0;
}

.cliente-modal-monto {
    font-size: 1.15rem;
    font-weight: 700;
    color: #00b48d;
}

/* Sección de Comparación de Tiempos */
.cliente-modal-seccion-tiempos {
    background: linear-gradient(135deg, rgba(90, 78, 222, 0.05), rgba(162, 16, 137, 0.05));
    border: 2px solid rgba(90, 78, 222, 0.15);
}

.cliente-modal-tiempos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cliente-modal-tiempo-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 6px rgba(26, 23, 68, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cliente-modal-tiempo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 78, 222, 0.2);
}

.cliente-modal-tiempo-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.cliente-modal-icono-tiempo {
    width: 20px;
    height: 20px;
    fill: #5A4EDE;
}

.cliente-modal-tiempo-titulo {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2532;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cliente-modal-tiempo-fechas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cliente-modal-tiempo-fecha {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cliente-modal-tiempo-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.cliente-modal-tiempo-valor {
    font-size: 1rem;
    color: #1F2532;
    font-weight: 600;
}

.cliente-modal-tiempo-duracion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.cliente-modal-tiempo-duracion-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.cliente-modal-tiempo-duracion-valor {
    font-size: 1.1rem;
    color: #5A4EDE;
    font-weight: 700;
}

.cliente-modal-tiempos-alerta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.cliente-modal-tiempos-alerta-advertencia {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.cliente-modal-tiempos-alerta-ok {
    background-color: #e5f8f3;
    color: #00b48d;
    border: 1px solid #00b48d;
}

.cliente-modal-icono-alerta {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Responsive para modal de cliente */
@media (max-width: 768px) {
    .cliente-modal-grid {
        grid-template-columns: 1fr;
    }
    
    .cliente-modal-tiempos-grid {
        grid-template-columns: 1fr;
    }
    
    .cliente-modal-seccion {
        padding: 1rem;
    }
}

/* === FORMULARIO COMPLETADO POR CLIENTE === */
.formulario-completado-contenedor {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.formulario-campo-completado {
    background: #ffffff;
    border: 1px solid rgba(31, 37, 50, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.formulario-campo-completado:hover {
    box-shadow: 0 4px 12px rgba(90, 78, 222, 0.1);
    border-color: rgba(90, 78, 222, 0.3);
}

.formulario-campo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(31, 37, 50, 0.08);
}

.formulario-campo-etiqueta {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2532;
    margin: 0;
}

.formulario-campo-obligatorio {
    color: #dc3545;
    margin-left: 0.25rem;
}

.formulario-campo-tipo {
    font-size: 0.85rem;
    color: #6c757d;
    background: rgba(90, 78, 222, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.formulario-campo-contenido {
    margin-top: 0.75rem;
}

.formulario-campo-vacio {
    color: #999;
    font-style: italic;
    margin: 0;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.formulario-campo-texto-respuesta {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #1F2532;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.formulario-campo-texto-informativo {
    padding: 1rem;
    background: #f0f7ff;
    border-left: 4px solid #2196F3;
    border-radius: 8px;
    color: #1F2532;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.formulario-campo-archivos {
    margin-top: 1rem;
}

.formulario-archivos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.formulario-archivo-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.formulario-archivo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.formulario-archivo-miniatura {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.formulario-archivo-miniatura:hover {
    opacity: 0.9;
}

.formulario-archivo-miniatura img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.formulario-archivo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.formulario-archivo-miniatura:hover .formulario-archivo-overlay {
    opacity: 1;
}

.formulario-archivo-icono {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

.formulario-archivo-icono-pdf,
.formulario-archivo-icono-video,
.formulario-archivo-icono-audio,
.formulario-archivo-icono-generico {
    width: 64px;
    height: 64px;
    fill: #6c757d;
}

.formulario-archivo-icono-pdf {
    fill: #dc3545;
}

.formulario-archivo-icono-video {
    fill: #5A4EDE;
}

.formulario-archivo-icono-audio {
    fill: #00b48d;
}

.formulario-archivo-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.formulario-archivo-nombre {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1F2532;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.formulario-archivo-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.formulario-archivo-descargar {
    margin-top: 0.5rem;
}

/* Responsive para formulario completado */
@media (max-width: 768px) {
    .formulario-archivos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .formulario-campo-completado {
        padding: 1rem;
    }
    
    .formulario-campo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.sidebar-modal-header,
.sidebar-modal-footer {
    padding: 1.1rem 1.6rem;
    border-bottom: 1px solid rgba(26, 23, 68, 0.08);
}

.sidebar-modal-footer {
    border-bottom: none;
    border-top: 1px solid rgba(26, 23, 68, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #ffffff;
    border-radius: 0 0 18px 18px;
}

[data-sidebar-modal="cliente"] .sidebar-modal-footer,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-footer {
    background: #ffffff;
}

[data-sidebar-modal="cliente"] .sidebar-modal-footer .btn-primario,
[data-sidebar-modal="cliente"] .sidebar-modal-footer .btn-secundario,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-footer .btn-primario,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-footer .btn-secundario {
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-sidebar-modal="cliente"] .sidebar-modal-footer .btn-primario,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-footer .btn-primario {
    background: #ffffff;
    color: #5A4EDE;
    border: 2px solid #5A4EDE;
}

[data-sidebar-modal="cliente"] .sidebar-modal-footer .btn-primario:hover,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-footer .btn-primario:hover {
    background: #5A4EDE;
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(90, 78, 222, 0.3);
    transform: translateY(-1px);
}

[data-sidebar-modal="cliente"] .sidebar-modal-footer .btn-secundario,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-footer .btn-secundario {
    background: #ffffff;
    color: #A21089;
    border: 2px solid #A21089;
}

[data-sidebar-modal="cliente"] .sidebar-modal-footer .btn-secundario:hover,
[data-sidebar-modal="calendario-detalle"] .sidebar-modal-footer .btn-secundario:hover {
    background: #A21089;
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(162, 16, 137, 0.3);
    transform: translateY(-1px);
}

.sidebar-modal-body {
    padding: 1.4rem 1.6rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-modal-cerrar {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: rgba(26, 23, 68, 0.5);
    line-height: 1;
}

.sidebar-modal-ayuda {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(26, 23, 68, 0.7);
}

.sidebar-modal-filtro {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.sidebar-modal-filtro input[type="search"] {
    flex: 1 1 220px;
    border-radius: 12px;
    border: 1px solid rgba(26, 23, 68, 0.18);
    padding: 0.55rem 0.9rem;
    font-size: 0.92rem;
}

.sidebar-modal-feedback {
    font-size: 0.9rem;
    color: rgba(26, 23, 68, 0.68);
}

.sidebar-modal-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sidebar-modal-lista li {
    border: 1px solid rgba(26, 23, 68, 0.12);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-modal-lista li.vacio {
    justify-content: center;
    color: rgba(26, 23, 68, 0.55);
}

.sidebar-modal-placeholder {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(26, 23, 68, 0.6);
}

.sidebar-modal-card-grande .sidebar-modal-body {
    max-height: calc(90vh - 6rem);
}

@media (max-width: 992px) {
    .hito-cabecera {
        flex-direction: column;
        align-items: flex-start;
    }

    .hito-meta {
        align-items: flex-start;
        text-align: left;
    }
}

.sidebar-barra {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    overflow: hidden;
}

.sidebar-barra span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
}

.sidebar-progreso-valor {
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-hito {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-hito a {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    grid-column-gap: 0.45rem;
    grid-row-gap: 0.05rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-hito-orden {
    grid-row: 1 / span 2;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    color: #1a1744;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-hito-fecha {
    font-size: 0.78rem;
    opacity: 0.8;
    justify-self: end;
    grid-row: 1;
}

.sidebar-hito-nombre {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-hito.estado-completado {
    background: rgba(0, 180, 141, 0.28);
    border-left: 4px solid #00b48d;
}

.sidebar-hito.estado-atrasado {
    background: rgba(222, 55, 55, 0.28);
    border-left: 4px solid #de3737;
}

.sidebar-hito.estado-hoy {
    background: rgba(255, 193, 7, 0.3);
    border-left: 4px solid #ffc107;
}

.sidebar-hito a::before {
    content: '';
}

.sidebar-hito.estado-completado a::before {
    content: '\2713';
    font-size: 0.8rem;
    color: #006b55;
    margin-right: 0.35rem;
}

.sidebar-hito.estado-atrasado a::before {
    content: '\26A0';
    font-size: 0.8rem;
    color: #a61c1c;
    margin-right: 0.35rem;
}

.sidebar-hito.estado-hoy a::before {
    content: '\25CF';
    font-size: 0.72rem;
    color: #b88600;
    margin-right: 0.35rem;
}

.sidebar-sin-hitos {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

body.sidebar-collapsed .sidebar {
    width: 0;
}

body.sidebar-collapsed .sidebar-inner {
    opacity: 0;
    pointer-events: none;
}

.layout-main {
    flex: 1;
    min-height: calc(100vh - var(--topbar-height));
    background: var(--color-fondo);
    transition: margin-left 0.25s ease;
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.menu-principal {
    display: none;
}

.layout-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-contenedor {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(17, 25, 40, 0.12);
    border: 1px solid rgba(209, 213, 219, 0.3);
}

.login-titulo {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-texto);
}

.login-descripcion {
    margin: 0 0 1.5rem;
    color: rgba(31, 37, 50, 0.74);
}

.login-formulario {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.campo-formulario {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.campo-formulario label {
    font-weight: 600;
    font-size: 0.95rem;
}

.campo-formulario input {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--color-borde);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo-formulario input:focus {
    outline: none;
    border-color: var(--color-morado-base);
    box-shadow: 0 0 0 4px rgba(90, 78, 222, 0.18);
}

.campo-telefono-con-prefijo {
    display: flex;
    align-items: center;
    position: relative;
}

.telefono-prefijo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid var(--color-borde);
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-texto);
    user-select: none;
    min-width: 60px;
}

.campo-telefono-con-prefijo input[type="tel"] {
    border-radius: 0 10px 10px 0;
    flex: 1;
}

.campo-telefono-con-prefijo input[type="tel"]:focus {
    border-left: 1px solid var(--color-morado-base);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-compacto {
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 144, 255, 0.2);
}

.btn-primario {
    background: linear-gradient(135deg, var(--color-boton-principal), var(--color-morado-oscuro));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(90, 78, 222, 0.35);
}

.btn-primario:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(18, 115, 210, 0.45);
}

.alerta {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alerta-error {
    background-color: rgba(254, 30, 121, 0.1);
    border: 1px solid rgba(254, 30, 121, 0.35);
    color: #861a4c;
}

.alerta-info {
    background-color: rgba(90, 78, 222, 0.12);
    border: 1px solid rgba(90, 78, 222, 0.35);
    color: #3a2f9b;
}

.panel-contenido {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

.panel-bienvenida h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.panel-bienvenida p {
    margin-bottom: 2rem;
    color: rgba(31, 37, 50, 0.8);
}

.panel-estadisticas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.8rem;
    margin-top: 1rem;
}

.estadistica-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 18px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    box-shadow: 0 22px 55px rgba(17, 25, 40, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.estadistica-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 65px rgba(17, 25, 40, 0.12);
}

.estadistica-card header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(31, 37, 50, 0.82);
    font-weight: 600;
}

.estadistica-valor {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.estadistica-valor-numero {
    font-size: 2.8rem;
    font-weight: 700;
    color: rgba(31, 37, 50, 0.9);
}

.estadistica-card footer {
    margin-top: auto;
    color: rgba(31, 37, 50, 0.55);
}

.estadistica-card footer small {
    font-size: 0.85rem;
}

.estadistica-gestion {
    border-left: 6px solid var(--ptp-boton-principal);
}

.estadistica-cerrados {
    border-left: 6px solid var(--ptp-rojo-critico);
}

.estadistica-abiertos-mes {
    border-left: 6px solid var(--ptp-morado-oscuro);
}

.crear-proyecto-contenido {
    max-width: 960px;
}

.crear-proyecto-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.grupo-campos {
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 18px;
    padding: 1.75rem 2rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 45px rgba(17, 25, 40, 0.08);
}

.grupo-campos legend {
    font-weight: 600;
    color: rgba(31, 37, 50, 0.7);
    padding: 0 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.grupo-campos .campo-formulario + .campo-formulario {
    margin-top: 1.25rem;
}

.constructor-datos-basicos textarea {
    resize: vertical;
    min-height: 120px;
}

.campo-formulario label {
    font-weight: 600;
    color: rgba(31, 37, 50, 0.85);
    margin-bottom: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.campo-formulario input[type="text"],
.campo-formulario input[type="date"],
.campo-formulario select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(31, 37, 50, 0.14);
    padding: 0.85rem 1rem;
    font-size: 1rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.95);
}

.campo-formulario input:focus,
.campo-formulario select:focus {
    outline: none;
    border-color: var(--ptp-morado-base);
    box-shadow: 0 0 0 4px rgba(90, 78, 222, 0.15);
}

.campo-formulario .obligatorio {
    color: var(--ptp-rojo-critico);
    font-size: 0.9rem;
}

.campo-formulario .ayuda {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgba(31, 37, 50, 0.55);
}

.campo-formulario input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.configurar-proyecto-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contrato-resultado,
.contratos-sugeridos {
    border-radius: 18px;
    border: 1px solid rgba(31, 37, 50, 0.12);
    padding: 1.6rem;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 38px rgba(17, 25, 40, 0.08);
}

.contrato-resultado header h2,
.contratos-sugeridos header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.9);
}

.contrato-resultado header p,
.contratos-sugeridos header p {
    margin: 0.4rem 0 1.2rem;
    color: rgba(31, 37, 50, 0.6);
}

.contrato-detalle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem 1.5rem;
    margin: 0 0 1rem;
}

.contrato-detalle dt {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(31, 37, 50, 0.5);
    letter-spacing: 0.05em;
}

.contrato-detalle dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.85);
}

.contrato-alerta {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ptp-rojo-critico);
    display: none;
}

.contrato-alerta.visible {
    display: block;
}

.contratos-lista {
    display: grid;
    gap: 1rem;
}

.contrato-card {
    border: 1px solid rgba(31, 37, 50, 0.12);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    box-shadow: 0 12px 30px rgba(17, 25, 40, 0.08);
}

.contrato-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contrato-card-info strong {
    font-size: 1rem;
    color: rgba(31, 37, 50, 0.9);
}

.contrato-card-info .contrato-card-cliente {
    color: rgba(31, 37, 50, 0.8);
    font-weight: 600;
}

.contrato-card-info span {
    font-size: 0.9rem;
    color: rgba(31, 37, 50, 0.65);
}

.contrato-card button {
    border-radius: 10px;
    border: 1px solid rgba(31, 37, 50, 0.18);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.8);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.contrato-card button:hover {
    background: rgba(162, 16, 137, 0.15);
    color: var(--ptp-morado-oscuro);
}

.contratos-sugeridos-inline {
    margin-top: 0.75rem;
    border: 1px solid rgba(31, 37, 50, 0.12);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(17, 25, 40, 0.08);
}

.contratos-sugeridos-inline-titulo {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.7);
}

.contratos-sugeridos-inline-lista {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.contrato-inline-opcion {
    display: grid;
    grid-template-columns: minmax(0, 140px) minmax(0, 1fr) minmax(0, 160px);
    gap: 0.75rem;
    align-items: center;
    border: 1px solid rgba(31, 37, 50, 0.12);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-align: left;
    font-size: 0.92rem;
}

.contrato-inline-opcion:hover {
    border-color: rgba(90, 78, 222, 0.45);
    box-shadow: 0 10px 20px rgba(90, 78, 222, 0.18);
    transform: translateY(-1px);
}

.contrato-inline-opcion:focus {
    outline: none;
    border-color: var(--ptp-morado-base);
    box-shadow: 0 0 0 4px rgba(90, 78, 222, 0.2);
}

.contrato-inline-numero {
    font-weight: 700;
    color: var(--ptp-morado-oscuro);
}

.contrato-inline-cliente {
    color: rgba(31, 37, 50, 0.75);
    font-weight: 500;
}

.contrato-inline-rut {
    color: rgba(31, 37, 50, 0.6);
    font-size: 0.88rem;
}

.acciones-formulario {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-secundario {
    background: rgba(31, 37, 50, 0.08);
    color: rgba(31, 37, 50, 0.8);
    border-radius: 12px;
    padding: 0.85rem 1.4rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.btn-secundario:hover {
    background: rgba(31, 37, 50, 0.12);
}

.alerta-exito {
    background-color: rgba(0, 180, 141, 0.12);
    border: 1px solid rgba(0, 180, 141, 0.4);
    color: #006b55;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 25, 40, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1500;
    backdrop-filter: blur(2px);
    overflow-y: auto;
}

.modal-overlay.visible {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 2.2rem 2rem;
    box-shadow: 0 25px 70px rgba(162, 16, 137, 0.35);
    text-align: center;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-card-grande {
    max-width: 900px;
    width: min(900px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}


.modal-card p {
    margin: 0 0 1.5rem;
    color: rgba(31, 37, 50, 0.75);
}

.modal-card .modal-body {
    text-align: left;
    margin-bottom: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-card .modal-body p {
    margin-bottom: 1rem;
}

.modal-card header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-borde);
}

.modal-card header h2 {
    margin: 0;
    flex: 1;
    color: var(--ptp-rojo-critico);
    font-size: 1.6rem;
    text-align: left;
}

.modal-cerrar {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: rgba(31, 37, 50, 0.6);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.modal-cerrar:hover {
    background-color: rgba(31, 37, 50, 0.1);
    color: var(--color-texto);
}

.modal-acciones {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-shrink: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-borde);
}

.modal-acciones .btn-primario {
    min-width: 200px;
}

.modal-acciones .btn-secundario {
    min-width: 150px;
}

.modal-card-peligro {
    max-width: 600px;
    border: 2px solid rgba(254, 30, 121, 0.3);
    box-shadow: 0 25px 70px rgba(254, 30, 121, 0.4);
}

.modal-card-peligro header h2 {
    color: #fe1e79;
    font-size: 1.8rem;
}

.btn-peligro {
    background: linear-gradient(135deg, #fe1e79 0%, #d91a66 100%);
    color: #ffffff;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(254, 30, 121, 0.3);
}

.btn-peligro:hover {
    background: linear-gradient(135deg, #d91a66 0%, #b81654 100%);
    box-shadow: 0 6px 16px rgba(254, 30, 121, 0.4);
    transform: translateY(-1px);
}

.btn-peligro:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(254, 30, 121, 0.3);
}

.btn-peligro .icon-eliminar {
    margin-right: 0.5rem;
}

.dropdown-menu-item-danger {
    color: #fe1e79;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
    font-weight: 500;
    font-size: inherit;
}

.dropdown-menu-item-danger:hover {
    background: rgba(254, 30, 121, 0.1);
}

.dropdown-menu-item-danger .icon-eliminar {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.dropdown-menu-item-danger .dropdown-menu-item-text {
    flex: 1;
    white-space: nowrap;
}

.dropdown-menu-item-danger .dropdown-menu-item-text {
    flex: 1;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

.lista-eliminacion {
    list-style: none;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.lista-eliminacion li {
    margin: 0.5rem 0;
    color: rgba(31, 37, 50, 0.85);
}

.proyecto-titulo-con-acciones {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.proyecto-titulo-con-acciones > div:first-child {
    flex: 1;
}

.btn-configurar-proyecto-header {
    background: transparent;
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin-right: 0.5rem;
}

.btn-configurar-proyecto-header:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.btn-configurar-proyecto-header:active {
    transform: translateY(0);
}

.btn-configurar-proyecto-header svg {
    width: 18px;
    height: 18px;
}

.btn-eliminar-proyecto-header {
    background: transparent;
    border: 2px solid rgba(254, 30, 121, 0.3);
    color: #fe1e79;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-eliminar-proyecto-header:hover {
    background: rgba(254, 30, 121, 0.1);
    border-color: #fe1e79;
    transform: translateY(-1px);
}

.btn-eliminar-proyecto-header:active {
    transform: translateY(0);
}

.btn-eliminar-proyecto-header .icon-eliminar {
    font-size: 1.2rem;
}

.modal-card-peligro {
    max-width: 600px;
    border: 2px solid rgba(254, 30, 121, 0.3);
    box-shadow: 0 25px 70px rgba(254, 30, 121, 0.4);
}

.modal-card-peligro header h2 {
    color: #fe1e79;
    font-size: 1.8rem;
}

.btn-peligro {
    background: linear-gradient(135deg, #fe1e79 0%, #d91a66 100%);
    color: #ffffff;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(254, 30, 121, 0.3);
}

.btn-peligro:hover {
    background: linear-gradient(135deg, #d91a66 0%, #b81654 100%);
    box-shadow: 0 6px 16px rgba(254, 30, 121, 0.4);
    transform: translateY(-1px);
}

.btn-peligro:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(254, 30, 121, 0.3);
}

.btn-peligro .icon-eliminar {
    margin-right: 0.5rem;
}

.dropdown-menu-item-danger {
    color: #fe1e79;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
    font-weight: 500;
    font-size: inherit;
}

.dropdown-menu-item-danger:hover {
    background: rgba(254, 30, 121, 0.1);
}

.dropdown-menu-item-danger .icon-eliminar {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.dropdown-menu-item-danger .dropdown-menu-item-text {
    flex: 1;
    white-space: nowrap;
}

.dropdown-menu-item-danger .dropdown-menu-item-text {
    flex: 1;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

.lista-eliminacion {
    list-style: none;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.lista-eliminacion li {
    margin: 0.5rem;
    color: rgba(31, 37, 0.85);
}

.alerta-advertencia {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #FFC107;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.alerta-advertencia strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.modal-card-hito {
    max-width: 520px;
}

.modal-card-hito form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-acciones-hito {
    gap: 0.75rem;
}

.modal-acciones-hito .btn-secundario {
    min-width: 150px;
}

.tipos-proyectos-contenido {
    max-width: 1280px;
}

.tipos-proyectos-form-acciones {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.tipos-proyectos-form-acciones .btn {
    align-self: flex-start;
}

.constructor-proyecto {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.constructor-configuracion .config-duracion {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, auto));
    gap: 1.25rem;
    align-items: end;
}

.constructor-configuracion .accion-generar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.config-leyenda {
    margin-top: 1rem;
    color: rgba(31, 37, 50, 0.6);
    font-size: 0.9rem;
}

.timeline-contenedor {
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 18px;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 38px rgba(17, 25, 40, 0.08);
}

.timeline-encabezado h2 {
    margin: 0;
    font-size: 1.35rem;
}

.timeline-encabezado p {
    margin: 0.4rem 0 1.2rem;
    color: rgba(31, 37, 50, 0.6);
}

.timeline-cuadricula {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 0.5rem;
    max-height: 480px;
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: 14px;
    background: rgba(31, 37, 50, 0.04);
}

.timeline-placeholder {
    grid-column: 1 / -1;
    margin: 0;
    padding: 1.5rem;
    text-align: center;
    color: rgba(31, 37, 50, 0.55);
}

.timeline-dia {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(31, 37, 50, 0.12);
    border-radius: 12px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-direction: column;
    transition: transform 0.15s ease, border 0.2s ease, box-shadow 0.15s ease;
}

.timeline-dia:hover,
.timeline-dia:focus-visible {
    transform: translateY(-2px);
    border-color: var(--ptp-morado-base);
    box-shadow: 0 10px 20px rgba(90, 78, 222, 0.2);
    outline: none;
}

.timeline-dia-dia {
    font-size: 0.75rem;
    color: rgba(31, 37, 50, 0.55);
}

.timeline-dia-hito {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(31, 37, 50, 0.9);
}

.timeline-dia.timeline-dia-con-hito {
    border-color: var(--ptp-boton-principal);
    background: linear-gradient(140deg, rgba(162, 16, 137, 0.15), rgba(90, 78, 222, 0.18));
}

.timeline-dia.timeline-dia-con-hito .timeline-dia-hito {
    color: var(--ptp-morado-oscuro);
}

.hitos-resumen {
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 18px;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 38px rgba(17, 25, 40, 0.08);
}

.hitos-resumen header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.hitos-resumen header p {
    margin: 0.3rem 0 1.2rem;
    color: rgba(31, 37, 50, 0.6);
}

.hitos-resumen-placeholder {
    margin: 0;
    color: rgba(31, 37, 50, 0.55);
}

.hitos-resumen-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.hito-item {
    border: 1px solid rgba(31, 37, 50, 0.12);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.hito-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hito-item-info strong {
    color: rgba(31, 37, 50, 0.9);
}

.hito-item-info span {
    color: rgba(31, 37, 50, 0.6);
    font-size: 0.9rem;
}

.hito-item button {
    border-radius: 10px;
    border: 1px solid rgba(31, 37, 50, 0.18);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.45rem 0.85rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.75);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hito-item button:hover {
    background: rgba(162, 16, 137, 0.15);
    color: var(--ptp-morado-oscuro);
}

@media (max-width: 768px) {
    .constructor-configuracion .config-duracion {
        grid-template-columns: 1fr;
    }

    .timeline-cuadricula {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

.proyectos-contenido {
    max-width: 1280px;
}

.proyectos-acciones {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.btn-crear-proyecto {
    padding: 0.9rem 1.6rem;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 16px 32px rgba(162, 16, 137, 0.35);
}

.btn-crear-proyecto:hover {
    box-shadow: 0 20px 40px rgba(162, 16, 137, 0.45);
}

.proyectos-buscador {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(31, 37, 50, 0.1);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 16px 36px rgba(17, 25, 40, 0.08);
}

.proyectos-buscador-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: flex-end;
}

.proyectos-buscador-form .campo {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 220px;
    flex: 1;
}

.proyectos-buscador-form label {
    font-weight: 600;
    color: rgba(31, 37, 50, 0.7);
}

.proyectos-buscador-form input,
.proyectos-buscador-form select {
    border: 1px solid rgba(31, 37, 50, 0.18);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.proyectos-buscador-form input:focus,
.proyectos-buscador-form select:focus {
    outline: none;
    border-color: var(--ptp-morado-base);
    box-shadow: 0 0 0 4px rgba(90, 78, 222, 0.15);
}

.proyectos-buscador-form .acciones {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.proyectos-bloque {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 20px;
    padding: 1.6rem;
    margin-bottom: 2rem;
    box-shadow: 0 18px 42px rgba(17, 25, 40, 0.08);
}

.proyectos-bloque-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.proyectos-bloque-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.9);
}

.proyectos-bloque-descripcion {
    margin: 0.35rem 0 0;
    color: rgba(31, 37, 50, 0.6);
}

.lista-config {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lista-config label {
    font-weight: 600;
    color: rgba(31, 37, 50, 0.7);
}

.lista-config select {
    border: 1px solid rgba(31, 37, 50, 0.18);
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.96);
}

.proyectos-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.proyectos-item {
    margin: 0;
    padding: 0;
}

.proyecto-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    box-shadow: 0 14px 32px rgba(17, 25, 40, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.proyecto-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(17, 25, 40, 0.12);
    border-color: rgba(162, 16, 137, 0.35);
}

/* Efecto de latido rojo para proyectos con hitos atrasados */
.proyecto-con-hitos-atrasados {
    position: relative;
    border-color: rgba(220, 53, 69, 0.4) !important;
    animation: proyecto-latido-rojo 2s ease-in-out infinite;
}

.proyecto-con-hitos-atrasados::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 18px;
    border: 2px solid rgba(220, 53, 69, 0.6);
    opacity: 0;
    animation: proyecto-latido-borde 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes proyecto-latido-rojo {
    0%, 100% {
        box-shadow: 0 14px 32px rgba(17, 25, 40, 0.08), 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 14px 32px rgba(17, 25, 40, 0.08), 0 0 0 4px rgba(220, 53, 69, 0.2);
    }
}

@keyframes proyecto-latido-borde {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}

.proyecto-con-hitos-atrasados:hover {
    border-color: rgba(220, 53, 69, 0.6) !important;
    animation: proyecto-latido-rojo-hover 1.5s ease-in-out infinite;
}

@keyframes proyecto-latido-rojo-hover {
    0%, 100% {
        box-shadow: 0 20px 48px rgba(17, 25, 40, 0.12), 0 0 0 0 rgba(220, 53, 69, 0.5);
    }
    50% {
        box-shadow: 0 20px 48px rgba(17, 25, 40, 0.12), 0 0 0 6px rgba(220, 53, 69, 0.3);
    }
}

.proyecto-row-principal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.proyecto-row-principal h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.9);
}

.proyecto-row-tipo {
    background: rgba(90, 78, 222, 0.15);
    color: var(--color-morado-oscuro);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.proyecto-row-secundario {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(31, 37, 50, 0.7);
}

.proyecto-row-contrato {
    font-weight: 600;
}

.proyecto-row-tiempo {
    font-weight: 600;
    color: rgba(0, 110, 82, 0.95);
}

.proyecto-row-fecha {
    color: rgba(31, 37, 50, 0.55);
}

.bloque-colapsable {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 37, 50, 0.1);
    border-radius: 20px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 2.25rem;
    box-shadow: 0 18px 40px rgba(17, 25, 40, 0.08);
    transition: box-shadow 0.2s ease;
}

.bloque-colapsable:hover {
    box-shadow: 0 22px 55px rgba(17, 25, 40, 0.12);
}

.bloque-colapsable-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.bloque-colapsable-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.9);
}

.bloque-colapsable-descripcion {
    margin: 0.45rem 0 0;
    color: rgba(31, 37, 50, 0.65);
}

.bloque-colapsable-toggle {
    border: 1px solid rgba(162, 16, 137, 0.65);
    background: linear-gradient(135deg, rgba(162, 16, 137, 0.85), rgba(103, 66, 149, 0.85));
    color: #ffffff;
    border-radius: 50px;
    padding: 0.6rem 1.35rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.bloque-colapsable-toggle .chevron {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.bloque-colapsable.is-open .bloque-colapsable-toggle .chevron {
    transform: rotate(-135deg);
}

.bloque-colapsable-toggle:hover {
    background: linear-gradient(135deg, rgba(162, 16, 137, 1), rgba(103, 66, 149, 0.95));
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(162, 16, 137, 0.35);
}

.bloque-colapsable-contenido {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease;
    opacity: 0;
}

.bloque-colapsable.is-open .bloque-colapsable-contenido {
    opacity: 1;
}

.bloque-colapsable-body {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mensaje-vacio {
    margin: 0;
    color: rgba(31, 37, 50, 0.65);
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(31, 37, 50, 0.25);
    padding: 1rem 1.25rem;
    border-radius: 14px;
    text-align: center;
}

.lista-proyectos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.proyecto-item {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 16px 35px rgba(17, 25, 40, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proyecto-encabezado {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    justify-content: space-between;
}

.proyecto-encabezado h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.92);
}

.proyecto-contrato {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(31, 37, 50, 0.6);
}

.proyecto-nombre {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.85rem;
    color: rgba(31, 37, 50, 0.7);
}

.proyecto-tipo {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(90, 78, 222, 0.1);
    color: var(--color-morado-oscuro);
    font-size: 0.85rem;
    font-weight: 600;
}

.proyecto-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 0;
}

.proyecto-meta dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(31, 37, 50, 0.5);
    margin-bottom: 0.2rem;
}

.proyecto-meta dd {
    margin: 0;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.85);
}

.proyecto-progreso {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.proyecto-progreso-barra {
    flex: 1;
    height: 12px;
    background: rgba(31, 37, 50, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.proyecto-progreso-barra span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ptp-boton-principal), var(--ptp-morado-oscuro));
    border-radius: inherit;
    transition: width 0.35s ease;
}

.proyecto-progreso-valor {
    font-weight: 700;
    font-size: 1.1rem;
    color: rgba(31, 37, 50, 0.8);
}

.proyectos-cerrados-control {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: rgba(31, 37, 50, 0.7);
}

.selector-resultados {
    border-radius: 10px;
    border: 1px solid rgba(31, 37, 50, 0.2);
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    color: rgba(31, 37, 50, 0.9);
}

.tabla-proyectos-cerrados {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(31, 37, 50, 0.1);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tabla-proyectos-cerrados table {
    width: 100%;
    border-collapse: collapse;
}

.tabla-proyectos-cerrados th,
.tabla-proyectos-cerrados td {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(31, 37, 50, 0.08);
}

.tabla-proyectos-cerrados tbody tr:last-child td {
    border-bottom: none;
}

.tabla-proyectos-cerrados th {
    font-weight: 700;
    color: rgba(31, 37, 50, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: rgba(162, 16, 137, 0.05);
}

.tabla-proyectos-cerrados tbody tr:hover {
    background: rgba(162, 16, 137, 0.06);
}

.paginacion-proyectos {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.paginacion-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 37, 50, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: rgba(31, 37, 50, 0.8);
    border-radius: 12px;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.paginacion-boton:disabled,
.paginacion-boton.disabled,
.paginacion-boton[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.paginacion-estado {
    font-size: 0.9rem;
    color: rgba(31, 37, 50, 0.65);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 25, 40, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 900;
    display: none;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 1280px) {
    .topbar-logo img {
        max-width: 220px;
    }

    .topbar-nav ul {
        gap: 1.15rem;
    }

    .panel-contenido {
        padding: 3.5rem 2rem;
    }
}

@media (max-width: 992px) {
    :root {
        --topbar-height: 66px;
    }

    .topbar {
        flex-wrap: nowrap;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
        position: relative;
    }

    .topbar-left {
        width: auto;
        flex: 1;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .topbar-menu-toggle {
        display: flex;
    }

    .topbar-logo {
        flex: 1;
        display: flex;
        align-items: center;
    }

    .topbar-logo img {
        max-width: 190px;
    }

    .topbar-nav {
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        right: 0;
        background: var(--color-topbar-fondo);
        border-bottom: 1px solid var(--color-topbar-borde);
        padding: 1rem;
        max-height: calc(100vh - var(--topbar-height));
        overflow-y: auto;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1002;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .topbar-nav.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .topbar-actions {
        margin-left: 0;
        order: 0;
        flex-shrink: 0;
    }

    .topbar-nav.mobile-open + .topbar-actions {
        position: fixed;
        top: calc(var(--topbar-height) + 1rem);
        right: 1rem;
        z-index: 1003;
    }

    .topbar-nav ul {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav-item {
        width: 100%;
    }

    .topbar-nav a,
    .topbar-nav button {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        margin-top: 0.35rem;
        box-shadow: none;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-menu li a {
        color: var(--color-topbar-texto);
    }

    .dropdown-menu li a:hover {
        background: rgba(255, 255, 255, 0.2);
        color: var(--color-topbar-texto);
    }

    .nav-item.dropdown-open > .dropdown-menu,
    .nav-item:focus-within > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .topbar-mobile-backdrop {
        display: block;
    }

    .layout-shell {
        flex-direction: column;
        min-height: calc(100vh - var(--topbar-height));
    }

    /* Asegurar que el sidebar no quede por encima del topbar en móviles */
    .sidebar {
        height: calc(100vh - var(--topbar-height));
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        width: min(85vw, 300px);
        max-width: 320px;
        border-radius: 0 18px 18px 0;
        box-shadow: none;
        transform: translateX(-100%);
        z-index: 999;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 16px 40px rgba(17, 25, 40, 0.25);
    }

    body.sidebar-collapsed .sidebar {
        width: min(85vw, 300px);
        transform: translateX(-100%);
    }

    .sidebar-backdrop {
        display: block;
    }

    .layout-main {
        min-height: calc(100vh - var(--topbar-height));
        padding: 2rem 0 0;
    }

    .panel-contenido {
        padding: 3rem 1.75rem;
        width: 100%;
    }

    .panel-estadisticas {
        gap: 1.5rem;
    }

    .btn-logout {
        width: 100%;
        justify-content: center;
    }

    .sidebar-toggle {
        position: fixed;
        top: calc(var(--topbar-height) + 0.65rem);
        left: 1rem;
        right: auto;
        z-index: 1200;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(17, 25, 40, 0.15);
        box-shadow: 0 12px 30px rgba(17, 25, 40, 0.18);
        backdrop-filter: none;
    }

    body.sidebar-open .sidebar-toggle {
        left: calc(min(85vw, 300px) - (var(--sidebar-toggle-size) / 2));
    }
}

.simulador-hitos-contenido {
    padding: 2rem;
}

.simulador-hitos {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(3, 62, 136, 0.12);
    padding: 2.5rem;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.simulador-hitos-encabezado h1 {
    font-size: 1.9rem;
    margin-bottom: 0.25rem;
    color: var(--color-morado-oscuro);
}

.simulador-hitos-encabezado p {
    color: var(--color-texto-secundario, #505460);
    margin: 0;
}

.simulador-hitos-controles .campo {
    display: block;
    max-width: 420px;
}

.simulador-hitos-controles .campo-etiqueta {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.simulador-hitos-controles .campo-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(3, 62, 136, 0.18);
    border-radius: 12px;
    font-size: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.simulador-hitos-controles .campo-control:focus {
    outline: none;
    border-color: var(--color-morado-base);
    box-shadow: 0 0 0 4px rgba(90, 78, 222, 0.15);
}

.simulador-hitos-preview {
    border: 1px dashed rgba(3, 62, 136, 0.18);
    border-radius: 16px;
    min-height: 280px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(90, 78, 222, 0.02);
}

.simulador-placeholder {
    text-align: center;
    color: var(--color-texto-secundario, #505460);
    max-width: 320px;
}

.simulador-placeholder-icono {
    width: 72px;
    height: 72px;
    margin-bottom: 1rem;
    color: var(--color-morado-base);
}

.simulador-hito-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.simulador-hito-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.simulador-hito-header h2 {
    font-size: 1.6rem;
    margin: 0;
    color: var(--color-morado-oscuro);
}

.simulador-hito-metas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.simulador-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(90, 78, 222, 0.08);
    color: var(--color-morado-oscuro);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.simulador-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(162, 16, 137, 0.12);
    color: var(--color-morado-oscuro);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.65rem;
}

.simulador-hito-cuerpo {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.simulador-ficha {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.65rem 1.2rem;
    margin: 0 0 1rem;
}

.simulador-ficha dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(31, 37, 50, 0.55);
}

.simulador-ficha dd {
    margin: 0;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.92);
}

.simulador-bloque {
    background: #ffffff;
    border: 1px solid rgba(3, 62, 136, 0.12);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 10px 24px rgba(3, 62, 136, 0.08);
}

.simulador-bloque-titulo {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
    color: var(--color-morado-oscuro);
}

.simulador-bloque-contenido p {
    margin: 0;
    color: var(--color-texto-secundario, #505460);
}

.simulador-tabla {
    border: 1px solid rgba(3, 62, 136, 0.12);
    border-radius: 12px;
    overflow: hidden;
    margin: 0.5rem 0 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.simulador-tabla table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.simulador-tabla thead {
    background: rgba(90, 78, 222, 0.08);
}

.simulador-tabla th,
.simulador-tabla td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid rgba(3, 62, 136, 0.08);
    text-align: left;
}

.simulador-tabla tbody tr:last-child td {
    border-bottom: none;
}

.simulador-tabla tbody tr:hover {
    background: rgba(162, 16, 137, 0.08);
}

.simulador-alerta {
    background: rgba(254, 30, 121, 0.08);
    border: 1px solid rgba(254, 30, 121, 0.3);
    color: #7c1340;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    line-height: 1.5;
}

.simulador-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(3, 62, 136, 0.18);
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.04);
    color: #445066;
    resize: vertical;
}

.simulador-form-control:disabled {
    cursor: not-allowed;
}

.simulador-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: var(--color-morado-base);
    color: #ffffff;
    border: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: transform 0.2s ease;
}

.simulador-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.simulador-lista {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--color-texto-secundario, #505460);
}

.simulador-lista li + li {
    margin-top: 0.4rem;
}

.simulador-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.simulador-checklist li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    background: rgba(90, 78, 222, 0.06);
    color: var(--color-texto-secundario, #505460);
    font-weight: 500;
}

.simulador-checklist li.listo {
    background: rgba(0, 180, 141, 0.12);
    color: #006b55;
}

.simulador-checklist .check {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.simulador-checklist li.listo .check::after {
    content: '✓';
    font-weight: 700;
}

.simulador-metricas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.simulador-metrica {
    background: rgba(90, 78, 222, 0.08);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--color-morado-oscuro);
}

.simulador-metrica strong {
    font-size: 1.6rem;
    font-weight: 700;
}

.simulador-metrica small {
    color: rgba(31, 37, 50, 0.6);
}

.simulador-pasos-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.simulador-paso {
    background: rgba(31, 37, 50, 0.06);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: rgba(31, 37, 50, 0.75);
}

.simulador-paso.listo {
    background: rgba(0, 180, 141, 0.12);
    color: #006b55;
}

.simulador-paso .numero {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
}

.simulador-paso p {
    margin: 0;
    font-size: 0.95rem;
}

.simulador-comentarios {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.simulador-comentario {
    background: rgba(90, 78, 222, 0.06);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.simulador-comentario-autor {
    font-weight: 600;
    color: var(--color-morado-oscuro);
    margin-bottom: 0.35rem;
}

.simulador-comentario-texto {
    margin: 0;
    color: var(--color-texto-secundario, #505460);
}

.simulador-campo-extra {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.simulador-campo-etiqueta {
    font-weight: 600;
    color: var(--color-morado-oscuro);
}

.simulador-campo-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-texto-secundario, #505460);
    font-weight: 500;
}

.simulador-campo-checkbox input {
    width: 1.1rem;
    height: 1.1rem;
}

@media (max-width: 992px) {
    .simulador-hitos {
        padding: 1.75rem;
    }

    .simulador-hitos-preview {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .simulador-hitos-contenido {
        padding: 1.25rem 1rem;
    }

    .simulador-hitos {
        padding: 1.5rem;
    }

    .simulador-hito-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .simulador-hitos-preview {
        padding: 1.25rem;
    }

    .simulador-ficha {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .simulador-pasos-horizontal {
        grid-template-columns: 1fr;
    }

    .contrato-inline-opcion {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
}

@media (max-width: 768px) {
    :root {
        --topbar-height: 64px;
    }

    .topbar-logo img {
        max-width: 165px;
    }

    .panel-contenido {
        padding: 2.5rem 1.5rem;
    }

    .panel-bienvenida h1 {
        font-size: 1.65rem;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .topbar-nav a,
    .topbar-nav button {
        padding: 0.65rem 0.75rem;
    }

    .dropdown-menu li a {
        padding: 0.55rem 1rem;
    }

    .panel-contenido {
        padding: 2.25rem 1.25rem;
    }

    .estadistica-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-titulo {
        font-size: 1.5rem;
    }

    .panel-contenido {
        padding: 2rem 1.1rem;
    }

    .panel-bienvenida h1 {
        font-size: 1.45rem;
    }

    .topbar-logo img {
        max-width: 150px;
    }

    .panel-estadisticas {
        grid-template-columns: 1fr;
    }
}

.tipos-proyectos-admin-contenido {
    max-width: 1200px;
}

.tipos-proyectos-admin-acciones {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.tipos-proyectos-admin-acciones .btn {
    align-self: flex-start;
}

.tipos-proyectos-tabla {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 22px 40px rgba(17, 25, 40, 0.08);
}

.tipos-proyectos-tabla table {
    width: 100%;
    border-collapse: collapse;
}

.tipos-proyectos-tabla thead {
    background: rgba(90, 78, 222, 0.08);
}

.tipos-proyectos-tabla th,
.tipos-proyectos-tabla td {
    padding: 1rem 1.35rem;
    text-align: left;
    border-bottom: 1px solid rgba(31, 37, 50, 0.08);
    font-size: 0.95rem;
}

.tipos-proyectos-tabla th {
    font-weight: 600;
    color: rgba(31, 37, 50, 0.7);
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
}

.tipos-proyectos-tabla tbody tr:last-child td {
    border-bottom: none;
}

.tipos-proyectos-tabla tbody tr:hover {
    background: rgba(90, 78, 222, 0.05);
}

.tipos-proyectos-tabla td .descripcion {
    margin: 0.35rem 0 0;
    color: rgba(31, 37, 50, 0.7);
    font-size: 0.9rem;
}

.tipos-proyectos-tabla td .meta {
    margin: 0.35rem 0 0;
    color: rgba(31, 37, 50, 0.5);
    font-size: 0.8rem;
}

.tipos-proyectos-tabla .columna-acciones {
    text-align: right;
    white-space: nowrap;
}

.tipos-proyectos-tabla .acciones-plantilla {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tipos-proyectos-tabla .acciones-plantilla .btn {
    min-width: 120px;
}

.btn-toggle-estado {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #b32036;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-toggle-estado:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(220, 53, 69, 0.2);
}

.btn-toggle-estado.is-inactive {
    background: rgba(0, 180, 141, 0.16);
    border-color: rgba(0, 180, 141, 0.35);
    color: #006b55;
}

.btn-toggle-estado.is-inactive:hover {
    box-shadow: 0 8px 16px rgba(0, 180, 141, 0.18);
}

.btn-toggle-estado:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.estado-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.estado-activo {
    background: rgba(0, 180, 141, 0.18);
    color: #006b55;
}

.estado-inactivo {
    background: rgba(31, 37, 50, 0.12);
    color: rgba(31, 37, 50, 0.65);
}

.btn-accion {
    padding: 0.6rem 1.15rem;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .tipos-proyectos-tabla thead {
        display: none;
    }

    .tipos-proyectos-tabla table,
    .tipos-proyectos-tabla tbody,
    .tipos-proyectos-tabla tr,
    .tipos-proyectos-tabla td {
        display: block;
        width: 100%;
    }

    .tipos-proyectos-tabla tbody tr {
        border: 1px solid rgba(31, 37, 50, 0.08);
        border-radius: 14px;
        margin-bottom: 1.25rem;
        background: #ffffff;
        box-shadow: 0 12px 26px rgba(17, 25, 40, 0.08);
        padding: 0.85rem 0;
    }

    .tipos-proyectos-tabla td {
        padding: 0.75rem 1.15rem 0.75rem 50%;
        position: relative;
        border: none;
    }

    .tipos-proyectos-tabla td::before {
        content: attr(data-title);
        position: absolute;
        left: 1.15rem;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        font-size: 0.85rem;
        color: rgba(31, 37, 50, 0.6);
        text-transform: uppercase;
    }

    .tipos-proyectos-tabla td[data-title='Acciones'] {
        padding-top: 1rem;
    }

    .tipos-proyectos-tabla .columna-acciones {
        text-align: left;
        padding-left: 1.15rem;
    }

    .tipos-proyectos-tabla .acciones-plantilla {
        display: flex;
        justify-content: flex-start;
    }

    .tipos-proyectos-tabla .acciones-plantilla .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .simulador-hitos {
        padding: 1.75rem;
    }

    .simulador-hitos-preview {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .simulador-hitos-contenido {
        padding: 1.25rem 1rem;
    }

    .simulador-hitos {
        padding: 1.5rem;
    }

    .simulador-hito-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .simulador-hitos-preview {
        padding: 1.25rem;
    }

    .simulador-ficha {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .simulador-pasos-horizontal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --topbar-height: 64px;
    }

    .topbar-logo img {
        max-width: 165px;
    }

    .panel-contenido {
        padding: 2.5rem 1.5rem;
    }

    .panel-bienvenida h1 {
        font-size: 1.65rem;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .topbar-nav a,
    .topbar-nav button {
        padding: 0.65rem 0.75rem;
    }

    .dropdown-menu li a {
        padding: 0.55rem 1rem;
    }

    .panel-contenido {
        padding: 2.25rem 1.25rem;
    }

    .estadistica-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-titulo {
        font-size: 1.5rem;
    }

    .panel-contenido {
        padding: 2rem 1.1rem;
    }

    .panel-bienvenida h1 {
        font-size: 1.45rem;
    }

    .topbar-logo img {
        max-width: 150px;
    }

    .panel-estadisticas {
        grid-template-columns: 1fr;
    }
}

.proyecto-row-encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.proyecto-row-primario {
    display: inline-flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.proyecto-row-primario h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.92);
}

.proyecto-row-contrato {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.65);
}

.proyecto-row-tipo {
    background: rgba(90, 78, 222, 0.15);
    color: var(--color-morado-oscuro);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.proyecto-row-progreso {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.proyecto-row-barra {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(31, 37, 50, 0.12);
    overflow: hidden;
}

.proyecto-row-barra span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ptp-boton-principal), var(--color-morado-base));
    transition: width 0.25s ease;
}

.proyecto-row-porcentaje {
    font-weight: 600;
    color: rgba(0, 110, 82, 0.95);
    font-size: 0.9rem;
}

.proyecto-contenido {
    max-width: 960px;
}

.proyecto-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(31, 37, 50, 0.08);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 26px 60px rgba(17, 25, 40, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.proyecto-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.proyecto-panel-header h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: rgba(31, 37, 50, 0.92);
}

.proyecto-panel-contrato {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.6);
}

.proyecto-panel-tipo {
    background: rgba(90, 78, 222, 0.12);
    color: var(--color-morado-oscuro);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.proyecto-progresos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
}

.progreso-item {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: rgba(90, 78, 222, 0.08);
    border-radius: 16px;
    padding: 1rem 1.2rem;
}

.progreso-item header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: rgba(31, 37, 50, 0.75);
}

.progreso-barra {
    height: 10px;
    border-radius: 999px;
    background: rgba(31, 37, 50, 0.15);
    overflow: hidden;
}

.progreso-barra span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ptp-boton-principal), var(--color-morado-base));
    transition: width 0.3s ease;
}

.proyecto-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem 1.4rem;
}

.proyecto-resumen-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: rgba(31, 37, 50, 0.05);
    border-radius: 16px;
    padding: 0.9rem 1.1rem;
}

.proyecto-resumen-item .label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(31, 37, 50, 0.55);
}

.proyecto-resumen-item .value {
    font-weight: 600;
    font-size: 1rem;
}

.proyecto-hitos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proyecto-hitos header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.proyecto-hitos header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.proyecto-hitos header .ayuda {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(31, 37, 50, 0.6);
}

.proyecto-hitos-vacio {
    margin: 0;
    background: rgba(31, 37, 50, 0.05);
    border-radius: 16px;
    padding: 1rem 1.2rem;
}

.proyecto-hitos-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 420px;
    overflow-y: auto;
}

.proyecto-hito {
    border-radius: 16px;
    background: rgba(31, 37, 50, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.proyecto-hito a {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.4rem 0.8rem;
    padding: 0.9rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.proyecto-hito-orden {
    grid-row: 1 / span 2;
    font-size: 0.95rem;
    font-weight: 700;
    width: 2rem;
    height: 2rem;
    border-radius: 12px;
    background: rgba(162, 16, 137, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #61125d;
}

.proyecto-hito-fecha {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(26, 23, 68, 0.75);
}

.proyecto-hito-nombre {
    grid-column: 3;
    grid-row: 1;
    font-size: 1rem;
    font-weight: 600;
}

.proyecto-hito-descripcion {
    grid-column: 3;
    grid-row: 2;
    font-size: 0.88rem;
    color: rgba(26, 23, 68, 0.72);
}

.proyecto-hito.estado-completado {
    background: rgba(0, 180, 141, 0.22);
    border-left: 6px solid #00b48d;
}

.proyecto-hito.estado-completado a::before {
    content: '\2713';
    font-size: 0.85rem;
    font-weight: 700;
    color: #006b55;
    margin-right: 0.4rem;
}

.proyecto-hito.estado-atrasado {
    background: rgba(222, 55, 55, 0.25);
    border-left: 6px solid #de3737;
}

.proyecto-hito.estado-atrasado a::before {
    content: '\26A0';
    font-size: 0.85rem;
    margin-right: 0.4rem;
    color: #a61c1c;
}

.proyecto-hito.estado-hoy {
    background: rgba(255, 193, 7, 0.28);
    border-left: 6px solid #ffc107;
}

.proyecto-hito.estado-hoy a::before {
    content: '\25CF';
    font-size: 0.78rem;
    margin-right: 0.4rem;
    color: #b88600;
}

.proyecto-hito a::before {
    content: '';
}

.proyecto-hito:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(17, 25, 40, 0.12);
}

@media (max-width: 768px) {
    .proyecto-panel {
        padding: 1.6rem;
    }

    .proyecto-hito a {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .proyecto-hito-fecha {
        justify-self: flex-start;
    }
}

.sidebar-hito {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-hito a {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    grid-column-gap: 0.45rem;
    grid-row-gap: 0.05rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-hito-orden {
    grid-row: 1 / span 2;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    color: #1a1744;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-hito-fecha {
    font-size: 0.78rem;
    opacity: 0.8;
    justify-self: end;
    grid-row: 1;
}

.sidebar-hito-nombre {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-hito:hover,
.sidebar-hito:focus-within {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.sidebar-hito:hover a,
.sidebar-hito:focus-within a {
    color: #ffffff;
}

.sidebar-hito:active {
    transform: translateX(1px) scale(0.99);
    background: rgba(255, 255, 255, 0.22);
}

.hito-contenido {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 2rem 2.5rem;
}

.hito-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: rgba(26, 23, 68, 0.7);
}

.hito-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.hito-breadcrumbs a:hover {
    text-decoration: underline;
}

.hito-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(90, 78, 222, 0.12), rgba(162, 16, 137, 0.12));
    border-radius: 20px;
    padding: 1.75rem 2rem;
}

.hito-cabecera h1 {
    margin: 0 0 0.4rem;
    font-size: 1.65rem;
    font-weight: 700;
}

.hito-proyecto-nombre {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(26, 23, 68, 0.8);
}

.hito-descripcion {
    margin: 0.35rem 0 0;
    max-width: 38rem;
    color: rgba(26, 23, 68, 0.75);
}

.hito-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    text-align: right;
}

.hito-estado {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.06);
}

.hito-estado-completado {
    background: rgba(0, 180, 141, 0.18);
    color: #006b55;
}

.hito-estado-atrasado {
    background: rgba(222, 55, 55, 0.18);
    color: #a61c1c;
}

.hito-estado-hoy {
    background: rgba(255, 193, 7, 0.28);
    color: #8a6300;
}

.hito-fecha,
.hito-orden {
    font-size: 0.85rem;
    color: rgba(26, 23, 68, 0.75);
}

.hito-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.hito-resumen article {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 18px 40px rgba(17, 25, 40, 0.08);
}

.hito-resumen h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(26, 23, 68, 0.75);
}

.hito-resumen dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0;
}

.hito-resumen dl div {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.hito-resumen dt {
    font-weight: 600;
    color: rgba(26, 23, 68, 0.7);
}

.hito-resumen dd {
    margin: 0;
    color: rgba(26, 23, 68, 0.85);
}

.hito-resumen dd.razon-social-cliente {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.5;
    max-width: 100%;
}

.hito-estado-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.hito-estado-lista li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(26, 23, 68, 0.12);
    padding-bottom: 0.4rem;
}

.hito-estado-responsable {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.hito-estado-responsable .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}

.hito-estado-responsable strong {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.responsable-desactivado {
    color: rgba(220, 53, 69, 0.85);
}

/* ============================================
   GLOBO DE TEXTO (Tooltip/Bubble) - Componente Reutilizable
   ============================================ */

/* Trigger del globo (ícono que activa el globo) */
.globo-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    font-size: 1.1rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.15);
    transition: all 0.2s ease;
    position: relative;
}

.globo-trigger:hover {
    background: rgba(255, 193, 7, 0.25);
    transform: scale(1.1);
}

/* Variantes de color del trigger */
.globo-trigger.globo-trigger-info {
    background: rgba(0, 174, 239, 0.15);
}

.globo-trigger.globo-trigger-info:hover {
    background: rgba(0, 174, 239, 0.25);
}

.globo-trigger.globo-trigger-success {
    background: rgba(0, 180, 141, 0.15);
}

.globo-trigger.globo-trigger-success:hover {
    background: rgba(0, 180, 141, 0.25);
}

.globo-trigger.globo-trigger-warning {
    background: rgba(255, 193, 7, 0.15);
}

.globo-trigger.globo-trigger-warning:hover {
    background: rgba(255, 193, 7, 0.25);
}

.globo-trigger.globo-trigger-error {
    background: rgba(220, 53, 69, 0.15);
}

.globo-trigger.globo-trigger-error:hover {
    background: rgba(220, 53, 69, 0.25);
}

/* Contenedor del globo */
.globo-texto {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Variantes de color del globo */
.globo-texto.globo-info {
    border-color: rgba(0, 174, 239, 0.3);
}

.globo-texto.globo-info::before {
    border-top-color: rgba(0, 174, 239, 0.3);
}

.globo-texto.globo-success {
    border-color: rgba(0, 180, 141, 0.3);
}

.globo-texto.globo-success::before {
    border-top-color: rgba(0, 180, 141, 0.3);
}

.globo-texto.globo-warning {
    border-color: rgba(255, 193, 7, 0.3);
}

.globo-texto.globo-warning::before {
    border-top-color: rgba(255, 193, 7, 0.3);
}

.globo-texto.globo-error {
    border-color: rgba(220, 53, 69, 0.3);
}

.globo-texto.globo-error::before {
    border-top-color: rgba(220, 53, 69, 0.3);
}

.globo-texto.globo-cerrado {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Flecha del globo */
.globo-texto::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 193, 7, 0.3);
}

.globo-texto::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #ffffff;
}

/* Hover para mostrar globo cerrado */
.globo-trigger:hover + .globo-texto:not(.globo-cerrado),
.globo-trigger:hover ~ .globo-texto:not(.globo-cerrado) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Header del globo */
.globo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.globo-icono {
    font-size: 1.25rem;
}

.globo-header strong {
    font-size: 0.95rem;
    color: rgba(26, 23, 68, 0.9);
}

/* Contenido del globo */
.globo-texto p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(26, 23, 68, 0.75);
}

.globo-texto .globo-contenido {
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(26, 23, 68, 0.75);
}

/* Botón de cerrar */
.globo-cerrar {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(26, 23, 68, 0.6);
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.globo-cerrar:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(26, 23, 68, 0.9);
}

.globo-cerrar span {
    display: block;
    font-weight: 300;
}

/* Clases legacy para compatibilidad (deprecated - usar las nuevas clases) */
.responsable-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    font-size: 1.1rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.15);
    transition: all 0.2s ease;
    position: relative;
}

.responsable-tooltip-trigger:hover {
    background: rgba(255, 193, 7, 0.25);
    transform: scale(1.1);
}

.responsable-tooltip {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.responsable-tooltip.tooltip-cerrado {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.responsable-tooltip::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 193, 7, 0.3);
}

.responsable-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #ffffff;
}

.responsable-tooltip-trigger:hover + .responsable-tooltip:not(.tooltip-cerrado),
.responsable-tooltip-trigger:hover ~ .responsable-tooltip:not(.tooltip-cerrado) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tooltip-icon {
    font-size: 1.25rem;
}

.tooltip-header strong {
    font-size: 0.95rem;
    color: rgba(26, 23, 68, 0.9);
}

.responsable-tooltip p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(26, 23, 68, 0.75);
}

/* Tooltip de acceso del cliente */
.hito-estado-visibilidad {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cliente-acceso-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    font-size: 1.1rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(33, 150, 243, 0.15);
    transition: all 0.2s ease;
    position: relative;
    margin-left: 0.5rem;
    flex-shrink: 0;
    z-index: 1;
}

.cliente-acceso-tooltip-trigger:hover {
    background: rgba(33, 150, 243, 0.25);
    transform: scale(1.1);
}

.cliente-acceso-tooltip {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 2px solid rgba(33, 150, 243, 0.3);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 400px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    white-space: normal;
}

.cliente-acceso-tooltip.tooltip-abierto {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.cliente-acceso-tooltip::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(33, 150, 243, 0.3);
}

.cliente-acceso-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #ffffff;
}

/* Mostrar tooltip al hover sobre el trigger */
.cliente-acceso-tooltip-trigger:hover ~ .cliente-acceso-tooltip:not(.tooltip-cerrado),
.hito-estado-visibilidad:hover .cliente-acceso-tooltip:not(.tooltip-cerrado) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mantener tooltip abierto cuando tiene la clase tooltip-abierto */
.cliente-acceso-tooltip.tooltip-abierto {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.tooltip-content {
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(26, 23, 68, 0.75);
}

.tooltip-content code {
    font-family: 'Courier New', monospace;
    background: transparent;
    padding: 0;
}

.tooltip-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(26, 23, 68, 0.6);
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.tooltip-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(26, 23, 68, 0.9);
}

.tooltip-close span {
    display: block;
}

/* Tooltip de validación para avances */
.avance-tooltip-validacion {
    border-color: rgba(220, 53, 69, 0.3) !important;
}

.avance-tooltip-validacion::before {
    border-top-color: rgba(220, 53, 69, 0.3) !important;
}

.avance-tooltip-validacion .tooltip-header {
    border-bottom-color: rgba(220, 53, 69, 0.15);
}

.avance-tooltip-validacion .tooltip-header strong {
    color: #dc3545;
}

/* Asegurar que el contenedor de botones tenga posición relativa para el tooltip */
.hito-acciones {
    position: relative;
    font-weight: 300;
}

.hito-equipo-responsable {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hito-equipo-responsable label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-weight: 600;
    color: rgba(26, 23, 68, 0.75);
}

.hito-select {
    border: 1px solid rgba(26, 23, 68, 0.15);
    border-radius: 12px;
    padding: 0.45rem 0.85rem;
    font-size: 0.95rem;
    color: rgba(26, 23, 68, 0.85);
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hito-select:focus {
    border-color: rgba(90, 78, 222, 0.65);
    box-shadow: 0 0 0 3px rgba(90, 78, 222, 0.18);
    outline: none;
}

.hito-equipo-contenedor {
    margin-top: 1rem;
}

.hito-equipo-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hito-equipo-integrante {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(26, 23, 68, 0.08);
    background: rgba(90, 78, 222, 0.06);
}

.hito-equipo-identidad {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hito-equipo-nombre {
    font-weight: 600;
    color: rgba(26, 23, 68, 0.9);
}

.hito-equipo-rol {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(26, 23, 68, 0.6);
}

.hito-equipo-correo {
    font-size: 0.82rem;
    color: rgba(26, 23, 68, 0.65);
}

.hito-equipo-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.hito-equipo-acciones .btn {
    flex: 0 0 auto;
}

.hito-equipo-acciones-item {
    display: flex;
    align-items: center;
}

.hito-equipo-busqueda {
    flex: 1 1 260px;
    min-width: 220px;
}

.hito-equipo-remover {
    font-size: 0.8rem;
    color: rgba(162, 16, 137, 0.85);
}

.hito-equipo-remover:hover {
    text-decoration: underline;
}

.hito-equipo-vacio {
    border: 1px dashed rgba(26, 23, 68, 0.18);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    color: rgba(26, 23, 68, 0.65);
    background: rgba(26, 23, 68, 0.04);
}

.hito-avances-muro {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hito-avances-card {
    border: 1px solid rgba(26, 23, 68, 0.1);
    border-radius: 14px;
    padding: 0.9rem 1.05rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px rgba(17, 25, 40, 0.05);
}

.hito-avances-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(26, 23, 68, 0.6);
    margin-bottom: 0.4rem;
}

.hito-avances-meta time {
    font-weight: 600;
    color: rgba(26, 23, 68, 0.8);
}

.hito-avances-texto {
    margin: 0;
    color: rgba(26, 23, 68, 0.85);
    line-height: 1.45;
}

.hito-avances-vacio {
    text-align: center;
    padding: 1rem;
    border-radius: 14px;
    border: 1px dashed rgba(26, 23, 68, 0.18);
    color: rgba(26, 23, 68, 0.6);
    background: rgba(90, 78, 222, 0.06);
}

.hito-avances-aviso {
    margin: 0;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.18);
    color: #8a6300;
    font-size: 0.85rem;
}

.hito-textarea-bloqueada {
    background: rgba(26, 23, 68, 0.05);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.hito-equipo-responsable .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}

.btn.btn-primario.btn-pendiente {
    box-shadow: 0 10px 24px rgba(162, 16, 137, 0.24);
}

.hito-textarea {
    width: 100%;
    min-height: 200px;
    border: 1px solid rgba(26, 23, 68, 0.12);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hito-textarea:focus {
    border-color: rgba(90, 78, 222, 0.65);
    box-shadow: 0 0 0 3px rgba(90, 78, 222, 0.18);
    outline: none;
}

.hito-textarea[disabled],
.hito-textarea[readonly] {
    background: rgba(26, 23, 68, 0.05);
    cursor: not-allowed;
    opacity: 0.7;
}

.hito-bloqueado-aviso {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #8a6300;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 1rem;
}

.hito-bloqueado-aviso p {
    margin: 0;
}

.hito-cierre {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(26, 23, 68, 0.1);
}

.hito-cierre-aviso {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(26, 23, 68, 0.05);
    color: rgba(26, 23, 68, 0.7);
    font-size: 0.875rem;
    line-height: 1.5;
}

.hito-error-traza details {
    margin-top: 1rem;
}

.hito-error-traza details summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.hito-error-traza details summary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.hito-error-traza details pre {
    margin: 0;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.4;
}

.hito-equipo-responsable {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hito-equipo-asignar {
    border: 1px solid rgba(90, 78, 222, 0.45);
    background: rgba(90, 78, 222, 0.09);
    color: rgba(26, 23, 68, 0.85);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hito-equipo-asignar:hover {
    background: rgba(90, 78, 222, 0.18);
    border-color: rgba(90, 78, 222, 0.7);
}

.hito-equipo-responsable-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 180, 141, 0.18);
    color: #006b55;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Estilos para Hito 2: Recolección */
.recoleccion-estadisticas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.recoleccion-estadistica {
    text-align: center;
    padding: 1.5rem;
    background: rgba(90, 78, 222, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(90, 78, 222, 0.15);
}

.recoleccion-estadistica-valor {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-morado-base);
    margin-bottom: 0.5rem;
}

.recoleccion-estadistica-etiqueta {
    display: block;
    font-size: 0.875rem;
    color: rgba(26, 23, 68, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recoleccion-estadistica-pendiente .recoleccion-estadistica-valor { color: #FFC107; }
.recoleccion-estadistica-aprobado .recoleccion-estadistica-valor { color: #00B48D; }
.recoleccion-estadistica-rechazado .recoleccion-estadistica-valor { color: #dc3545; }

.recoleccion-ultima-actividad {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(90, 78, 222, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

.recoleccion-filtros {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.recoleccion-lista-archivos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recoleccion-archivo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(26, 23, 68, 0.12);
    border-radius: 12px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.recoleccion-archivo-item:hover {
    box-shadow: 0 4px 12px rgba(90, 78, 222, 0.12);
    border-color: rgba(90, 78, 222, 0.3);
}

.recoleccion-archivo-info {
    flex: 1;
}

.recoleccion-archivo-nombre {
    display: block;
    font-weight: 600;
    color: var(--color-texto);
    margin-bottom: 0.5rem;
}

.recoleccion-archivo-meta {
    display: block;
    font-size: 0.875rem;
    color: rgba(26, 23, 68, 0.6);
}

.recoleccion-archivo-estado {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin: 0 1rem;
}

.recoleccion-archivo-acciones {
    display: flex;
    gap: 0.5rem;
}

.recoleccion-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recoleccion-badge-pendiente {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.recoleccion-badge-aprobado {
    background: rgba(0, 180, 141, 0.2);
    color: #006b55;
}

.recoleccion-badge-rechazado {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.recoleccion-validador {
    font-size: 0.75rem;
    color: rgba(26, 23, 68, 0.6);
}

.recoleccion-vacio {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(26, 23, 68, 0.5);
    font-style: italic;
}

.recoleccion-campos-texto {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recoleccion-campo-texto {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(26, 23, 68, 0.12);
    border-radius: 8px;
}

.recoleccion-campo-etiqueta {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-texto);
}

.recoleccion-campo-valor {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(90, 78, 222, 0.03);
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.recoleccion-campo-fecha {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgba(26, 23, 68, 0.5);
}

.recoleccion-actividad-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recoleccion-actividad-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-left: 3px solid var(--color-morado-base);
    border-radius: 8px;
}

.recoleccion-actividad-icono {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-morado-base);
    flex-shrink: 0;
}

.recoleccion-actividad-contenido {
    flex: 1;
}

.recoleccion-link-cliente {
    padding: 1rem;
    background: rgba(90, 78, 222, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.recoleccion-link-codigo {
    display: block;
    padding: 0.75rem;
    background: white;
    border: 1px solid rgba(26, 23, 68, 0.12);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
    word-break: break-all;
    margin: 0.5rem 0;
}

.recoleccion-notificacion {
    margin-top: 1rem;
}

.recoleccion-telefono-input {
    display: flex;
    align-items: center;
}

.recoleccion-telefono-prefijo {
    padding: 0.75rem 1rem;
    background: rgba(90, 78, 222, 0.1);
    border: 1px solid rgba(90, 78, 222, 0.3);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-weight: 600;
    color: var(--color-morado-base);
}

.recoleccion-telefono-input .hito-input {
    border-radius: 0 8px 8px 0;
}

.recoleccion-tipos-mensaje {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.recoleccion-mensaje-editable {
    margin-top: 1rem;
}

.recoleccion-canales {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.recoleccion-destinatario-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(90, 78, 222, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

.recoleccion-comentario-nuevo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recoleccion-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-contenido {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(26, 23, 68, 0.12);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-cerrar {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: rgba(26, 23, 68, 0.6);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-cerrar:hover {
    background: rgba(26, 23, 68, 0.1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(26, 23, 68, 0.12);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.hito-input-grupo {
    margin-bottom: 1.5rem;
}

.hito-input-grupo label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-texto);
}

.hito-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(26, 23, 68, 0.12);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hito-input:focus {
    outline: none;
    border-color: var(--color-morado-base);
    box-shadow: 0 0 0 3px rgba(90, 78, 222, 0.18);
}

.btn-block {
    width: 100%;
}

.btn-compacto {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Footer del sitio */
.site-footer {
    margin-top: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #5A4EDE 0%, #674295 100%);
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-text {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-text strong {
    font-weight: 600;
    color: #ffffff;
}

.footer-version {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.footer-link svg {
    flex-shrink: 0;
    fill: currentColor;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .footer-link {
        width: 100%;
        justify-content: center;
    }
}

/* Acceso cliente al Viaje - Modal y controles */
.proyecto-acciones-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.acceso-cliente-explicacion {
    margin-bottom: 1.5rem;
}

.acceso-cliente-explicacion ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.acceso-cliente-explicacion li {
    margin: 0.5rem 0;
}

.acceso-cliente-token {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(90, 78, 222, 0.1);
    border-radius: 0.5rem;
}

.acceso-cliente-token label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-texto);
}

.token-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.token-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--color-borde);
    border-radius: 0.375rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background: #ffffff;
}

.token-link-info {
    font-size: 0.875rem;
    color: var(--color-texto);
    word-break: break-all;
    margin-top: 0.5rem;
}

.acceso-cliente-notificaciones {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-borde);
}

.notificaciones-opciones {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.notificaciones-feedback {
    margin-top: 1rem;
}

.notificaciones-feedback .alerta {
    margin: 0;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

/* Página pública del cliente */
.cliente-viaje-contenido {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: var(--color-fondo);
    width: 100%;
}

@media (max-width: 768px) {
    .cliente-viaje-contenido {
        padding: 1rem 0.75rem;
    }
}

.cliente-viaje-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-borde);
}

.cliente-viaje-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cliente-viaje-logo h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--color-morado-base);
}

.cliente-viaje-proyecto h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--color-texto);
}

.cliente-viaje-contrato {
    margin: 0;
    color: rgba(31, 37, 50, 0.7);
    font-size: 0.95rem;
}

.cliente-viaje-timeline,
.cliente-viaje-actividades,
.cliente-viaje-comunicaciones {
    margin-bottom: 2.5rem;
}

.cliente-viaje-timeline h3,
.cliente-viaje-actividades h3,
.cliente-viaje-comunicaciones h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.25rem;
    color: var(--color-texto);
    font-weight: 600;
}

.cliente-viaje-vacio {
    color: rgba(31, 37, 50, 0.6);
    font-style: italic;
    padding: 2rem;
    text-align: center;
    background: rgba(90, 78, 222, 0.05);
    border-radius: 0.5rem;
}

.cliente-viaje-hitos {
    position: relative;
    padding-left: 2rem;
}

.cliente-viaje-hitos::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-borde);
}

.cliente-viaje-hito {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.cliente-viaje-hito-marcador {
    position: absolute;
    left: -1.25rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--color-morado-base);
    border: 3px solid var(--color-fondo);
    z-index: 1;
}

.cliente-viaje-hito.completado .cliente-viaje-hito-marcador {
    background: var(--color-bexen-medical-green, #00B48D);
}

.cliente-viaje-hito-contenido {
    background: #ffffff;
    border: 1px solid var(--color-borde);
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cliente-viaje-hito-contenido h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--color-texto);
}

.cliente-viaje-hito-fecha {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: rgba(31, 37, 50, 0.7);
}

.cliente-viaje-hito-mensajes {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(26, 23, 68, 0.1);
}

.cliente-viaje-hito-mensajes h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2532;
    margin: 0 0 1rem 0;
}

.cliente-viaje-mensaje {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 3px solid #A21089;
}

.cliente-viaje-mensaje:last-child {
    margin-bottom: 0;
}

.cliente-viaje-mensaje-asunto {
    display: block;
    font-size: 0.95rem;
    color: #1F2532;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cliente-viaje-mensaje-texto {
    font-size: 0.9rem;
    color: #1F2532;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.cliente-viaje-mensaje-fecha {
    font-size: 0.8rem;
    color: #999;
}

.cliente-viaje-hito-descripcion {
    margin: 0.75rem 0 0 0;
    color: var(--color-texto);
    line-height: 1.6;
}

.cliente-viaje-actividades-lista,
.cliente-viaje-comunicaciones-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cliente-viaje-actividad,
.cliente-viaje-comunicacion {
    background: #ffffff;
    border: 1px solid var(--color-borde);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    gap: 1rem;
}

.cliente-viaje-actividad-icono {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cliente-viaje-actividad-contenido {
    flex: 1;
}

.cliente-viaje-actividad-tipo {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--color-texto);
}

.cliente-viaje-actividad-hito,
.cliente-viaje-actividad-detalle {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: rgba(31, 37, 50, 0.7);
}

.cliente-viaje-actividad-fecha {
    margin: 0.5rem 0 0 0;
    font-size: 0.75rem;
    color: rgba(31, 37, 50, 0.6);
}

.cliente-viaje-comunicacion {
    flex-direction: column;
}

.cliente-viaje-comunicacion-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: baseline;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-borde);
}

.cliente-viaje-comunicacion-header h4 {
    margin: 0;
    flex: 1;
    min-width: 200px;
    font-size: 1rem;
    color: var(--color-texto);
}

.cliente-viaje-comunicacion-hito,
.cliente-viaje-comunicacion-fecha {
    font-size: 0.875rem;
    color: rgba(31, 37, 50, 0.7);
}

.cliente-viaje-comunicacion-mensaje {
    color: var(--color-texto);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Estilos de scrollbar para modal-body */
.modal-card .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-card .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-card .modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.modal-card .modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.modal-card .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Estilos para formularios de notificación */
.notificacion-email-form,
.notificacion-sms-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Estilos para búsqueda de usuarios */
.buscar-usuarios-resultados {
    position: fixed;
    background: #ffffff;
    border: 1px solid rgba(26, 23, 68, 0.12);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    margin-top: 0.25rem;
    display: none;
    min-width: 300px;
}

.buscar-usuarios-resultados.visible {
    display: block;
}

.buscar-usuarios-resultados:empty {
    display: none;
}

.usuario-resultado-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(26, 23, 68, 0.08);
    transition: background-color 0.2s ease;
}

.usuario-resultado-item:last-child {
    border-bottom: none;
}

.usuario-resultado-item:hover {
    background-color: rgba(90, 78, 222, 0.08);
}

.usuario-resultado-item.seleccionado {
    background-color: rgba(90, 78, 222, 0.15);
}

.usuario-resultado-nombre {
    font-weight: 600;
    color: rgba(26, 23, 68, 0.9);
    margin-bottom: 0.25rem;
}

.usuario-resultado-detalle {
    font-size: 0.875rem;
    color: rgba(26, 23, 68, 0.6);
}

.usuario-seleccionado-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(26, 23, 68, 0.12);
}

.usuario-seleccionado-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(90, 78, 222, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(90, 78, 222, 0.2);
}

.usuario-seleccionado-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.usuario-seleccionado-info strong {
    color: rgba(26, 23, 68, 0.9);
    font-weight: 600;
}

.usuario-seleccionado-detalle {
    font-size: 0.875rem;
    color: rgba(26, 23, 68, 0.6);
}

.modal-descripcion {
    margin-bottom: 1.5rem;
    color: rgba(26, 23, 68, 0.7);
    font-size: 0.95rem;
}

/* Estilos para página de configuraciones */
.configuraciones-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.configuraciones-tabs {
    display: flex;
    border-bottom: 2px solid rgba(26, 23, 68, 0.1);
    background: #f8f9fa;
}

.configuraciones-tab {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(26, 23, 68, 0.6);
    transition: all 0.2s ease;
    font-family: 'Poppins', Arial, sans-serif;
}

.configuraciones-tab:hover {
    color: rgba(26, 23, 68, 0.9);
    background: rgba(90, 78, 222, 0.05);
}

.configuraciones-tab.active {
    color: #5A4EDE;
    border-bottom-color: #5A4EDE;
    background: #ffffff;
}

.configuraciones-content {
    padding: 2rem;
}

.configuraciones-tab-content {
    display: none;
}

.configuraciones-tab-content.active {
    display: block;
}

.configuraciones-seccion h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #1F2532;
    font-size: 1.5rem;
    font-weight: 600;
}

.configuraciones-descripcion {
    margin-bottom: 2rem;
    color: rgba(26, 23, 68, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
}

.configuraciones-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.configuraciones-acciones {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(26, 23, 68, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: rgba(26, 23, 68, 0.9);
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #5A4EDE;
}

/* Estilos para debug de correo */
#correo-debug-content {
    line-height: 1.6;
}

#correo-debug-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

#correo-debug-content strong {
    font-weight: 600;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--color-texto);
    font-size: 0.95rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-borde);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-texto);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-boton-principal);
    box-shadow: 0 0 0 3px rgba(162, 16, 137, 0.1);
}

.form-control[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.form-text {
    font-size: 0.85rem;
    color: rgba(31, 37, 50, 0.6);
    margin-top: 0.25rem;
}

.notificacion-mensaje-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notificacion-mensaje-preview label {
    font-weight: 600;
    color: var(--color-texto);
    font-size: 0.95rem;
}

.mensaje-preview-box {
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid var(--color-borde);
    border-radius: 8px;
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: var(--color-texto);
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

.sms-contador-caracteres {
    text-align: right;
    font-size: 0.85rem;
    color: rgba(31, 37, 50, 0.6);
    margin-top: 0.25rem;
}

.sms-contador-caracteres span {
    font-weight: 600;
}

.notificacion-opciones-guardar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(162, 16, 137, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(162, 16, 137, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 0.9rem;
    color: var(--color-texto);
    line-height: 1.5;
}

.checkbox-label:hover span {
    color: var(--color-boton-principal);
}

/* Estilos para modal de proyecto creado */
.proyecto-creado-contenido {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nueva-cuenta-info {
    padding: 1rem;
    background: rgba(162, 16, 137, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(162, 16, 137, 0.15);
}

.nueva-cuenta-info p {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--color-texto);
}

.avisos-info {
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.avisos-info p {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--color-texto);
}

.avisos-info ul {
    margin: 0;
    padding-left: 1.5rem;
    color: rgba(31, 37, 50, 0.75);
}

.avisos-info li {
    margin-bottom: 0.5rem;
}

/* Estilos para recomendación de tipo de proyecto */
.recomendacion-tipo-proyecto {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(162, 16, 137, 0.1) 0%, rgba(90, 78, 222, 0.1) 100%);
    border: 2px solid rgba(162, 16, 137, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(162, 16, 137, 0.15);
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recomendacion-contenido {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recomendacion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recomendacion-icono {
    font-size: 1.5rem;
    line-height: 1;
}

.recomendacion-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-boton-principal);
}

.recomendacion-mensaje {
    margin: 0;
    color: var(--color-texto);
    line-height: 1.6;
    font-size: 0.95rem;
}

.recomendacion-acciones {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Modal de carga al consultar contrato */
.modal-carga-contrato {
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-carga {
    max-width: 320px;
    width: 100%;
    padding: 2.5rem 2rem;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.carga-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.spinner-carga {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-svg {
    width: 100%;
    height: 100%;
    animation: spinner-rotate 1.4s linear infinite;
}

.spinner-path {
    stroke: var(--color-boton-principal, #A21089);
    stroke-linecap: round;
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    animation: spinner-dash 1.4s ease-in-out infinite;
}

@keyframes spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinner-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.carga-mensaje {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-texto);
}

.carga-submensaje {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(31, 37, 50, 0.65);
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }

    .modal-card-grande {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
    }

    .cliente-viaje-contenido {
        padding: 1.5rem 1rem;
    }

    .cliente-viaje-hitos {
        padding-left: 1.5rem;
    }

    .cliente-viaje-hito {
        padding-left: 1.5rem;
    }

    .cliente-viaje-hito-marcador {
        left: -1rem;
    }

    .notificaciones-opciones {
        flex-direction: column;
    }

    .notificaciones-opciones button {
        width: 100%;
    }
}

/* ============================================
   SWITCH TOGGLE COMPONENT
   ============================================ */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: #4CAF50;
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.acceso-cliente-visibilidad {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LÍNEA DE TIEMPO CLIENTE (TRACKING)
   ============================================ */
.cliente-timeline {
    margin: 1.5rem auto 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: 1200px;
}

.cliente-timeline-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.cliente-timeline-titulo {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1F2532;
    margin: 0;
}

.cliente-timeline-progreso {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #f8f4ff 0%, #fff 100%);
    border-radius: 8px;
    border: 2px solid #A21089;
}

.cliente-timeline-porcentaje {
    font-size: 2rem;
    font-weight: 700;
    color: #A21089;
    line-height: 1;
}

.cliente-timeline-texto {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.2;
}

.cliente-timeline-contenedor {
    position: relative;
    padding: 2rem 0;
}

.cliente-timeline-linea {
    position: relative;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    margin: 0 60px;
}

.cliente-timeline-linea-progreso {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #A21089 0%, #5A4EDE 100%);
    border-radius: 2px;
    transition: width 1s ease-in-out;
    box-shadow: 0 2px 6px rgba(162, 16, 137, 0.3);
}

.cliente-timeline-etiquetas {
    display: none;
}

.cliente-timeline-hitos {
    position: absolute;
    top: 0;
    left: 60px;
    right: 60px;
    height: 100%;
}

.cliente-timeline-hito {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.cliente-timeline-hito:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.cliente-timeline-hito-clickeable {
    cursor: pointer;
}

.cliente-timeline-hito-clickeable:hover .cliente-timeline-hito-circulo {
    box-shadow: 0 4px 16px rgba(162, 16, 137, 0.6);
    transform: scale(1.15);
    border-width: 5px;
}

.cliente-timeline-hito-clickeable:active .cliente-timeline-hito-circulo {
    transform: scale(0.95);
}

.cliente-timeline-hito-circulo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 3px solid #A21089;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #A21089;
    box-shadow: 0 2px 8px rgba(162, 16, 137, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.cliente-timeline-hito.completado .cliente-timeline-hito-circulo {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.cliente-timeline-hito.completado .cliente-timeline-hito-circulo::before {
    content: '✓';
    font-size: 0.9rem;
}

.cliente-timeline-hito:hover .cliente-timeline-hito-circulo {
    box-shadow: 0 4px 12px rgba(162, 16, 137, 0.5);
}

.cliente-timeline-hito-nombre {
    position: absolute;
    top: 40px;
    white-space: normal;
    font-size: 0.8rem;
    color: #666;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    max-width: 220px;
    text-align: center;
    z-index: 10;
    line-height: 1.4;
}

.cliente-timeline-hito:hover .cliente-timeline-hito-nombre {
    opacity: 1;
}

.cliente-timeline-hito-clickeable .cliente-timeline-hito-nombre {
    border: 2px solid #A21089;
}

/* Ajustes para pantallas grandes */
@media (min-width: 1200px) {
    .cliente-timeline {
        padding: 2.5rem;
    }
    
    .cliente-timeline-header {
        gap: 2.5rem;
    }
    
    .cliente-timeline-titulo {
        font-size: 1.25rem;
    }
    
    .cliente-timeline-porcentaje {
        font-size: 2.25rem;
    }
    
    .cliente-timeline-progreso {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .cliente-timeline {
        padding: 1.5rem;
    }
    
    .cliente-timeline-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    
    .cliente-timeline-titulo {
        font-size: 1.25rem;
    }
    
    .cliente-timeline-progreso {
        padding: 1rem 1.5rem;
        justify-self: stretch;
    }
    
    .cliente-timeline-linea {
        margin: 0 40px;
    }
    
    .cliente-timeline-hitos {
        left: 40px;
        right: 40px;
    }
    
    .cliente-timeline-etiquetas {
        padding: 0 20px;
        font-size: 0.85rem;
    }
    
    .cliente-timeline-hito-circulo {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
        border-width: 3px;
    }
    
    .cliente-timeline-porcentaje {
        font-size: 2.5rem;
    }
}

