/* Fuentes */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Roboto:wght@300;400;500&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

:root {
    --primary-color: #D42C28;
    --primary-light: #F7CACB;
    --secondary-color: #2C3E4F;
    --accent-color: #5BC0DE;
    --success-color: #14D118;
    --warning-color: #FFEB67;
    --danger-color: #D9534F;
    --light-gray: #ECF0F1;
    --medium-gray: #BDC3C7;
    --dark-gray: #7F8C8D;
    --text-color: #333333;
    --border-radius: 6px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.msginfo{
	background-color: var(--warning-color);
	margin:10px 20px;
	padding: 10px;
	color: var(--accent-color:);
	border-radius: 10px;
}
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #F9F9F9;
    margin: 0;
    padding: 0;
}

/* Contenedor del formulario */
.form-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px 30px 100px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Encabezado del formulario */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Barra de progreso */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.form-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--medium-gray);
    z-index: 1;
    transform: translateY(-50%);
}

.progress-step {
    position: relative;
    z-index: 2;
    background: var(--medium-gray);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: var(--transition);	
	text-shadow: 1px 1px 1px var(--medium-gray);
}

.progress-step.active {
    background: var(--primary-color);
    transform: scale(1.1);
	text-shadow: 1px 1px 1px var(--primary-color);
}

.progress-step::after {
    content: attr(data-step);
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: normal;
    color: var(--dark-gray);
    white-space: nowrap;
}

.progress-step.active::after {
    color: var(--primary-color);
    font-weight: 600;
}

/* Secciones del formulario */
.form-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-section.active {
    display: block;
}

.section-title {
    color: var(--secondary-color);
    font-size: 20px;
    margin: 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Etiquetas */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Inputs y selects */
.form-input, .form-select select, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-input:focus, .form-select select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input.error, .form-select select.error {
    border-color: var(--danger-color);
}

.form-select {
    position: relative;
}

.form-select select {
    appearance: none;
    padding-right: 40px;
}

.select-arrow {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--dark-gray);
}

/* Textarea */
.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox personalizado */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 10px;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    margin-right: 10px;
    transition: var(--transition);
}

.checkbox-label:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark::after {
    display: block;
}

/* Interruptor de toggle */
.toggle-switch {
    display: flex;
    background: var(--light-gray);
    border-radius: 20px;
    padding: 3px;
    width: fit-content;
}

.toggle-switch input {
    display: none;
}

.toggle-switch label {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.toggle-switch input:checked + label {
    background: var(--primary-color);
    color: white;
}

/* Subida de archivos */
.upload-box {
    margin-bottom: 15px;
}

.upload-label {
   /* display: flex;
    align-items: center;*/
    padding: 15px;
    border: 2px dashed var(--medium-gray);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(212, 44, 40, 0.05);
}

.upload-label i {
    font-size: 10px;
    color: var(--primary-color);
    margin-right: 15px;
}

.upload-label span {
    font-weight: 600;
}

.upload-label input[type="file"] {
    display: none;
}

/* Estilos para vista previa */
.upload-preview {
    position: relative;
    margin-top: 10px;
    min-height: 150px;
    border: 2px dashed var(--medium-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-thumbnail {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.remove-preview:hover {
    opacity: 1;
    transform: scale(1.1);
}

.remove-preview i {
    font-size: 12px;
}

.pdf-preview {
    text-align: center;
    padding: 20px;
}

.pdf-preview i {
    font-size: 50px;
    color: var(--danger-color);
    display: block;
    margin-bottom: 10px;
}

.pdf-preview span {
    font-size: 12px;
    color: var(--dark-gray);
    word-break: break-word;
    max-width: 100%;
    display: inline-block;
}
/* Pestañas */
.form-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.form-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-gray);
    transition: var(--transition);
}

.form-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.form-tab:hover:not(.active) {
    color: var(--secondary-color);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.next-btn, .submit-btn {
    background: var(--primary-color);
    color: white;
}

.next-btn:hover, .submit-btn:hover {
    background: #B32420;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 44, 40, 0.3);
}

.prev-btn {
    background: var(--light-gray);
    color: var(--secondary-color);
}

.prev-btn:hover {
    background: #D5DADD;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(189, 195, 199, 0.3);
}

/* Navegación del formulario */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

/* Alertas */
.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
    font-size: 18px;
}

.alert-info {
    background: rgba(91, 192, 222, 0.2);
    color: #31708F;
    border-left: 4px solid var(--accent-color);
}

/* Mensajes de ayuda */
.form-hint {
    font-size: 13px;
    color: var(--dark-gray);
    margin-top: 5px;
}

.form-error {
    font-size: 13px;
    color: var(--danger-color);
    margin-top: 5px;
    display: block;
}
/* Estilos para campos de RUC */
#ruc-field-group {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(247, 202, 203, 0.2);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

/* Estilos para inputs con error */
.form-input.error {
    border-color: var(--danger-color);
    background-color: rgba(217, 83, 79, 0.1);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.3);
}

/* Estilos para mensajes de error */
.form-error {
    color: var(--danger-color);
    font-size: 13px;
    margin-top: 5px;
    display: block;
}
/* Estilos para sección de empresa */
#empresa-fields, #empresa-docs {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(91, 192, 222, 0.1);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

#empresa-docs {
    margin-top: 10px;
    background-color: rgba(247, 202, 203, 0.1);
    border-left-color: var(--primary-color);
}

/* Estilos para títulos de sección */
.section-title {
    color: var(--secondary-color);
    font-size: 20px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}
.toggle-switch {
    display: flex;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 3px;
    width: fit-content;
}

.toggle-switch input[type="radio"] {
    display: none;
}

