/* Reset básico */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Segoe UI', Arial, sans-serif;
	background: linear-gradient(120deg, #f0f4f9 0%, #e0e7ef 100%);
	min-height: 100vh;
	color: #222;
}

.container {
	max-width: 520px;
	margin: 40px auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.08);
	padding: 32px 28px 24px 28px;
}

header {
	text-align: center;
	margin-bottom: 24px;
}

header h1 {
	font-size: 2rem;
	color: #2a5d9f;
	margin-bottom: 6px;
}

.fecha-actual {
	color: #4b6584;
	font-size: 1.1rem;
	margin-bottom: 0;
}

.form-group {
	margin-bottom: 18px;
}

.form-row {
	display: flex;
	gap: 16px;
}

.form-row .form-group {
	flex: 1;
	margin-bottom: 0;
}

label {
	display: block;
	font-weight: 500;
	margin-bottom: 6px;
	color: #2a5d9f;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #bfc9d1;
	border-radius: 6px;
	font-size: 1rem;
	background: #f8fafc;
	transition: border 0.2s;
}

input:focus, select:focus {
	border-color: #2a5d9f;
	outline: none;
}

.btn-submit, .btn-ubicacion, .btn-agregar-ref, .btn-reporteria, .btn-exportar {
	background: #2a5d9f;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
}

.btn-submit:hover, .btn-ubicacion:hover, .btn-agregar-ref:hover, .btn-reporteria:hover, .btn-exportar:hover {
	background: #1b3e6f;
}

.ubicacion-container {
	display: flex;
	gap: 8px;
}

.help-text {
	color: #7b8ca5;
	font-size: 0.95em;
	margin-top: 2px;
}

.referencias-container {
	display: flex;
	gap: 8px;
}

.referencias-lista {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.referencia-tag {
	background: #eaf1fb;
	color: #2a5d9f;
	border-radius: 16px;
	padding: 4px 12px 4px 8px;
	display: flex;
	align-items: center;
	font-size: 0.98em;
	box-shadow: 0 1px 3px rgba(42,93,159,0.07);
}

.referencia-tag .btn-eliminar {
	background: none;
	border: none;
	color: #e74c3c;
	font-size: 1.1em;
	margin-left: 6px;
	cursor: pointer;
	padding: 0 2px;
}

.mensaje {
	margin-top: 18px;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 1.05em;
	display: none;
}

.mensaje.exito {
	display: block;
	background: #eafaf1;
	color: #218c5a;
	border: 1px solid #b7e4c7;
}

.mensaje.error {
	display: block;
	background: #fdeaea;
	color: #c0392b;
	border: 1px solid #f5b7b1;
}

.reporteria-section {
	text-align: center;
	margin-top: 28px;
}

/* Modal de reportería */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(44, 62, 80, 0.25);
	justify-content: center;
	align-items: center;
}

.modal.active {
	display: flex;
}

.modal-content {
	background: #fff;
	padding: 32px 28px 24px 28px;
	border-radius: 14px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.13);
	min-width: 320px;
	max-width: 95vw;
	position: relative;
	text-align: center;
}

.modal-close {
	position: absolute;
	top: 12px;
	right: 18px;
	font-size: 1.5em;
	color: #888;
	cursor: pointer;
}

.mensaje-modal {
	margin-top: 16px;
	font-size: 1em;
	color: #c0392b;
	min-height: 22px;
}

@media (max-width: 600px) {
	.container {
		padding: 16px 4px 12px 4px;
	}
	.modal-content {
		padding: 18px 6px 14px 6px;
		min-width: 0;
	}
	.form-row {
		flex-direction: column;
		gap: 0;
	}
}

/* Modo móvil */
body.mobile .container {
	box-shadow: none;
	border-radius: 0;
	margin: 0;
	max-width: 100vw;
	width: 100vw;
	min-height: 100vh;
	padding: 12px 2px 8px 2px;
}

body.mobile {
	background: #f8fafc;
}

body.mobile .form-row {
	flex-direction: column;
	gap: 0;
}

body.mobile .modal-content {
	min-width: 0;
	max-width: 100vw;
	padding: 14px 2px 10px 2px;
}

body.mobile .modal {
	align-items: flex-end;
}

body.mobile .referencias-lista {
	gap: 4px;
	font-size: 0.95em;
}

body.mobile .referencia-tag {
	padding: 3px 8px 3px 6px;
	font-size: 0.95em;
}

body.mobile .btn-submit,
body.mobile .btn-ubicacion,
body.mobile .btn-agregar-ref,
body.mobile .btn-reporteria,
body.mobile .btn-exportar {
	padding: 9px 8px;
	font-size: 0.98em;
}

body.desktop .container {
	max-width: 520px;
	margin: 40px auto;
	border-radius: 18px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.08);
	padding: 32px 28px 24px 28px;
}

body.desktop .form-row {
	flex-direction: row;
	gap: 16px;
}

body.desktop .modal-content {
	min-width: 320px;
	max-width: 95vw;
	padding: 32px 28px 24px 28px;
}

body.desktop .referencias-lista {
	gap: 8px;
	font-size: 0.98em;
}

body.desktop .referencia-tag {
	padding: 4px 12px 4px 8px;
	font-size: 0.98em;
}

body.desktop .btn-submit,
body.desktop .btn-ubicacion,
body.desktop .btn-agregar-ref,
body.desktop .btn-reporteria,
body.desktop .btn-exportar {
	padding: 10px 18px;
	font-size: 1rem;
}
