.wsr-residente-app {
	background: white;
	border: 2px solid #28a745;
	border-radius: 12px;
	padding: 25px;
	max-width: 600px;
	margin: 20px auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	box-sizing: border-box;
}

@media (max-width: 480px) {
	.wsr-residente-app {
		padding: 14px;
		margin: 8px auto;
		border-radius: 8px;
	}
}

.wsr-residente-app .wsr-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 15px;
	border-bottom: 2px solid #f0f0f0;
	margin-bottom: 20px;
}

.wsr-residente-app .wsr-header-green h2 {
	color: #28a745;
	margin: 0;
	font-size: 24px;
}

.wsr-info-card {
	background: #f0fdf4;
	padding: 15px;
	border-radius: 8px;
	border-left: 4px solid #28a745;
	margin-bottom: 20px;
}

.wsr-info-card div {
	margin: 5px 0;
	color: #333;
}

.wsr-residente-app .wsr-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 20px;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	padding-bottom: 4px;
}

.wsr-residente-app .wsr-tabs::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.wsr-residente-app .wsr-tab {
	flex: 0 0 auto;
	padding: 10px 14px;
	background: #f0f0f0;
	color: #333;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: all 0.2s;
	text-align: center;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.wsr-residente-app .wsr-tab {
		font-size: 12px;
		padding: 9px 10px;
	}
	.wsr-residente-app .wsr-header {
		flex-wrap: wrap;
		gap: 8px;
	}
	.wsr-residente-app .wsr-header-green h2 {
		font-size: 18px;
	}
}

.wsr-residente-app .wsr-tab:hover { background: #e0e0e0; }
.wsr-residente-app .wsr-tab.active { background: #28a745; color: white; }

.wsr-residente-app .wsr-panel { display: none !important; }
.wsr-residente-app .wsr-panel.active { display: block !important; }

.wsr-residente-app h3 {
	color: #28a745;
	margin: 20px 0 10px 0;
	font-size: 18px;
}

.wsr-residente-app label {
	display: block;
	margin: 12px 0 6px 0;
	color: #333;
	font-weight: 600;
	font-size: 14px;
}

.wsr-residente-app input[type="text"],
.wsr-residente-app input[type="number"] {
	width: 100%;
	padding: 12px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 15px;
	box-sizing: border-box;
}

.wsr-residente-app input:focus {
	outline: none;
	border-color: #28a745;
}

.wsr-residente-app .wsr-btn {
	width: 100%;
	padding: 14px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 16px;
	font-weight: bold;
	margin-top: 15px;
	background: #28a745;
	color: white;
	transition: all 0.2s;
}

.wsr-residente-app .wsr-btn:hover {
	background: #1e7e34;
	transform: translateY(-1px);
}

.wsr-residente-app .wsr-result {
	margin-top: 20px;
	padding: 20px;
	border-radius: 8px;
	text-align: center;
	font-weight: bold;
	background: #d4edda;
	color: #155724;
	border-left: 4px solid #28a745;
}

.wsr-residente-app .wsr-code-display {
	font-size: 32px;
	letter-spacing: 4px;
	font-family: monospace;
	background: white;
	padding: 15px;
	border-radius: 8px;
	border: 2px dashed #28a745;
	margin: 15px 0;
}

.wsr-visitor-item {
	background: #f9f9f9;
	padding: 12px;
	margin-bottom: 10px;
	border-radius: 8px;
	border-left: 3px solid #28a745;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wsr-visitor-item code {
	background: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 14px;
}

.wsr-package-item {
	background: #fff8e1;
	padding: 12px;
	margin-bottom: 10px;
	border-radius: 8px;
	border-left: 3px solid #f5991f;
}

.wsr-package-item.received { border-left-color: #f5991f; }
.wsr-package-item.picked { border-left-color: #28a745; background: #f0fdf4; }

.wsr-residente-app .wsr-chat-box {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	height: 400px;
	display: flex;
	flex-direction: column;
}

.wsr-residente-app .wsr-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 15px;
	background: #f9f9f9;
}

.wsr-residente-app .wsr-chat-input {
	display: flex;
	gap: 10px;
	padding: 10px;
	border-top: 1px solid #e0e0e0;
	background: white;
}

.wsr-residente-app .wsr-chat-input input {
	flex: 1;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
}

.wsr-residente-app .wsr-chat-input button {
	width: auto;
	padding: 10px 20px;
	margin: 0;
	background: #28a745;
}

.wsr-residente-app .wsr-chat-msg {
	margin-bottom: 10px;
}

.wsr-residente-app .wsr-chat-msg.mine { text-align: right; }
.wsr-residente-app .wsr-chat-msg.other { text-align: left; }

.wsr-residente-app .wsr-chat-bubble {
	display: inline-block;
	padding: 10px 14px;
	border-radius: 14px;
	max-width: 75%;
	word-wrap: break-word;
	font-size: 14px;
}

.wsr-residente-app .wsr-chat-msg.mine .wsr-chat-bubble {
	background: #28a745;
	color: white;
	border-bottom-right-radius: 4px;
}

.wsr-residente-app .wsr-chat-msg.other .wsr-chat-bubble {
	background: #0073aa;
	color: white;
	border-bottom-left-radius: 4px;
}

.wsr-residente-app .wsr-chat-time {
	display: block;
	font-size: 10px;
	opacity: 0.7;
	margin-top: 4px;
	font-weight: normal;
}

.wsr-residente-app .wsr-error {
	background: #ffe6e6;
	color: #c00;
	padding: 20px;
	border: 1px solid #c00;
	border-radius: 8px;
	text-align: center;
}

/* Botones de autorizar visita */
.wsr-visit-actions {
	text-align: center;
	padding: 15px;
	margin-top: 10px;
	background: #fff8e1;
	border-radius: 10px;
	border: 2px solid #ffc107;
}

.wsr-visit-actions p {
	margin: 0 0 12px 0;
	color: #333;
	font-size: 14px;
}

.wsr-btn-authorize {
	background: #28a745;
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: bold;
	cursor: pointer;
	margin: 0 6px;
	transition: all 0.2s;
}

.wsr-btn-authorize:hover {
	background: #1e7e34;
	transform: translateY(-1px);
}

.wsr-btn-deny {
	background: #dc3545;
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: bold;
	cursor: pointer;
	margin: 0 6px;
	transition: all 0.2s;
}

.wsr-btn-deny:hover {
	background: #b02a37;
	transform: translateY(-1px);
}

/* Banner de notificación para residente */
.wsr-res-notif-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: linear-gradient(135deg, #0073aa, #005a87);
	color: white;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 15px;
	animation: wsrResNotifPulse 1.5s infinite;
}

.wsr-res-notif-banner span {
	font-weight: 600;
	font-size: 14px;
}

.wsr-res-notif-banner button {
	background: white;
	color: #0073aa;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	font-weight: bold;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s;
}

.wsr-res-notif-banner button:hover {
	background: #f0f7fd;
	transform: scale(1.05);
}

@keyframes wsrResNotifPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.85; }
}


/* Botón ver foto de paquete */
.wsr-pkg-ver-foto {
	display: inline-block;
	margin-top: 6px;
	padding: 4px 10px;
	background: #0073aa;
	color: white !important;
	border-radius: 4px;
	font-size: 12px;
	text-decoration: none;
	font-weight: 600;
}

.wsr-pkg-ver-foto:hover {
	background: #005a87;
}

/* Animación de pulso para botón de notificaciones */
@keyframes wsr-pulse {
	0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
	50% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
	100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

#wsr-notif-gear-btn {
	transition: background 0.3s, transform 0.2s;
	border-radius: 50% !important;
}
