﻿/* Reset y estilos base */
* {
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	line-height: 1.6;
	color: #333;
	background-color: #f8f9fa;
	margin: 0;
	padding: 20px;
}

/* Contenedor principal */
form {
	max-width: 800px;
	margin: 0 auto;
	background: white;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Títulos */
h1 {
	color: #2c3e50;
	text-align: center;
	margin-bottom: 30px;
	font-size: 2.2em;
	font-weight: 300;
}

h6 {
	color: #34495e;
	font-size: 1.1em;
	font-weight: 600;
	margin: 25px 0 15px 0;
	padding-bottom: 8px;
	border-bottom: 2px solid #3498db;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Campos de formulario */
label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	color: #555;
}

input[type="text"], 
input[type="email"], 
select, 
input[type="file"] {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid #e1e8ed;
	border-radius: 8px;
	font-size: 14px;
	transition: all 0.3s ease;
	background-color: #fff;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
select:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Checkboxes */
input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	accent-color: #3498db;
}

/* Contenedores de campos */
div[id$="_slot"] {
	margin-bottom: 20px;
}

/* Botón de envío */
input[type="submit"] {
	background: linear-gradient(135deg, #3498db, #2980b9);
	color: white;
	padding: 18px 30px;
	border: none;
	border-radius: 8px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	margin-top: 20px;
	width: 100%;
}

input[type="submit"]:hover:not(:disabled) {
	background: linear-gradient(135deg, #2980b9, #1f5f8b);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

input[type="submit"]:active:not(:disabled) {
	transform: translateY(0);
}

/* Estilos para botón desactivado */
input[type="submit"]:disabled {
	background: linear-gradient(135deg, #95a5a6, #7f8c8d);
	color: #ecf0f1;
	cursor: not-allowed;
	opacity: 0.6;
	transform: none;
	box-shadow: none;
}

input[type="submit"]:disabled:hover {
	background: linear-gradient(135deg, #95a5a6, #7f8c8d);
	transform: none;
	box-shadow: none;
}

/* Mensajes de error */
div[style*="background-color: yellow"] {
	background-color: #fff3cd !important;
	border: 1px solid #ffeaa7;
	color: #856404;
	padding: 12px 15px;
	border-radius: 8px;
	margin-bottom: 15px;
}

/* Mensajes de impedimento */
div[style*="background-color: yellow"]:has(strong) {
	background: linear-gradient(135deg, #dc3545, #c82333) !important;
	color: white !important;
	border: 2px solid #dc3545 !important;
	padding: 15px 20px !important;
	border-radius: 10px !important;
	margin-bottom: 20px !important;
	box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
	font-weight: 600 !important;
	text-align: center !important;
}

div[style*="background-color: yellow"]:has(strong) strong {
	color: #ffeb3b !important;
	text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

/* Estados de campos RNC */
.rnc-buscando {
	background-color: #fff3cd !important;
	border-color: #ffc107 !important;
}

.rnc-encontrado {
	background-color: #d4edda !important;
	border-color: #28a745 !important;
}

.rnc-error {
	background-color: #f8d7da !important;
	border-color: #dc3545 !important;
}

.rnc-conflicto {
	background-color: #ffeaa7 !important;
	border-color: #e17055 !important;
}

/* Tabla de disponibilidad de chasis */
.tabla-disponibilidad-container {
	max-width: 800px;
	margin: 20px auto;
	background: white;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tabla-disponibilidad-chassis {
	width: 100%;
	border-collapse: collapse;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tabla-disponibilidad-chassis thead tr:first-child th {
	background: linear-gradient(135deg, #3498db, #2980b9);
	color: white;
	padding: 15px;
	font-size: 1.2em;
	font-weight: 600;
	text-align: center;
	border: none;
}

.tabla-disponibilidad-chassis thead tr:nth-child(2) th {
	background-color: #34495e;
	color: white;
	padding: 12px;
	font-size: 0.95em;
	font-weight: 600;
	text-align: center;
	border: none;
}

.tabla-disponibilidad-chassis tbody tr {
	transition: all 0.3s ease;
	border-bottom: 1px solid #e1e8ed;
}

.tabla-disponibilidad-chassis tbody tr:hover {
	background-color: #f8f9fa;
	transform: scale(1.01);
}

.tabla-disponibilidad-chassis tbody tr:last-child {
	border-bottom: none;
}

.tabla-disponibilidad-chassis td {
	padding: 12px 15px;
	text-align: center;
	color: #555;
	font-size: 14px;
}

.tabla-disponibilidad-chassis .color-chasis {
	font-weight: 600;
	color: white !important;
	text-align: left;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
	border-radius: 6px;
	margin: 2px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tabla-disponibilidad-chassis .badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
}

.tabla-disponibilidad-chassis .badge-si {
	background: linear-gradient(135deg, #28a745, #20c997);
	color: white;
	box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.tabla-disponibilidad-chassis .badge-no {
	background: linear-gradient(135deg, #6c757d, #5a6268);
	color: white;
	box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.tabla-disponibilidad-chassis .badge:hover {
	transform: scale(1.05);
}

/* Campos ocultos */
[hidden] {
	display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
	body {
		padding: 10px;
	}
	
	form {
		padding: 20px;
	}
	
	h1 {
		font-size: 1.8em;
	}
	
	.tabla-disponibilidad-container {
		padding: 15px;
	}
	
	.tabla-disponibilidad-chassis thead tr:first-child th {
		font-size: 1em;
		padding: 10px;
	}
	
	.tabla-disponibilidad-chassis thead tr:nth-child(2) th {
		font-size: 0.85em;
		padding: 8px;
	}
	
	.tabla-disponibilidad-chassis td {
		padding: 8px 10px;
		font-size: 12px;
	}
	
	.tabla-disponibilidad-chassis .badge {
		padding: 4px 8px;
		font-size: 10px;
	}
}

/* Animaciones */
.flash {
	animation: flash 0.5s ease-out;
	animation-iteration-count: 10;
}

@keyframes flash {
	0% { opacity: 0.5; }
	50% { opacity: 1.0; }
	100% { opacity: 0.5; }
}

/* Indicador de campo automático */
.campo-automatico::after {
	content: "";
	margin-left: 8px;
	font-size: 16px;
}

/* Estilos para campos readonly */
input[readonly] {
	background-color: #f8f9fa !important;
	color: #495057 !important;
	border-color: #28a745 !important;
}

input[readonly]:focus {
	box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Estilos para el modal de uso continuo */
.modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(5px);
}

.modal-content {
	background-color: #fefefe;
	margin: 5% auto;
	padding: 0;
	border-radius: 12px;
	width: 90%;
	max-width: 600px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.modal-header {
	background: linear-gradient(135deg, #ffc107, #ff9800);
	color: #212529;
	padding: 20px;
	border-radius: 12px 12px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-header h3 {
	margin: 0;
	font-size: 1.4em;
	font-weight: 600;
}

.close {
	color: #212529;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
}

.close:hover {
	color: #dc3545;
	transform: scale(1.1);
}

.modal-body {
	padding: 25px;
	max-height: 60vh;
	overflow-y: auto;
}

.conduce-details {
	background-color: #f8f9fa;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	padding: 15px;
	margin: 15px 0;
}

.conduce-details p {
	margin: 8px 0;
	font-size: 14px;
}

.warning-message {
	background-color: #fff3cd;
	border: 2px solid #ffeaa7;
	border-radius: 8px;
	padding: 15px;
	margin: 15px 0;
}

.warning-message p {
	margin: 0;
	color: #856404;
	font-weight: 500;
}

.modal-footer {
	padding: 20px;
	text-align: center;
	border-top: 1px solid #e9ecef;
	background-color: #f8f9fa;
	border-radius: 0 0 12px 12px;
}

.btn-confirm, .btn-cancel {
	padding: 12px 24px;
	margin: 0 10px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.btn-confirm {
	background: linear-gradient(135deg, #28a745, #20c997);
	color: white;
}

.btn-confirm:hover {
	background: linear-gradient(135deg, #218838, #1ea085);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-cancel {
	background: linear-gradient(135deg, #dc3545, #c82333);
	color: white;
}

.btn-cancel:hover {
	background: linear-gradient(135deg, #c82333, #a71e2a);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-only-close {
	background: linear-gradient(135deg, #6c757d, #5a6268) !important;
	color: white !important;
	width: 100% !important;
	margin: 0 !important;
}

.btn-only-close:hover {
	background: linear-gradient(135deg, #5a6268, #495057) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3) !important;
}

/* Estado de validación de uso continuo */
.uso-continuo-pendiente {
	border-color: #ffc107 !important;
	box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1) !important;
}

.uso-continuo-validado {
	border-color: #28a745 !important;
	box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.uso-continuo-error {
	border-color: #dc3545 !important;
	box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}