.toggle-switch label {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.toggle-switch input[type="radio"]:checked + label {
    background: #D42C28;
    color: white;
}

/*Header*/
header{
	top:-0px;
	height: 40px;
	padding: 10px;
	border-bottom: solid 1px #2c3E4F;
	background-color: #ECF0F1;
	width: 100%;
	position: fixed;
	z-index: 0;
}
main{
	margin-top: 40px;
	min-height: 75vh;
	padding:20px;
}
.logo{
	float:left;
}
/*Tiempos*/
#tiempos{
	float: right;
	position: fixed;
	top:80px;
	right: 10px;
	border-radius: 10px;
	min-width: 100px;
	background-color: rgba(213,213,213,0.50);
	padding: 5px;
	font-size: 8px;
	z-index: 323333;
}
#tiempos h2{
	font-size: 10px;
}
/* Footer general*/
footer{
	border-top: solid 1px #2c3E4F;	
	color: #ECF0F1;
	bottom: 0px;
	width: 100%;
	height: 150px;
	text-align: center;
	background-color: #2c3E4F;	
	padding-top: 15px;
}
footer a{
	text-decoration: none;
	color: #ECF0F1;
}
footer #redes{
	width: 40%;
	float: left;
	margin-left: 40px;
}
footer #direc{
	width: 40%;
	float: right;
	margin-left: 40px;
	font-size: 14px;
}
footer #pie{
	clear: both;
	width: 100%;
	font-size: 12px;
}
footer i{
	color:#ECF0F1;
	font-size: 25px;
	margin: 8px;	
}

footer i:hover{
	color:#d42c28;		
}

footer h2{
	font-size: 28px;
	margin:0px;
}
/* Estilos para el área de subida de archivos (upload-box) */
.upload-box {
    border: 2px dashed var(--medium-gray); /* Borde punteado por defecto */
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    background-color: var(--light-gray);
    position: relative; /* Para posicionar el preview y botón de eliminar */
}

.upload-box:hover {
    border-color: var(--accent-color);
    background-color: #e0e7ee;
}

/* Estilo para la zona de drag-and-drop cuando un archivo está sobre ella */
.upload-box.highlight {
    border-color: var(--primary-color); /* Color de resaltado */
    background-color: var(--primary-light); /* Fondo suave */
    box-shadow: 0 0 15px rgba(212, 44, 40, 0.3); /* Sombra suave */
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px; /* Asegura un mínimo de altura para el área de drop */
    color: var(--dark-gray);
    font-weight: 600;
    cursor: pointer;
}

.upload-label i {
    font-size: 3em;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.upload-label span {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
}

/* Ocultar el input de archivo original */
.upload-box input[type="file"] {
    display: none;
}

.upload-preview {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.upload-thumbnail {
    max-width: 100%;
    max-height: 150px;
    border-radius: var(--border-radius);
    object-fit: contain;
    border: 1px solid var(--medium-gray);
}

.pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #fff;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 200px; /* Ancho máximo para el preview de PDF */
}

.pdf-preview i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.pdf-preview span {
    font-size: 0.9em;
    text-align: center;
    word-break: break-all;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 1; /* Para centrar el ícono */
    padding: 0;
}

.remove-preview:hover {
    background-color: #a02020;
}
/* Estilo base del enlace */
.policy-link {
    color: #2980b9; /* Color azul de tu tema */
    text-decoration: none;
    font-weight: 600; /* Un poco más grueso para resaltar */
    position: relative;
    transition: color 0.3s ease;
    display: inline-block;
}

/* Color al pasar el cursor */
.policy-link:hover {
    color: #1a5276; /* Un azul más oscuro */
}

/* La magia de la animación (la línea debajo) */
.policy-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0); /* Inicialmente invisible */
    height: 2px;
    bottom: -2px; /* Separación del texto */
    left: 0;
    background-color: #1a5276;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

/* Expande la línea al hacer hover */
.policy-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        margin: 20px 20px 50px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-progress::before {
        display: none;
    }
    
    .progress-step::after {
        display: none;
    }
    
    .form-navigation {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .prev-btn, .next-btn, .submit-btn {
        width: 100%;
    }
}


#tiempos.tiempos-card{
  position: fixed;
  top: 90px;
  right: 14px;
  width: 260px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 323333;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #1f2937;
  overflow: hidden;
}

/* Header */
#tiempos .tiempos-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.00));
}

#tiempos .tiempos-title strong{
  display: block;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

#tiempos .tiempos-title small{
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.75;
}

/* Botón minimizar */
#tiempos .tiempos-btn{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 120ms ease, background 120ms ease;
}
#tiempos .tiempos-btn:hover{
  transform: scale(1.03);
  background: rgba(255,255,255,1);
}
#tiempos .tiempos-btn:active{
  transform: scale(0.98);
}

/* Body */
#tiempos .tiempos-body{
  padding: 8px 10px 10px 10px;
}

/* Tabla elegante */
#tiempos .tiempos-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
#tiempos .tiempos-table thead th{
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  opacity: 0.75;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
#tiempos .tiempos-table tbody td{
  padding: 8px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
#tiempos .tiempos-table tbody tr:last-child td{
  border-bottom: none;
}

/* “Chip” para promedio */
#tiempos .chip{
  font-weight: 700;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12); /* verde suave */
  padding: 6px 8px;
  display: inline-block;
}

/* Nota */
#tiempos .tiempos-note{
  margin-top: 8px;
  font-size: 10px;
  opacity: 0.7;
}

/* Estado minimizado: se queda “chiquito” */
#tiempos[data-state="min"]{
  width: 190px;
}
#tiempos[data-state="min"] .tiempos-body{
  display: none;
}
#tiempos[data-state="min"] .tiempos-title small{
  display: none;
}